Plugin Directory

Changeset 3247413


Ignore:
Timestamp:
02/26/2025 09:06:54 PM (13 months ago)
Author:
pavlo.opanasenko
Message:

Version 0.5.5

Location:
searchwp-modal-search-form
Files:
18 deleted
8 edited
7 copied

Legend:

Unmodified
Added
Removed
  • searchwp-modal-search-form/tags/0.5.5/includes/AdminMenu.php

    r2934767 r3247413  
    3232    public function hooks() {
    3333
    34         if ( Utils::is_searchwp_active() ) {
     34        if ( Utils::is_searchwp_active() || Utils::is_live_search_active() ) {
    3535            return;
    3636        }
    3737
    38         if ( Utils::is_live_search_active() ) {
    39             $this->hooks_live_search_enabled();
    40 
    41             return;
    42         }
    43 
    4438        $this->hooks_modal_form_standalone();
    45     }
    46 
    47     /**
    48      * Hooks when Live Ajax Search is enabled.
    49      *
    50      * @since 0.5.0
    51      */
    52     private function hooks_live_search_enabled() {
    53 
    54         add_filter( 'searchwp_live_search_options_submenu_pages', [ $this, 'add_menus_live_search_enabled' ] );
    5539    }
    5640
  • searchwp-modal-search-form/tags/0.5.5/includes/Settings.php

    r2934767 r3247413  
    2727
    2828        if ( Utils::is_searchwp_active() ) {
    29             $this->hooks_searchwp_enabled();
     29            $this->hooks_searchwp_enabled();
     30        } elseif ( Utils::is_live_search_active() ) {
     31            $this->hooks_live_search_enabled();
    3032        } else {
    3133            $this->hooks_searchwp_disabled();
     
    9193
    9294    /**
     95     * Hooks if Live Search is enabled.
     96     *
     97     * @since 0.5.5
     98     */
     99    private function hooks_live_search_enabled() {
     100
     101        add_filter( 'searchwp_live_search_settings_sub_header_items', [ $this, 'add_sub_header_items' ], 20 );
     102        add_action( 'searchwp_live_search_modal_form_render', [ $this, 'output' ] );
     103        add_filter( 'admin_footer_text', [ $this, 'admin_footer_rate_us_searchwp_disabled' ], 1, 2 );
     104    }
     105
     106    /**
     107     * Add the Search Modal sub header item.
     108     *
     109     * @since 0.5.5
     110     *
     111     * @param array $items The sub header items.
     112     *
     113     * @return mixed
     114     */
     115    public static function add_sub_header_items( $items ) {
     116
     117        $items['searchwp-live-search'][] = [
     118            'page'  => 'searchwp-live-search',
     119            'tab'   => 'search-modal',
     120            'label' => esc_html__( 'Search Modal', 'searchwp-modal-search-form' ),
     121        ];
     122
     123        return $items;
     124    }
     125
     126    /**
    93127     * Hooks if SearchWP is disabled.
    94128     *
     
    162196
    163197            <?php $this->output_after_settings(); ?>
    164            
     198
    165199        </div>
    166200        <?php
     
    537571        global $current_screen;
    538572
    539         if ( empty( $current_screen->id ) || strpos( $current_screen->id, 'searchwp-modal-form' ) === false ) {
     573        if ( ! Utils::is_settings_page() ) {
    540574            return $text;
    541575        }
  • searchwp-modal-search-form/tags/0.5.5/includes/Utils.php

    r2934767 r3247413  
    5858        $page = isset( $_REQUEST['page'] ) ? sanitize_key( $_REQUEST['page'] ) : '';
    5959
    60         if ( ! in_array( $page, [ 'searchwp-modal-form', 'searchwp-forms' ], true ) ) {
     60        if ( ! in_array( $page, [ 'searchwp-modal-form', 'searchwp-forms', 'searchwp-live-search' ], true ) ) {
    6161            return false;
    6262        }
     
    6565        $view = isset( $_REQUEST['tab'] ) ? sanitize_key( $_REQUEST['tab'] ) : '';
    6666
    67         if ( $page === 'searchwp-forms' && $view !== 'search-modal' ) {
     67        if ( in_array( $page, [ 'searchwp-forms', 'searchwp-live-search' ], true ) && $view !== 'search-modal' ) {
    6868            return false;
    6969        }
  • searchwp-modal-search-form/tags/0.5.5/readme.txt

    r3246706 r3247413  
    55Tested up to: 6.5
    66Requires PHP: 7.0
    7 Stable tag: 0.5.4
     7Stable tag: 0.5.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9898== Changelog ==
    9999
     100*0.5.5*
     101- Fixes settings page appearance and menu structure when SearchWP Live Search is active.
     102
    100103*0.5.4*
    101104- Fixes Settings link location in the plugins list when SearchWP is activated.
  • searchwp-modal-search-form/tags/0.5.5/searchwp-modal-form.php

    r3246706 r3247413  
    44Plugin URI: https://searchwp.com/extensions/modal-form/
    55Description: Lightweight and accessible search form
    6 Version: 0.5.4
     6Version: 0.5.5
    77Requires PHP: 5.6
    88Author: SearchWP, LLC
     
    3838     * @since 0.1
    3939     */
    40     define( 'SEARCHWP_MODAL_FORM_VERSION', '0.5.4' );
     40    define( 'SEARCHWP_MODAL_FORM_VERSION', '0.5.5' );
    4141}
    4242
  • searchwp-modal-search-form/trunk/includes/AdminMenu.php

    r2934767 r3247413  
    3232    public function hooks() {
    3333
    34         if ( Utils::is_searchwp_active() ) {
     34        if ( Utils::is_searchwp_active() || Utils::is_live_search_active() ) {
    3535            return;
    3636        }
    3737
    38         if ( Utils::is_live_search_active() ) {
    39             $this->hooks_live_search_enabled();
    40 
    41             return;
    42         }
    43 
    4438        $this->hooks_modal_form_standalone();
    45     }
    46 
    47     /**
    48      * Hooks when Live Ajax Search is enabled.
    49      *
    50      * @since 0.5.0
    51      */
    52     private function hooks_live_search_enabled() {
    53 
    54         add_filter( 'searchwp_live_search_options_submenu_pages', [ $this, 'add_menus_live_search_enabled' ] );
    5539    }
    5640
  • searchwp-modal-search-form/trunk/includes/Settings.php

    r2934767 r3247413  
    2727
    2828        if ( Utils::is_searchwp_active() ) {
    29             $this->hooks_searchwp_enabled();
     29            $this->hooks_searchwp_enabled();
     30        } elseif ( Utils::is_live_search_active() ) {
     31            $this->hooks_live_search_enabled();
    3032        } else {
    3133            $this->hooks_searchwp_disabled();
     
    9193
    9294    /**
     95     * Hooks if Live Search is enabled.
     96     *
     97     * @since 0.5.5
     98     */
     99    private function hooks_live_search_enabled() {
     100
     101        add_filter( 'searchwp_live_search_settings_sub_header_items', [ $this, 'add_sub_header_items' ], 20 );
     102        add_action( 'searchwp_live_search_modal_form_render', [ $this, 'output' ] );
     103        add_filter( 'admin_footer_text', [ $this, 'admin_footer_rate_us_searchwp_disabled' ], 1, 2 );
     104    }
     105
     106    /**
     107     * Add the Search Modal sub header item.
     108     *
     109     * @since 0.5.5
     110     *
     111     * @param array $items The sub header items.
     112     *
     113     * @return mixed
     114     */
     115    public static function add_sub_header_items( $items ) {
     116
     117        $items['searchwp-live-search'][] = [
     118            'page'  => 'searchwp-live-search',
     119            'tab'   => 'search-modal',
     120            'label' => esc_html__( 'Search Modal', 'searchwp-modal-search-form' ),
     121        ];
     122
     123        return $items;
     124    }
     125
     126    /**
    93127     * Hooks if SearchWP is disabled.
    94128     *
     
    162196
    163197            <?php $this->output_after_settings(); ?>
    164            
     198
    165199        </div>
    166200        <?php
     
    537571        global $current_screen;
    538572
    539         if ( empty( $current_screen->id ) || strpos( $current_screen->id, 'searchwp-modal-form' ) === false ) {
     573        if ( ! Utils::is_settings_page() ) {
    540574            return $text;
    541575        }
  • searchwp-modal-search-form/trunk/includes/Utils.php

    r2934767 r3247413  
    5858        $page = isset( $_REQUEST['page'] ) ? sanitize_key( $_REQUEST['page'] ) : '';
    5959
    60         if ( ! in_array( $page, [ 'searchwp-modal-form', 'searchwp-forms' ], true ) ) {
     60        if ( ! in_array( $page, [ 'searchwp-modal-form', 'searchwp-forms', 'searchwp-live-search' ], true ) ) {
    6161            return false;
    6262        }
     
    6565        $view = isset( $_REQUEST['tab'] ) ? sanitize_key( $_REQUEST['tab'] ) : '';
    6666
    67         if ( $page === 'searchwp-forms' && $view !== 'search-modal' ) {
     67        if ( in_array( $page, [ 'searchwp-forms', 'searchwp-live-search' ], true ) && $view !== 'search-modal' ) {
    6868            return false;
    6969        }
  • searchwp-modal-search-form/trunk/readme.txt

    r3246706 r3247413  
    55Tested up to: 6.5
    66Requires PHP: 7.0
    7 Stable tag: 0.5.4
     7Stable tag: 0.5.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9898== Changelog ==
    9999
     100*0.5.5*
     101- Fixes settings page appearance and menu structure when SearchWP Live Search is active.
     102
    100103*0.5.4*
    101104- Fixes Settings link location in the plugins list when SearchWP is activated.
  • searchwp-modal-search-form/trunk/searchwp-modal-form.php

    r3246706 r3247413  
    44Plugin URI: https://searchwp.com/extensions/modal-form/
    55Description: Lightweight and accessible search form
    6 Version: 0.5.4
     6Version: 0.5.5
    77Requires PHP: 5.6
    88Author: SearchWP, LLC
     
    3838     * @since 0.1
    3939     */
    40     define( 'SEARCHWP_MODAL_FORM_VERSION', '0.5.4' );
     40    define( 'SEARCHWP_MODAL_FORM_VERSION', '0.5.5' );
    4141}
    4242
Note: See TracChangeset for help on using the changeset viewer.