diff --git a/includes/admin/class-rop-rest-api.php b/includes/admin/class-rop-rest-api.php index a9972845..c4b79ca5 100644 --- a/includes/admin/class-rop-rest-api.php +++ b/includes/admin/class-rop-rest-api.php @@ -549,7 +549,7 @@ private function exclude_post( $data ) { private function exclude_post_batch( $data ) { $search = sanitize_text_field( $data['search'] ); $post_selector = new Rop_Posts_Selector_Model(); - $available_posts = $post_selector->get_posts( $data['post_types'], $data['taxonomies'], $search, $data['exclude'], false, false ); + $available_posts = $post_selector->get_posts( $data['post_types'], $data['taxonomies'], $data['exclude'], $search, false, false ); $post_ids = wp_list_pluck( $available_posts, 'value' ); $settings_model = new Rop_Settings_Model(); @@ -576,7 +576,7 @@ private function exclude_post_batch( $data ) { */ private function get_posts( $data ) { $post_selector = new Rop_Posts_Selector_Model(); - $available_posts = $post_selector->get_posts( $data['post_types'], $data['taxonomies'], $data['search_query'], $data['exclude'], $data['show_excluded'], $data['page'] ); + $available_posts = $post_selector->get_posts( $data['post_types'], $data['taxonomies'], $data['exclude'], $data['search_query'], $data['show_excluded'], $data['page'] ); $this->response->set_code( '200' ) ->set_data( diff --git a/includes/admin/models/class-rop-posts-selector-model.php b/includes/admin/models/class-rop-posts-selector-model.php index 03889325..a62921b7 100644 --- a/includes/admin/models/class-rop-posts-selector-model.php +++ b/includes/admin/models/class-rop-posts-selector-model.php @@ -186,14 +186,14 @@ public function ignore_taxonomies( $taxes ) { * * @param array $selected_post_types The selected post types. * @param array $taxonomies The selected taxonomies. - * @param string $search A search query. * @param bool $exclude The exclude taxonomies flag. + * @param string $search A search query. * * @return array * @since 8.0.0 * @access public */ - public function get_posts( $selected_post_types, $taxonomies, $search = '', $exclude, $show_excluded_posts = false, $page = 1 ) { + public function get_posts( $selected_post_types, $taxonomies, $exclude, $search = '', $show_excluded_posts = false, $page = 1 ) { $search = strval( $search ); $args = array(