Plugin Directory

Changeset 3449274


Ignore:
Timestamp:
01/29/2026 06:37:26 AM (2 months ago)
Author:
jamesdlow
Message:

1.4.6

  • Fix search filter with no category
Location:
pageapp
Files:
18 added
2 edited

Legend:

Unmodified
Added
Removed
  • pageapp/trunk/pageapp.php

    r3239961 r3449274  
    44Plugin URI: https://wordpress.org/plugins/pageapp/
    55Description: Extensions to Wordpress wp-json for the PageApp API and mobile framework
    6 Version: 1.4.5
     6Version: 1.4.6
    77Author: PageApp
    88Author URI: https://www.pageapp.com
     
    4949    public static function add_hooks() {
    5050        add_action('init', array(self::class, 'init'));
     51        //add_action('init', array(self::class, 'init2'), 1);
    5152        add_action('rest_api_init', array(self::class, 'rest_api_init'), 20);
    5253        add_action('plugins_loaded', array(static::class, 'plugins_loaded'));
     
    8384        }
    8485        return $response;
     86    }
     87    public static function init2() {
     88        if (get_option('pageapp_relevanssi') == '1') {
     89            remove_filter('rest_api_init', 'relevanssi_rest_api_disable');
     90        }
    8591    }
    8692    public static function init() {
     
    615621            'posts_per_page' => $parameters['per_page'] ? intval($parameters['per_page']) : 10,
    616622            'paged' => $parameters['page'] ? intval($parameters['page']) : 0,
    617             'post_type' => self::post_type(),
    618             's' => $parameters['search'],
    619             'cat' => implode(',', $parameters['categories'])
     623            's' => $parameters['search']
    620624        );
     625        $post_type = self::post_type();
     626        if ($post_type != 'search') {
     627            $args['post_type'] = $post_type;
     628        }
     629        if (isset($parameters['categories']) && $parameters['categories']) {
     630            $args['cat'] = implode(',', $parameters['categories']);
     631        }
    621632       
    622633        // Run search query
  • pageapp/trunk/readme.txt

    r3239961 r3449274  
    22Contributors: jamesdlow
    33Tags: pageapp, wp-json, relevanssi, search, api, rest api, post, meta, post meta
    4 Requires at least: 3.0
    5 Tested up to: 6.7.2
    6 Stable tag: 1.4.5
     4Requires at least: 4.0
     5Tested up to: 6.9.0
     6Stable tag: trunk
    77License: © 2024 Thireen32 Pty Ltd
    88Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=K6VKWB3HZB2T2&item_name=Donation%20to%20jameslow%2ecom&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8
     
    2828
    2929== Changelog ==
     30
     31= 1.4.6 =
     32* Fix search filter with no category
    3033
    3134= 1.4.5 =
Note: See TracChangeset for help on using the changeset viewer.