Plugin Directory

Changeset 3200971


Ignore:
Timestamp:
12/02/2024 02:11:33 PM (14 months ago)
Author:
markwolters
Message:

1.4.0

Location:
wp-search-insights
Files:
92 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-search-insights/trunk/readme.txt

    r3199839 r3200971  
    55Requires at least: 4.8
    66License: GPL2
    7 Tested up to: 6.7
     7Tested up to: 6.5
    88Requires PHP: 5.6
    9 Stable tag: 1.3.9
    10 Gain valuable insights into your website's search performance and user behavior. Optimize your content based on real search data.
     9Stable tag: 1.4.0
     10Gain valuable insights into your website's search performance and user behavior. Optimize your content based on real search data and boost engagement.
    1111
    1212== Description ==
     
    2525
    2626== Improve Your WordPress Search Experience ==
     27WP Search Insights helps you improve the WordPress earch experience in the following ways:
     28
    2729= Understand Your Users' Search Behavior =
    2830By understanding what your users are searching for, you can optimize your website's content to better meet their needs. WP Search Insights provides you with the data you need to make informed decisions about your content strategy, ultimately leading to a better user experience and increased engagement.
     
    6769
    6870== Changelog ==
     71= 1.4.0 =
     72* Fixed a textdomain notification introduced in WordPress 6.7
     73
    6974= 1.3.9 =
    7075* Fixed an issue with overlapping blocks on settings page which caused the save button to disappear
  • wp-search-insights/trunk/wp-search-insights.php

    r3063875 r3200971  
    33 * Plugin Name: WP Search Insights - Privacy-Friendly Search Analytics
    44 * Plugin URI: https://www.wordpress.org/plugins/wp-search-insights
    5  * Description: Gain valuable insights into your website's search performance and user behavior. Optimize your content based on real search data.
    6  * Version: 1.3.9
     5 * Description: WP Search Insights shows you what your users are looking for on your site, and which searches don't have results
     6 * Version: 1.4.0
    77 * Text Domain: wp-search-insights
    88 * Domain Path: /languages
    99 * Author: Mark Wolters
    10  * Author URI: https://www.wpsi.io
    1110 * Requires PHP: 7.0
    1211 * Requires at least: 4.8
     12 * Author URI: https://www.wpsi.io
    1313 */
    1414
     
    3636 */
    3737if (!function_exists('wpsi_activation_check')) {
    38     function wpsi_activation_check()
    39     {
    40         if (version_compare(PHP_VERSION, '5.6', '<')) {
    41             deactivate_plugins(plugin_basename(__FILE__));
    42             wp_die(__('WP Search Insights cannot be activated. The plugin requires PHP 5.6 or higher', 'wp-search-insights'));
    43         }
     38    function wpsi_activation_check()
     39    {
     40        if (version_compare(PHP_VERSION, '5.6', '<')) {
     41            deactivate_plugins(plugin_basename(__FILE__));
     42            wp_die(__('WP Search Insights cannot be activated. The plugin requires PHP 5.6 or higher', 'wp-search-insights'));
     43        }
    4444
    45         global $wp_version;
    46         if (version_compare($wp_version, '4.6', '<')) {
    47             deactivate_plugins(plugin_basename(__FILE__));
    48             wp_die(__('WP Search Insights cannot be activated. The plugin requires WordPress 4.6 or higher', 'wp-search-insights'));
    49         }
    50     }
     45        global $wp_version;
     46        if (version_compare($wp_version, '4.6', '<')) {
     47            deactivate_plugins(plugin_basename(__FILE__));
     48            wp_die(__('WP Search Insights cannot be activated. The plugin requires WordPress 4.6 or higher', 'wp-search-insights'));
     49        }
     50    }
    5151}
    5252register_activation_hook( __FILE__, 'wpsi_activation_check' );
    5353
    5454if ( ! class_exists( 'WPSI' ) ) {
    55     class WPSI {
    56         public static $instance;
    57         public static $search;
    58         public static $admin;
    59         public static $tour;
    60         public static $review;
    61         public static $help;
    62         public static $export;
     55    class WPSI {
     56        public static $instance;
     57        public static $search;
     58        public static $admin;
     59        public static $tour;
     60        public static $review;
     61        public static $help;
     62        public static $export;
    6363
    64         private function __construct() {
    65             self::setup_constants();
    66             self::includes();
    67             self::load_translation();
     64        private function __construct() {
     65            self::setup_constants();
     66            self::includes();
    6867
    69             self::$search = new search();
     68            self::$search = new search();
    7069
    71             if ( is_admin() ) {
    72                 self::$review = new wpsi_review();
    73                 self::$admin  = new WPSI_ADMIN();
    74                 self::$export  = new WPSI_EXPORT();
    75                 self::$tour   = new wpsi_tour();
    76                 self::$help   = new wpsi_help();
    77             }
     70            if ( is_admin() ) {
     71                self::$review = new wpsi_review();
     72                self::$admin  = new WPSI_ADMIN();
     73                self::$export  = new WPSI_EXPORT();
     74                self::$tour   = new wpsi_tour();
     75                self::$help   = new wpsi_help();
     76            }
    7877
    79             self::hooks();
    80         }
     78            self::hooks();
     79        }
    8180
    82         /**
    83         * Instantiate the class.
    84         *
    85         * @return WPSI
    86         * @since 1.0.0
    87         *
    88         */
    89         public static function get_instance() {
    90             if ( ! isset( self::$instance )
    91                  && ! ( self::$instance instanceof WPSI )
    92             ) {
    93                 self::$instance = new self();
    94             }
     81        /**
     82        * Instantiate the class.
     83        *
     84        * @return WPSI
     85        * @since 1.0.0
     86        *
     87        */
     88        public static function get_instance() {
     89            if ( ! isset( self::$instance )
     90                && ! ( self::$instance instanceof WPSI )
     91            ) {
     92                self::$instance = new self();
     93            }
    9594
    96             return self::$instance;
    97         }
     95            return self::$instance;
     96        }
    9897
    99         private function setup_constants() {
    100             define( 'wpsi_url', plugin_dir_url( __FILE__ ) );
    101             define( 'wpsi_path',
    102                 trailingslashit( plugin_dir_path( __FILE__ ) ) );
    103             define( 'wpsi_plugin', plugin_basename( __FILE__ ) );
    104             define( 'wpsi_plugin_file', __FILE__ );
     98        private function setup_constants() {
     99            define( 'wpsi_url', plugin_dir_url( __FILE__ ) );
     100            define( 'wpsi_path',
     101                trailingslashit( plugin_dir_path( __FILE__ ) ) );
     102            define( 'wpsi_plugin', plugin_basename( __FILE__ ) );
     103            define( 'wpsi_plugin_file', __FILE__ );
    105104
    106             require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    107             $plugin_data = get_plugin_data( __FILE__ );
    108             $debug       = defined( "WP_DEBUG" ) && WP_DEBUG ? time() : "";
    109             define( 'wpsi_version',
    110                 $plugin_data['Version'] . $debug );
    111         }
     105            define( 'wpsi_version', '1.4.0');
     106        }
    112107
    113         private function includes() {
    114             if ( is_admin() ) {
    115                 require_once( wpsi_path . 'upgrade.php' );
    116                 require_once( wpsi_path . 'class-admin.php' );
    117                 require_once( wpsi_path . 'class-export.php' );
    118                 require_once( wpsi_path . 'dashboard_tabs.php' );
    119                 require_once( wpsi_path . 'class-help.php' );
    120                 require_once( wpsi_path . 'class-review.php' );
    121                 require_once( wpsi_path . 'shepherd/tour.php' );
    122                 require_once( wpsi_path . 'grid/grid-enqueue.php' );
    123             }
    124             require_once( wpsi_path . 'class-search.php' );
    125             require_once( wpsi_path . 'integrations/integrations.php' );
    126         }
     108        private function includes() {
     109            if ( is_admin() ) {
     110                require_once( wpsi_path . 'upgrade.php' );
     111                require_once( wpsi_path . 'class-admin.php' );
     112                require_once( wpsi_path . 'class-export.php' );
     113                require_once( wpsi_path . 'dashboard_tabs.php' );
     114                require_once( wpsi_path . 'class-help.php' );
     115                require_once( wpsi_path . 'class-review.php' );
     116                require_once( wpsi_path . 'shepherd/tour.php' );
     117                require_once( wpsi_path . 'grid/grid-enqueue.php' );
     118            }
     119            require_once( wpsi_path . 'class-search.php' );
     120            require_once( wpsi_path . 'integrations/integrations.php' );
     121        }
    127122
    128         /**
    129          * Load plugin translations.
    130          *
    131          * @return void
    132          * @since 1.0.0
    133          *
    134          */
    135         private function load_translation() {
    136             load_plugin_textdomain( 'wp-search-insights', false,
    137                 wpsi_path . '/languages/' );
    138         }
     123        /**
     124         * Get directory of free plugin
     125         * @return string
     126         */
    139127
    140         /**
    141          * Get directory of free plugin
    142          * @return string
    143          */
     128        public static function get_actual_directory_name() {
     129            return basename( __DIR__ );
     130        }
    144131
    145         public static function get_actual_directory_name() {
    146             return basename( __DIR__ );
    147         }
     132        private function hooks() {
    148133
    149         private function hooks() {
     134        }
     135    }
    150136
    151         }
    152     }
    153 
    154     /**
    155      * Load the plugins main class.
    156      */
    157     add_action(
    158         'plugins_loaded',
    159         function () {
    160             WPSI::get_instance();
    161         },
    162         9
    163     );
     137    /**
     138     * Load the plugins main class.
     139     */
     140    add_action(
     141        'plugins_loaded',
     142        function () {
     143            WPSI::get_instance();
     144        },
     145        9
     146    );
    164147}
    165148
    166149function search_insights_activation_hook() {
    167     update_option( 'wpsi_min_term_length', 0 );
    168     update_option( 'wpsi_max_term_length', 50 );
    169     update_option( 'wpsi_select_dashboard_capability', 'activate_plugins' );
     150    update_option( 'wpsi_min_term_length', 0 );
     151    update_option( 'wpsi_max_term_length', 50 );
     152    update_option( 'wpsi_select_dashboard_capability', 'activate_plugins' );
    170153    update_option( 'wpsi_select_term_deletion_period', 'never' );
    171154}
     
    175158
    176159function wpsi_clear_scheduled_hooks(){
    177     wp_clear_scheduled_hook( 'wpsi_every_five_minutes_hook' );
     160    wp_clear_scheduled_hook( 'wpsi_every_five_minutes_hook' );
    178161}
    179162register_deactivation_hook( __FILE__, 'wpsi_clear_scheduled_hooks' );
Note: See TracChangeset for help on using the changeset viewer.