Skip to content

Commit

Permalink
Merge pull request #1015 from Codeinwp/bugfix/1013
Browse files Browse the repository at this point in the history
Fixed PHP deprecated error
  • Loading branch information
vytisbulkevicius authored Nov 11, 2024
2 parents 57ef0c1 + 8a93c4c commit 473ce67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions includes/admin/class-rop-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions includes/admin/models/class-rop-posts-selector-model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 473ce67

Please sign in to comment.