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