PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | includes/admin/shortcodes/shortcode-give-form.php +21 -8 2.3.14.16.9 View file →
@@ -32,16 +32,18 @@
32 32
33 33 /**
34 34 * Define the shortcode attribute fields
35 35 *
36 - * @return array
36 + * @since 4.0.0 Replace "new form" with "new campaign form" link
37 + *
38 + * @return array
37 39 */
38 40 public function define_fields() {
39 41
40 42 $create_form_link = sprintf(
41 - /* translators: %s: create new form URL */
42 - __( '<a href="%s">Create</a> a new Donation Form.', 'give' ),
43 - admin_url( 'post-new.php?post_type=give_forms' )
43 + /* translators: %s: create new form URL */
44 + __('<a href="%s">Create</a> a new Campaign Form.', 'give'),
45 + admin_url('edit.php?post_type=give_forms&page=give-campaigns&new=campaign')
44 46 );
45 47
46 48 return array(
47 49 array(
@@ -50,12 +52,13 @@
50 52 'post_type' => 'give_forms',
51 53 ),
52 54 'name' => 'id',
53 55 'tooltip' => esc_attr__( 'Select a Donation Form', 'give' ),
54 - 'placeholder' => '- ' . esc_attr__( 'Select a Donation Form', 'give' ) . ' -',
56 + 'placeholder' => '- ' . esc_attr__('Select a Campaign Form', 'give') . ' -',
55 57 'required' => array(
56 - 'alert' => esc_html__( 'You must first select a Form!', 'give' ),
57 - 'error' => sprintf( '<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html__( 'No forms found.', 'give' ), $create_form_link ),
58 + 'alert' => esc_html__('You must first select a Campaign Form!', 'give'),
59 + 'error' => sprintf('<p class="strong">%s</p><p class="no-margin">%s</p>',
60 + esc_html__('No campaign forms found.', 'give'), $create_form_link),
58 61 ),
59 62 ),
60 63 array(
61 64 'type' => 'container',
@@ -112,9 +115,19 @@
112 115 'name' => 'continue_button_title',
113 116 'label' => esc_attr__( 'Button Text', 'give' ),
114 117 'tooltip' => esc_attr__( 'The button label for displaying the additional payment fields.', 'give' ),
115 118 ),
119 + array(
120 + 'type' => 'docs_link',
121 + 'text' => esc_html__( 'Learn more about the Donation Form Shortcode', 'give' ),
122 + 'link' => 'http://docs.givewp.com/shortcode-give-forms',
123 + ),
116 124 );
117 125 }
118 126 }
119 127
120 -new Give_Shortcode_Donation_Form();
128 +/**
129 + * @since 4.3.0 use init action
130 + */
131 +add_action( 'init', static function () {
132 + new Give_Shortcode_Donation_Form();
133 +});