PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.3.3
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.3.3
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / inc / Dependencies / ActionScheduler / classes / data-stores / ActionScheduler_wpPostStore_PostStatusRegistrar.php

ActionScheduler_wpPostStore_PostStatusRegistrar.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.3.3, at inc/Dependencies/ActionScheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php

64 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class ActionScheduler_wpPostStore_PostStatusRegistrar
5 *
6 * @codeCoverageIgnore
7 */
8 class ActionScheduler_wpPostStore_PostStatusRegistrar {
9
10 /**
11 * Registrar.
12 */
13 public function register() {
14 register_post_status( ActionScheduler_Store::STATUS_RUNNING, array_merge( $this->post_status_args(), $this->post_status_running_labels() ) );
15 register_post_status( ActionScheduler_Store::STATUS_FAILED, array_merge( $this->post_status_args(), $this->post_status_failed_labels() ) );
16 }
17
18 /**
19 * Build the args array for the post type definition
20 *
21 * @return array
22 */
23 protected function post_status_args() {
24 $args = array(
25 'public' => false,
26 'exclude_from_search' => false,
27 'show_in_admin_all_list' => true,
28 'show_in_admin_status_list' => true,
29 );
30
31 return apply_filters( 'action_scheduler_post_status_args', $args );
32 }
33
34 /**
35 * Build the args array for the post type definition
36 *
37 * @return array
38 */
39 protected function post_status_failed_labels() {
40 $labels = array(
41 'label' => _x( 'Failed', 'post', 'action-scheduler' ),
42 /* translators: %s: count */
43 'label_count' => _n_noop( 'Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'action-scheduler' ),
44 );
45
46 return apply_filters( 'action_scheduler_post_status_failed_labels', $labels );
47 }
48
49 /**
50 * Build the args array for the post type definition
51 *
52 * @return array
53 */
54 protected function post_status_running_labels() {
55 $labels = array(
56 'label' => _x( 'In-Progress', 'post', 'action-scheduler' ),
57 /* translators: %s: count */
58 'label_count' => _n_noop( 'In-Progress <span class="count">(%s)</span>', 'In-Progress <span class="count">(%s)</span>', 'action-scheduler' ),
59 );
60
61 return apply_filters( 'action_scheduler_post_status_running_labels', $labels );
62 }
63 }
64