ActionScheduler_Abstract_QueueRunner_Deprecated.php
1 year ago
ActionScheduler_AdminView_Deprecated.php
1 year ago
ActionScheduler_Schedule_Deprecated.php
1 year ago
ActionScheduler_Store_Deprecated.php
1 year ago
functions.php
1 year ago
ActionScheduler_AdminView_Deprecated.php
154 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Class ActionScheduler_AdminView_Deprecated |
| 5 | * |
| 6 | * Store deprecated public functions previously found in the ActionScheduler_AdminView class. |
| 7 | * Keeps them out of the way of the main class. |
| 8 | * |
| 9 | * @codeCoverageIgnore |
| 10 | */ |
| 11 | class ActionScheduler_AdminView_Deprecated { |
| 12 | |
| 13 | /** |
| 14 | * Adjust parameters for custom post type. |
| 15 | * |
| 16 | * @param array $args Args. |
| 17 | */ |
| 18 | public function action_scheduler_post_type_args( $args ) { |
| 19 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 20 | return $args; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Customise the post status related views displayed on the Scheduled Actions administration screen. |
| 25 | * |
| 26 | * @param array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen. |
| 27 | * @return array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen. |
| 28 | */ |
| 29 | public function list_table_views( $views ) { |
| 30 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 31 | return $views; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Do not include the "Edit" action for the Scheduled Actions administration screen. |
| 36 | * |
| 37 | * Hooked to the 'bulk_actions-edit-action-scheduler' filter. |
| 38 | * |
| 39 | * @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type. |
| 40 | * @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type. |
| 41 | */ |
| 42 | public function bulk_actions( $actions ) { |
| 43 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 44 | return $actions; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Completely customer the columns displayed on the Scheduled Actions administration screen. |
| 49 | * |
| 50 | * Because we can't filter the content of the default title and date columns, we need to recreate our own |
| 51 | * custom columns for displaying those post fields. For the column content, @see self::list_table_column_content(). |
| 52 | * |
| 53 | * @param array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen. |
| 54 | * @return array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen. |
| 55 | */ |
| 56 | public function list_table_columns( $columns ) { |
| 57 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 58 | return $columns; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Make our custom title & date columns use defaulting title & date sorting. |
| 63 | * |
| 64 | * @param array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen. |
| 65 | * @return array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen. |
| 66 | */ |
| 67 | public static function list_table_sortable_columns( $columns ) { |
| 68 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 69 | return $columns; |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Print the content for our custom columns. |
| 74 | * |
| 75 | * @param string $column_name The key for the column for which we should output our content. |
| 76 | * @param int $post_id The ID of the 'scheduled-action' post for which this row relates. |
| 77 | */ |
| 78 | public static function list_table_column_content( $column_name, $post_id ) { |
| 79 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Hide the inline "Edit" action for all 'scheduled-action' posts. |
| 84 | * |
| 85 | * Hooked to the 'post_row_actions' filter. |
| 86 | * |
| 87 | * @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type. |
| 88 | * @param WP_Post $post The 'scheduled-action' post object. |
| 89 | * @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type. |
| 90 | */ |
| 91 | public static function row_actions( $actions, $post ) { |
| 92 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 93 | return $actions; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Run an action when triggered from the Action Scheduler administration screen. |
| 98 | * |
| 99 | * @codeCoverageIgnore |
| 100 | */ |
| 101 | public static function maybe_execute_action() { |
| 102 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Convert an interval of seconds into a two part human friendly string. |
| 107 | * |
| 108 | * The WordPress human_time_diff() function only calculates the time difference to one degree, meaning |
| 109 | * even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step |
| 110 | * further to display two degrees of accuracy. |
| 111 | * |
| 112 | * Based on Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/ |
| 113 | * |
| 114 | * @return void |
| 115 | */ |
| 116 | public static function admin_notices() { |
| 117 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Filter search queries to allow searching by Claim ID (i.e. post_password). |
| 122 | * |
| 123 | * @param string $orderby MySQL orderby string. |
| 124 | * @param WP_Query $query Instance of a WP_Query object. |
| 125 | * @return void |
| 126 | */ |
| 127 | public function custom_orderby( $orderby, $query ) { |
| 128 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Filter search queries to allow searching by Claim ID (i.e. post_password). |
| 133 | * |
| 134 | * @param string $search MySQL search string. |
| 135 | * @param WP_Query $query Instance of a WP_Query object. |
| 136 | * @return void |
| 137 | */ |
| 138 | public function search_post_password( $search, $query ) { |
| 139 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Change messages when a scheduled action is updated. |
| 144 | * |
| 145 | * @param array $messages Messages. |
| 146 | * @return array |
| 147 | */ |
| 148 | public function post_updated_messages( $messages ) { |
| 149 | _deprecated_function( __METHOD__, '2.0.0' ); |
| 150 | return $messages; |
| 151 | } |
| 152 | |
| 153 | } |
| 154 |