← All changes
|
includes/admin/shortcodes/shortcode-give-donor-wall.php
+35
-5
2.3.1
→
4.18.0
View file →
| @@ -48,15 +48,25 @@ | ||
| 48 | 48 | 'placeholder' => esc_attr__( 'All Forms', 'give' ), |
| 49 | 49 | ), |
| 50 | 50 | array( |
| 51 | 51 | 'type' => 'listbox', |
| 52 | + 'name' => 'orderby', | |
| 53 | + 'label' => esc_attr__( 'Order By:', 'give' ), | |
| 54 | + 'tooltip' => esc_attr__( 'Different parameters to set the order in which donors appear.', 'give' ), | |
| 55 | + 'options' => array( | |
| 56 | + 'donation_amount' => esc_html__( 'Donation Amount', 'give' ), | |
| 57 | + ), | |
| 58 | + 'placeholder' => esc_html__( 'Date Created', 'give' ), | |
| 59 | + ), | |
| 60 | + array( | |
| 61 | + 'type' => 'listbox', | |
| 52 | 62 | 'name' => 'order', |
| 53 | 63 | 'label' => esc_attr__( 'Order:', 'give' ), |
| 54 | 64 | 'tooltip' => esc_attr__( 'Sets the order in which donors appear.', 'give' ), |
| 55 | 65 | 'options' => array( |
| 56 | - 'ASC' => esc_html__( 'Oldest to Newest', 'give' ), | |
| 66 | + 'ASC' => esc_html__( 'Ascending', 'give' ), | |
| 57 | 67 | ), |
| 58 | - 'placeholder' => esc_html__( 'Newest to Oldest', 'give' ), | |
| 68 | + 'placeholder' => esc_html__( 'Descending', 'give' ), | |
| 59 | 69 | ), |
| 60 | 70 | array( |
| 61 | 71 | 'type' => 'listbox', |
| 62 | 72 | 'name' => 'only_comments', |
| @@ -109,8 +119,18 @@ | ||
| 109 | 119 | 'placeholder' => esc_html__( 'Best Fit', 'give' ), |
| 110 | 120 | ), |
| 111 | 121 | array( |
| 112 | 122 | 'type' => 'listbox', |
| 123 | + 'name' => 'anonymous', | |
| 124 | + 'label' => esc_attr__( 'Anonymous:', 'give' ), | |
| 125 | + 'tooltip' => esc_attr__( 'Determines whether anonymous donations are included.', 'give' ), | |
| 126 | + 'options' => array( | |
| 127 | + 'false' => esc_html__( 'Hide', 'give' ), | |
| 128 | + ), | |
| 129 | + 'placeholder' => esc_html__( 'Show', 'give' ), | |
| 130 | + ), | |
| 131 | + array( | |
| 132 | + 'type' => 'listbox', | |
| 113 | 133 | 'name' => 'show_avatar', |
| 114 | 134 | 'label' => esc_attr__( 'Donor Avatar:', 'give' ), |
| 115 | 135 | 'tooltip' => esc_attr__( 'Determines whether the avatar is visible.', 'give' ), |
| 116 | 136 | 'options' => array( |
| @@ -139,9 +159,9 @@ | ||
| 139 | 159 | 'placeholder' => esc_html__( 'Show', 'give' ), |
| 140 | 160 | ), |
| 141 | 161 | array( |
| 142 | 162 | 'type' => 'listbox', |
| 143 | - 'name' => 'show_time', | |
| 163 | + 'name' => 'show_timestamp', | |
| 144 | 164 | 'label' => esc_attr__( 'Donation Date:', 'give' ), |
| 145 | 165 | 'tooltip' => esc_attr__( 'Determines whether the date of the donation is visible.', 'give' ), |
| 146 | 166 | 'options' => array( |
| 147 | 167 | 'false' => esc_html__( 'Hide', 'give' ), |
| @@ -156,10 +176,20 @@ | ||
| 156 | 176 | 'options' => array( |
| 157 | 177 | 'false' => esc_html__( 'Hide', 'give' ), |
| 158 | 178 | ), |
| 159 | 179 | 'placeholder' => esc_html__( 'Show', 'give' ), |
| 160 | - ) | |
| 180 | + ), | |
| 181 | + array( | |
| 182 | + 'type' => 'docs_link', | |
| 183 | + 'text' => esc_html__( 'Learn more about the Donor Wall Shortcode', 'give' ), | |
| 184 | + 'link' => 'http://docs.givewp.com/shortcode-donor-wall', | |
| 185 | + ), | |
| 161 | 186 | ); |
| 162 | 187 | } |
| 163 | 188 | } |
| 164 | 189 | |
| 165 | -new Give_Shortcode_Donor_Wall(); | |
| 190 | +/** | |
| 191 | + * @since 4.3.0 use init action | |
| 192 | + */ | |
| 193 | +add_action( 'init', static function () { | |
| 194 | + new Give_Shortcode_Donor_Wall(); | |
| 195 | +}); | |