| @@ -23,19 +23,19 @@ | ||
| 23 | 23 | * @return array |
| 24 | 24 | */ |
| 25 | 25 | public function update_post_labels( $messages ) { |
| 26 | 26 | $messages['subscrpt_order'] = array( |
| 27 | - __( 'Subscription updated.', 'sdevs_subscrpt' ), | |
| 28 | - __( 'Subscription updated.', 'sdevs_subscrpt' ), | |
| 27 | + __( 'Subscription updated.', 'subscription' ), | |
| 28 | + __( 'Subscription updated.', 'subscription' ), | |
| 29 | 29 | 'Custom field updated.', |
| 30 | 30 | 'Custom field deleted.', |
| 31 | - __( 'Subscription updated.', 'sdevs_subscrpt' ), | |
| 31 | + __( 'Subscription updated.', 'subscription' ), | |
| 32 | 32 | false, |
| 33 | - __( 'Subscription published.', 'sdevs_subscrpt' ), | |
| 34 | - __( 'Subscription saved.', 'sdevs_subscrpt' ), | |
| 35 | - __( 'Subscription submitted.', 'sdevs_subscrpt' ), | |
| 33 | + __( 'Subscription published.', 'subscription' ), | |
| 34 | + __( 'Subscription saved.', 'subscription' ), | |
| 35 | + __( 'Subscription submitted.', 'subscription' ), | |
| 36 | 36 | false, |
| 37 | - __( 'Subscription draft updated.', 'sdevs_subscrpt' ), | |
| 37 | + __( 'Subscription draft updated.', 'subscription' ), | |
| 38 | 38 | ); |
| 39 | 39 | return $messages; |
| 40 | 40 | } |
| 41 | 41 | |
| @@ -54,29 +54,29 @@ | ||
| 54 | 54 | * Register ``subscrpt_order`` post type |
| 55 | 55 | */ |
| 56 | 56 | public function register_subscription_post_type() { |
| 57 | 57 | $labels = array( |
| 58 | - 'name' => __( 'Subscriptions', 'sdevs_subscrpt' ), | |
| 59 | - 'singular_name' => __( 'Subscription', 'sdevs_subscrpt' ), | |
| 60 | - 'name_admin_bar' => __( 'Subscription\'s', 'sdevs_subscrpt' ), | |
| 61 | - 'archives' => __( 'Item Archives', 'sdevs_subscrpt' ), | |
| 62 | - 'attributes' => __( 'Item Attributes', 'sdevs_subscrpt' ), | |
| 63 | - 'parent_item_colon' => __( 'Parent :', 'sdevs_subscrpt' ), | |
| 64 | - 'all_items' => __( 'Subscriptions', 'sdevs_subscrpt' ), | |
| 65 | - 'add_new_item' => __( 'Add New Subscription', 'sdevs_subscrpt' ), | |
| 66 | - 'add_new' => __( 'Add Subscription', 'sdevs_subscrpt' ), | |
| 67 | - 'new_item' => __( 'New Subscription', 'sdevs_subscrpt' ), | |
| 68 | - 'edit_item' => __( 'Edit Subscription', 'sdevs_subscrpt' ), | |
| 69 | - 'update_item' => __( 'Update Subscription', 'sdevs_subscrpt' ), | |
| 70 | - 'view_item' => __( 'View Subscription', 'sdevs_subscrpt' ), | |
| 71 | - 'view_items' => __( 'View Subscription', 'sdevs_subscrpt' ), | |
| 72 | - 'search_items' => __( 'Search Subscription', 'sdevs_subscrpt' ), | |
| 73 | - 'not_found' => __( 'No subscriptions found.', 'sdevs_subscrpt' ), | |
| 74 | - 'item_updated' => __( 'Subscription updated.', 'sdevs_subscrpt' ), | |
| 58 | + 'name' => __( 'Subscriptions', 'subscription' ), | |
| 59 | + 'singular_name' => __( 'Subscription', 'subscription' ), | |
| 60 | + 'name_admin_bar' => __( 'Subscription\'s', 'subscription' ), | |
| 61 | + 'archives' => __( 'Item Archives', 'subscription' ), | |
| 62 | + 'attributes' => __( 'Item Attributes', 'subscription' ), | |
| 63 | + 'parent_item_colon' => __( 'Parent :', 'subscription' ), | |
| 64 | + 'all_items' => __( 'Subscriptions', 'subscription' ), | |
| 65 | + 'add_new_item' => __( 'Add New Subscription', 'subscription' ), | |
| 66 | + 'add_new' => __( 'Add Subscription', 'subscription' ), | |
| 67 | + 'new_item' => __( 'New Subscription', 'subscription' ), | |
| 68 | + 'edit_item' => __( 'Edit Subscription', 'subscription' ), | |
| 69 | + 'update_item' => __( 'Update Subscription', 'subscription' ), | |
| 70 | + 'view_item' => __( 'View Subscription', 'subscription' ), | |
| 71 | + 'view_items' => __( 'View Subscription', 'subscription' ), | |
| 72 | + 'search_items' => __( 'Search Subscription', 'subscription' ), | |
| 73 | + 'not_found' => __( 'No subscriptions found.', 'subscription' ), | |
| 74 | + 'item_updated' => __( 'Subscription updated.', 'subscription' ), | |
| 75 | 75 | ); |
| 76 | 76 | |
| 77 | 77 | $args = array( |
| 78 | - 'label' => __( 'Subscriptions', 'sdevs_subscrpt' ), | |
| 78 | + 'label' => __( 'Subscriptions', 'subscription' ), | |
| 79 | 79 | 'labels' => $labels, |
| 80 | 80 | 'description' => '', |
| 81 | 81 | 'public' => false, |
| 82 | 82 | 'publicly_queryable' => false, |
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | * Register ``subscrpt_order_item`` post type |
| 113 | 113 | */ |
| 114 | 114 | public function register_subscription_item_post_type() { |
| 115 | 115 | $args = array( |
| 116 | - 'label' => __( 'Subscription Items', 'sdevs_subscrpt' ), | |
| 116 | + 'label' => __( 'Subscription Items', 'subscription' ), | |
| 117 | 117 | // 'labels' => , |
| 118 | 118 | 'description' => '', |
| 119 | 119 | 'public' => false, |
| 120 | 120 | 'publicly_queryable' => false, |
| @@ -154,12 +154,12 @@ | ||
| 154 | 154 | public function register_post_status() { |
| 155 | 155 | register_post_status( |
| 156 | 156 | 'pending', |
| 157 | 157 | array( |
| 158 | - 'label' => _x( 'Pending', 'post status label', 'sdevs_subscrpt' ), | |
| 158 | + 'label' => _x( 'Pending', 'post status label', 'subscription' ), | |
| 159 | 159 | 'public' => true, |
| 160 | 160 | // translators: pending posts count. |
| 161 | - 'label_count' => _n_noop( 'Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>', 'sdevs_subscrpt' ), | |
| 161 | + 'label_count' => _n_noop( 'Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>', 'subscription' ), | |
| 162 | 162 | 'post_type' => array( 'subscrpt_order' ), |
| 163 | 163 | 'show_in_admin_all_list' => true, |
| 164 | 164 | 'show_in_admin_status_list' => true, |
| 165 | 165 | 'show_in_metabox_dropdown' => true, |
| @@ -170,12 +170,12 @@ | ||
| 170 | 170 | |
| 171 | 171 | register_post_status( |
| 172 | 172 | 'active', |
| 173 | 173 | array( |
| 174 | - 'label' => _x( 'Active', 'post status label', 'sdevs_subscrpt' ), | |
| 174 | + 'label' => _x( 'Active', 'post status label', 'subscription' ), | |
| 175 | 175 | 'public' => true, |
| 176 | 176 | // translators: active posts count. |
| 177 | - 'label_count' => _n_noop( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', 'sdevs_subscrpt' ), | |
| 177 | + 'label_count' => _n_noop( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', 'subscription' ), | |
| 178 | 178 | 'post_type' => array( 'subscrpt_order' ), |
| 179 | 179 | 'show_in_admin_all_list' => true, |
| 180 | 180 | 'show_in_admin_status_list' => true, |
| 181 | 181 | 'show_in_metabox_dropdown' => true, |
| @@ -186,12 +186,12 @@ | ||
| 186 | 186 | |
| 187 | 187 | register_post_status( |
| 188 | 188 | 'on_hold', |
| 189 | 189 | array( |
| 190 | - 'label' => _x( 'On Hold', 'post status label', 'sdevs_subscrpt' ), | |
| 190 | + 'label' => _x( 'On Hold', 'post status label', 'subscription' ), | |
| 191 | 191 | 'public' => true, |
| 192 | 192 | // translators: on-hold posts count. |
| 193 | - 'label_count' => _n_noop( 'On Hold <span class="count">(%s)</span>', 'On Hold <span class="count">(%s)</span>', 'sdevs_subscrpt' ), | |
| 193 | + 'label_count' => _n_noop( 'On Hold <span class="count">(%s)</span>', 'On Hold <span class="count">(%s)</span>', 'subscription' ), | |
| 194 | 194 | 'post_type' => array( 'subscrpt_order' ), |
| 195 | 195 | 'show_in_admin_all_list' => true, |
| 196 | 196 | 'show_in_admin_status_list' => true, |
| 197 | 197 | 'show_in_metabox_dropdown' => true, |
| @@ -202,12 +202,12 @@ | ||
| 202 | 202 | |
| 203 | 203 | register_post_status( |
| 204 | 204 | 'cancelled', |
| 205 | 205 | array( |
| 206 | - 'label' => _x( 'Cancelled', 'post status label', 'sdevs_subscrpt' ), | |
| 206 | + 'label' => _x( 'Cancelled', 'post status label', 'subscription' ), | |
| 207 | 207 | 'public' => true, |
| 208 | 208 | // translators: cancelled posts count. |
| 209 | - 'label_count' => _n_noop( 'Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'sdevs_subscrpt' ), | |
| 209 | + 'label_count' => _n_noop( 'Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'subscription' ), | |
| 210 | 210 | 'post_type' => array( 'subscrpt_order' ), |
| 211 | 211 | 'show_in_admin_all_list' => true, |
| 212 | 212 | 'show_in_admin_status_list' => true, |
| 213 | 213 | 'show_in_metabox_dropdown' => true, |
| @@ -218,12 +218,12 @@ | ||
| 218 | 218 | |
| 219 | 219 | register_post_status( |
| 220 | 220 | 'expired', |
| 221 | 221 | array( |
| 222 | - 'label' => _x( 'Expired', 'post status label', 'sdevs_subscrpt' ), | |
| 222 | + 'label' => _x( 'Expired', 'post status label', 'subscription' ), | |
| 223 | 223 | 'public' => true, |
| 224 | 224 | // translators: expired posts count. |
| 225 | - 'label_count' => _n_noop( 'Expired <span class="count">(%s)</span>', 'Expired <span class="count">(%s)</span>', 'sdevs_subscrpt' ), | |
| 225 | + 'label_count' => _n_noop( 'Expired <span class="count">(%s)</span>', 'Expired <span class="count">(%s)</span>', 'subscription' ), | |
| 226 | 226 | 'post_type' => array( 'subscrpt_order' ), |
| 227 | 227 | 'show_in_admin_all_list' => true, |
| 228 | 228 | 'show_in_admin_status_list' => true, |
| 229 | 229 | 'show_in_metabox_dropdown' => true, |
| @@ -232,14 +232,30 @@ | ||
| 232 | 232 | ) |
| 233 | 233 | ); |
| 234 | 234 | |
| 235 | 235 | register_post_status( |
| 236 | + 'completed', | |
| 237 | + array( | |
| 238 | + 'label' => _x( 'Completed', 'post status label', 'subscription' ), | |
| 239 | + 'public' => true, | |
| 240 | + // translators: completed posts count. | |
| 241 | + 'label_count' => _n_noop( 'Completed <span class="count">(%s)</span>', 'Completed <span class="count">(%s)</span>', 'subscription' ), | |
| 242 | + 'post_type' => array( 'subscrpt_order' ), | |
| 243 | + 'show_in_admin_all_list' => true, | |
| 244 | + 'show_in_admin_status_list' => true, | |
| 245 | + 'show_in_metabox_dropdown' => true, | |
| 246 | + 'show_in_inline_dropdown' => true, | |
| 247 | + 'dashicon' => '', | |
| 248 | + ) | |
| 249 | + ); | |
| 250 | + | |
| 251 | + register_post_status( | |
| 236 | 252 | 'pe_cancelled', |
| 237 | 253 | array( |
| 238 | - 'label' => _x( 'Pending Cancellation', 'post status label', 'sdevs_subscrpt' ), | |
| 254 | + 'label' => _x( 'Pending Cancellation', 'post status label', 'subscription' ), | |
| 239 | 255 | 'public' => true, |
| 240 | 256 | // translators: pending cancellation posts count. |
| 241 | - 'label_count' => _n_noop( 'Pending Cancellation <span class="count">(%s)</span>', 'Pending Cancellation <span class="count">(%s)</span>', 'sdevs_subscrpt' ), | |
| 257 | + 'label_count' => _n_noop( 'Pending Cancellation <span class="count">(%s)</span>', 'Pending Cancellation <span class="count">(%s)</span>', 'subscription' ), | |
| 242 | 258 | 'post_type' => array( 'subscrpt_order' ), |
| 243 | 259 | 'show_in_admin_all_list' => true, |
| 244 | 260 | 'show_in_admin_status_list' => true, |
| 245 | 261 | 'show_in_metabox_dropdown' => true, |