Plugin Directory

Changeset 3468483


Ignore:
Timestamp:
02/24/2026 09:51:47 AM (5 weeks ago)
Author:
catchthemes
Message:

Catch Sticky Menu

  • Bug Fixed: Fixed JS enqueue path for adding catch themes tab item in Themes add theme section
  • Bug Fixed: WordPress.Security.EscapeOutput.OutputNotEscaped
  • Bug Fixed: missing_direct_file_access_protection
  • Bug Fixed: WordPress.WP.I18n.TextDomainMismatch
  • Bug Fixed: plugin_header_invalid_plugin_uri
  • Compatibility check up to version 6.9
Location:
catch-sticky-menu
Files:
54 added
13 edited

Legend:

Unmodified
Added
Removed
  • catch-sticky-menu/trunk/README.txt

    r3292536 r3468483  
    44Tags: sticky, sticky-menu, fixed, navigation
    55Requires at least: 5.9
    6 Tested up to: 6.8
    7 Stable tag: trunk
     6Tested up to: 6.9
     7Stable tag: 1.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4141
    4242== Changelog ==
     43
     44= 1.8 (Released: February 24, 2026) =
     45* Bug Fixed: Fixed JS enqueue path for adding catch themes tab item in Themes add theme section
     46* Bug Fixed: WordPress.Security.EscapeOutput.OutputNotEscaped
     47* Bug Fixed: missing_direct_file_access_protection
     48* Bug Fixed: WordPress.WP.I18n.TextDomainMismatch
     49* Bug Fixed: plugin_header_invalid_plugin_uri
     50* Compatibility check up to version 6.9
    4351
    4452= 1.7.5 (Released: May 13, 2025) =
  • catch-sticky-menu/trunk/admin/class-catch-sticky-menu-admin.php

    r2489093 r3468483  
    11<?php
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
     5
    26
    37/**
     
    1115 */
    1216
    13 /**
    14  * The admin-specific functionality of the plugin.
    15  *
    16  * Defines the plugin name, version, and two examples hooks for how to
    17  * enqueue the admin-specific stylesheet and JavaScript.
    18  *
    19  * @package    Catch_Sticky_Menu
    20  * @subpackage Catch_Sticky_Menu/admin
    21  * @author     Catch Plugins <www.catchplugins.com>
    22  */
    23 class Catch_Sticky_Menu_Admin {
     17class Catch_Sticky_Menu_Admin
     18{
    2419
    2520    /**
     
    4843     * @param      string    $version    The version of this plugin.
    4944     */
    50     public function __construct( $plugin_name, $version ) {
     45    public function __construct($plugin_name, $version)
     46    {
    5147
    5248        $this->plugin_name = $plugin_name;
    5349        $this->version     = $version;
    54 
    5550    }
    5651
     
    6055     * @since    1.0.0
    6156     */
    62     public function enqueue_styles() {
     57    public function enqueue_styles()
     58    {
    6359
    6460        /**
     
    7369         * class.
    7470         */
    75        
    76         if( isset( $_GET['page'] ) && 'catch-sticky-menu' == $_GET['page'] ) {
    77             wp_enqueue_style( $this->plugin_name. '-display-dashboard', plugin_dir_url( __FILE__ ) . 'css/catch-sticky-menu-admin.css', array(), $this->version, 'all' );
    78         }
    79 }
     71
     72        if (isset($_GET['page']) && 'catch-sticky-menu' == $_GET['page']) {
     73            wp_enqueue_style($this->plugin_name . '-display-dashboard', plugin_dir_url(__FILE__) . 'css/catch-sticky-menu-admin.css', array(), $this->version, 'all');
     74        }
     75    }
    8076    /**
    8177     * Register the JavaScript for the admin area.
     
    8379     * @since    1.0.0
    8480     */
    85     public function enqueue_scripts() {
     81    public function enqueue_scripts()
     82    {
    8683
    8784        /**
     
    9794         */
    9895
    99         if ( isset( $_GET['page'] ) && 'catch-sticky-menu' == $_GET['page'] ) {
    100             wp_enqueue_script( 'matchHeight', plugin_dir_url( __FILE__ ) . 'js/jquery-matchHeight.min.js', array( 'jquery' ), $this->version, false );
    101             wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/catch-sticky-menu-admin.js', array( 'jquery', 'matchHeight', 'jquery-ui-tooltip' ), $this->version, false );
    102              wp_enqueue_script( 'catch-sticky-menu-color-picker', plugin_dir_url( __FILE__ ) . 'js/wp-color-picker.js', array( 'wp-color-picker', 'jquery' ), $this->version, false );
    103         }
    104 
     96        if (isset($_GET['page']) && 'catch-sticky-menu' == $_GET['page']) {
     97            wp_enqueue_script('matchHeight', plugin_dir_url(__FILE__) . 'js/jquery-matchHeight.min.js', array('jquery'), $this->version, false);
     98            wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/catch-sticky-menu-admin.js', array('jquery', 'matchHeight', 'jquery-ui-tooltip'), $this->version, false);
     99            wp_enqueue_script('catch-sticky-menu-color-picker', plugin_dir_url(__FILE__) . 'js/wp-color-picker.js', array('wp-color-picker', 'jquery'), $this->version, false);
     100        }
    105101    }
    106102
     
    113109     * @param arrray $file File name.
    114110     */
    115     public function action_links( $links, $file ) {
    116         if ( $file === $this->plugin_name . '/' . $this->plugin_name . '.php' ) {
    117             $settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=catch-sticky-menu' ) ) . '">' . esc_html__( 'Settings', 'catch-sticky-menu' ) . '</a>';
    118 
    119             array_unshift( $links, $settings_link );
     111    public function action_links($links, $file)
     112    {
     113        if ($file === $this->plugin_name . '/' . $this->plugin_name . '.php') {
     114            $settings_link = '<a href="' . esc_url(admin_url('admin.php?page=catch-sticky-menu')) . '">' . esc_html__('Settings', 'catch-sticky-menu') . '</a>';
     115
     116            array_unshift($links, $settings_link);
    120117        }
    121118        return $links;
    122119    }
    123120
    124     public function add_plugin_settings_menu() {
     121    public function add_plugin_settings_menu()
     122    {
    125123        add_menu_page(
    126             esc_html__( 'Catch Sticky Menu', 'catch-sticky-menu' ), // $page_title.
    127             esc_html__( 'Catch Sticky Menu', 'catch-sticky-menu' ), // $menu_title.
     124            esc_html__('Catch Sticky Menu', 'catch-sticky-menu'), // $page_title.
     125            esc_html__('Catch Sticky Menu', 'catch-sticky-menu'), // $menu_title.
    128126            'manage_options', // $capability.
    129127            'catch-sticky-menu', // $menu_slug.
    130             array( $this, 'settings_page' ), // $callback_function.
     128            array($this, 'settings_page'), // $callback_function.
    131129            'dashicons-pressthis', // $icon_url.
    132130            '99.01564' // $position.
     
    134132        add_submenu_page(
    135133            'catch-sticky-menu', // $parent_slug.
    136             esc_html__( 'Catch Sticky Menu', 'catch-sticky-menu' ), // $page_title.
    137             esc_html__( 'Settings', 'catch-sticky-menu' ), // $menu_title.
     134            esc_html__('Catch Sticky Menu', 'catch-sticky-menu'), // $page_title.
     135            esc_html__('Settings', 'catch-sticky-menu'), // $menu_title.
    138136            'manage_options', // $capability.
    139137            'catch-sticky-menu', // $menu_slug.
    140             array( $this,'settings_page' ) // $callback_function.
     138            array($this, 'settings_page') // $callback_function.
    141139        );
    142140    }
    143141
    144142
    145     public function settings_page() {
    146         if ( ! current_user_can( 'manage_options' ) ) {
    147             wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'catch-sticky-menu' ) );
    148         }
    149         require plugin_dir_path( __FILE__ ) . 'partials/catch-sticky-menu-admin-display.php';
    150     }
    151 
    152     public function register_settings() {
     143    public function settings_page()
     144    {
     145        if (! current_user_can('manage_options')) {
     146            wp_die(esc_html__('You do not have sufficient permissions to access this page.', 'catch-sticky-menu'));
     147        }
     148        require plugin_dir_path(__FILE__) . 'partials/catch-sticky-menu-admin-display.php';
     149    }
     150
     151    public function register_settings()
     152    {
    153153        register_setting(
    154154            'catch-sticky-menu-group',
    155155            'catch_sticky_menu_options',
    156             array( $this, 'sanitize_callback' )
     156            array($this, 'sanitize_callback')
    157157        );
    158158    }
    159159
    160     public function sanitize_callback( $input ) {
    161         if ( isset( $input['reset'] ) && $input['reset'] ) {
     160    public function sanitize_callback($input)
     161    {
     162        if (isset($input['reset']) && $input['reset']) {
    162163            //If reset, restore defaults
    163164            return catch_sticky_menu_default_options();
     
    167168
    168169        // Verify the nonce before proceeding.
    169         if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
    170             || ( ! isset( $_POST['catch_sticky_menu_nounce'] )
    171             || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['catch_sticky_menu_nounce'] ) ), basename( __FILE__ ) ) )
    172             || ( ! check_admin_referer( basename( __FILE__ ), 'catch_sticky_menu_nounce' ) ) ) {
    173             if ( null !== $input ) {
    174 
    175                     $input['status']                       = ( isset( $input['status'] ) && '1' == $input['status'] ) ? '1' : '0';
    176                     if ( isset( $input['sticky_desktop_menu_selector'] ) ) {
    177                     $input['sticky_desktop_menu_selector'] = sanitize_text_field( $input['sticky_desktop_menu_selector'] );
    178                     }
    179                     if ( isset( $input['sticky_mobile_menu_selector'] ) ) {
    180                     $input['sticky_mobile_menu_selector']  = sanitize_text_field( $input['sticky_mobile_menu_selector'] );
    181                     }
    182                     if ( isset( $input['sticky_background_color'] ) && $input['sticky_background_color'] ) {
    183                     $input['sticky_background_color']      = sanitize_hex_color( $input['sticky_background_color'] );
    184                     }
    185                     if ( isset( $input['sticky_text_color'] ) && $input['sticky_text_color'] ) {
    186                     $input['sticky_text_color']            = sanitize_hex_color( $input['sticky_text_color'] );
    187                     }
    188                     if ( isset( $input['sticky_z_index'] ) && $input['sticky_z_index'] ) {
    189                     $input['sticky_z_index']               = intval( $input['sticky_z_index'] );
    190                     }
    191                     if ( isset( $input['sticky_opacity'] ) && $input['sticky_opacity'] ) {
    192                     $input['sticky_opacity']               = floatval( $input['sticky_opacity'] );
    193                     }
    194                     if ( isset( $input['enable_only_on_home'] ) && $input['enable_only_on_home'] ) {
    195                     $input['enable_only_on_home']          = sanitize_key( $input['enable_only_on_home'] );
    196                     }
    197                
    198                 return $input;
    199             }
    200             return 'Invalid Nonce';
    201         }
    202     }
    203     function add_plugin_meta_links( $meta_fields, $file ){
    204         if( CATCH_STICKY_MENU_BASENAME == $file ) {
     170        if ((defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
     171            || (! isset($_POST['catch_sticky_menu_nounce'])
     172                || ! wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['catch_sticky_menu_nounce'])), basename(__FILE__)))
     173            || (! check_admin_referer(basename(__FILE__), 'catch_sticky_menu_nounce'))
     174        ) {
     175            if (null !== $input) {
     176
     177                $input['status']                       = (isset($input['status']) && '1' == $input['status']) ? '1' : '0';
     178                if (isset($input['sticky_desktop_menu_selector'])) {
     179                    $input['sticky_desktop_menu_selector'] = sanitize_text_field($input['sticky_desktop_menu_selector']);
     180                }
     181                if (isset($input['sticky_mobile_menu_selector'])) {
     182                    $input['sticky_mobile_menu_selector']  = sanitize_text_field($input['sticky_mobile_menu_selector']);
     183                }
     184                if (isset($input['sticky_background_color']) && $input['sticky_background_color']) {
     185                    $input['sticky_background_color']      = sanitize_hex_color($input['sticky_background_color']);
     186                }
     187                if (isset($input['sticky_text_color']) && $input['sticky_text_color']) {
     188                    $input['sticky_text_color']            = sanitize_hex_color($input['sticky_text_color']);
     189                }
     190                if (isset($input['sticky_z_index']) && $input['sticky_z_index']) {
     191                    $input['sticky_z_index']               = intval($input['sticky_z_index']);
     192                }
     193                if (isset($input['sticky_opacity']) && $input['sticky_opacity']) {
     194                    $input['sticky_opacity']               = floatval($input['sticky_opacity']);
     195                }
     196                if (isset($input['enable_only_on_home']) && $input['enable_only_on_home']) {
     197                    $input['enable_only_on_home']          = sanitize_key($input['enable_only_on_home']);
     198                }
     199
     200                return $input;
     201            }
     202            return 'Invalid Nonce';
     203        }
     204    }
     205    function add_plugin_meta_links($meta_fields, $file)
     206    {
     207        if (CATCH_STICKY_MENU_BASENAME == $file) {
    205208            $meta_fields[] = "<a href='https://catchplugins.com/support-forum/forum/catch-sticky-menu/' target='_blank'>Support Forum</a>";
    206209            $meta_fields[] = "<a href='https://wordpress.org/support/plugin/catch-sticky-menu/reviews/#new-post' target='_blank' title='Rate'>
    207210                    <i class='ct-rate-stars'>"
    208               . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
    209               . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
    210               . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
    211               . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
    212               . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
    213               . "</i></a>";
     211                . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
     212                . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
     213                . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
     214                . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
     215                . "<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"
     216                . "</i></a>";
    214217
    215218            $stars_color = "#ffb900";
    216219
    217220            echo "<style>"
    218                 . ".ct-rate-stars{display:inline-block;color:" . $stars_color . ";position:relative;top:3px;}"
    219                 . ".ct-rate-stars svg{fill:" . $stars_color . ";}"
    220                 . ".ct-rate-stars svg:hover{fill:" . $stars_color . "}"
     221                . ".ct-rate-stars{display:inline-block;color:" . esc_html($stars_color) . ";position:relative;top:3px;}"
     222                . ".ct-rate-stars svg{fill:" . esc_html($stars_color) . ";}"
     223                . ".ct-rate-stars svg:hover{fill:" . esc_html($stars_color) . "}"
    221224                . ".ct-rate-stars svg:hover ~ svg{fill:none;}"
    222225                . "</style>";
     
    226229    }
    227230}
    228 
  • catch-sticky-menu/trunk/admin/partials/catch-sticky-menu-admin-display.php

    r2600962 r3468483  
    11<?php
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
    25
    36/**
     
    1619<!-- This file should primarily consist of HTML with a little bit of PHP. -->
    1720<div class="wrap">
    18     <h1 class="wp-heading-inline"><?php esc_html_e( 'Catch Sticky Menu', 'catch-sticky-menu' );?></h1>
     21    <h1 class="wp-heading-inline"><?php esc_html_e('Catch Sticky Menu', 'catch-sticky-menu'); ?></h1>
    1922    <div id="plugin-description">
    20         <p><?php esc_html_e( 'Lets you display Sticky Menu anywhere on your website elegantly.', 'catch-sticky-menu' ); ?></p>
     23        <p><?php esc_html_e('Lets you display Sticky Menu anywhere on your website elegantly.', 'catch-sticky-menu'); ?></p>
    2124    </div>
    2225    <div class="catchp-content-wrapper">
     
    2427            <form id="sticky-main" method="post" action="options.php">
    2528                <h2 class="nav-tab-wrapper">
    26                     <a class="nav-tab nav-tab-active" id="dashboard-tab" href="#dashboard"><?php esc_html_e( 'Dashboard', 'catch-sticky-menu' ); ?></a>
    27                     <a class="nav-tab" id="features-tab" href="#features"><?php esc_html_e( 'Features', 'catch-sticky-menu' ); ?></a>
     29                    <a class="nav-tab nav-tab-active" id="dashboard-tab" href="#dashboard"><?php esc_html_e('Dashboard', 'catch-sticky-menu'); ?></a>
     30                    <a class="nav-tab" id="features-tab" href="#features"><?php esc_html_e('Features', 'catch-sticky-menu'); ?></a>
    2831
    2932                </h2>
    3033                <div id="dashboard" class="wpcatchtab nosave active">
    31                     <?php require_once plugin_dir_path( dirname( __FILE__ ) ) . 'partials/dashboard-display.php';?>
    32                   <div id="ctp-switch" class="content-wrapper col-3 catch-sticky-menu-main">
     34                    <?php require_once plugin_dir_path(dirname(__FILE__)) . 'partials/dashboard-display.php'; ?>
     35                    <div id="ctp-switch" class="content-wrapper col-3 catch-sticky-menu-main">
    3336                        <div class="header">
    34                             <h2><?php esc_html_e( 'Catch Themes & Catch Plugins Tabs', 'catch-sticky-menu' ); ?></h2>
     37                            <h2><?php esc_html_e('Catch Themes & Catch Plugins Tabs', 'catch-sticky-menu'); ?></h2>
    3538                        </div> <!-- .Header -->
    3639
    3740                        <div class="content">
    3841
    39                             <p><?php echo esc_html__( 'If you want to turn off Catch Themes & Catch Plugins tabs option in Add Themes and Add Plugins page, please uncheck the following option.', 'catch-sticky-menu' ); ?>
     42                            <p><?php echo esc_html__('If you want to turn off Catch Themes & Catch Plugins tabs option in Add Themes and Add Plugins page, please uncheck the following option.', 'catch-sticky-menu'); ?>
    4043                            </p>
    4144                            <table>
    4245                                <tr>
    4346                                    <td>
    44                                         <?php echo esc_html__( 'Turn On Catch Themes & Catch Plugin tabs', 'catch-sticky-menu' );  ?>
     47                                        <?php echo esc_html__('Turn On Catch Themes & Catch Plugin tabs', 'catch-sticky-menu');  ?>
    4548                                    </td>
    4649                                    <td>
     
    4851                                        <div class="module-header <?php echo $ctp_options['theme_plugin_tabs'] ? 'active' : 'inactive'; ?>">
    4952                                            <div class="switch">
    50                                                 <input type="hidden" name="ctp_tabs_nonce" id="ctp_tabs_nonce" value="<?php echo esc_attr( wp_create_nonce( 'ctp_tabs_nonce' ) ); ?>" />
    51                                                 <input type="checkbox" id="ctp_options[theme_plugin_tabs]" class="ctp-switch" rel="theme_plugin_tabs" <?php checked( true, $ctp_options['theme_plugin_tabs'] ); ?> >
     53                                                <input type="hidden" name="ctp_tabs_nonce" id="ctp_tabs_nonce" value="<?php echo esc_attr(wp_create_nonce('ctp_tabs_nonce')); ?>" />
     54                                                <input type="checkbox" id="ctp_options[theme_plugin_tabs]" class="ctp-switch" rel="theme_plugin_tabs" <?php checked(true, $ctp_options['theme_plugin_tabs']); ?>>
    5255                                                <label for="ctp_options[theme_plugin_tabs]"></label>
    5356                                            </div>
     
    6568                    <div class="content-wrapper col-3">
    6669                        <div class="header">
    67                             <h3><?php esc_html_e( 'Features', 'catch-sticky-menu' );?></h3>
     70                            <h3><?php esc_html_e('Features', 'catch-sticky-menu'); ?></h3>
    6871                        </div><!-- .header -->
    6972                        <div class="content">
    7073                            <ul class="catchp-lists">
    71                                <li>
    72                                     <strong><?php esc_html_e( 'Menu Selector', 'catch-sticky-menu' ); ?></strong>
    73                                     <p><?php esc_html_e( 'Catch Sticky Menu empowers you with Menu Selector (for desktop and mobile). A basic knowledge of HTMl/CSS is required as you need to pick the right selector for the element you want to make sticky. You can pick which element of your website to make sticky from the Inspect Element option. You can select the sticky element for desktop and mobile menu selector, separately.', 'catch-sticky-menu' ); ?></p>
     74                                <li>
     75                                    <strong><?php esc_html_e('Menu Selector', 'catch-sticky-menu'); ?></strong>
     76                                    <p><?php esc_html_e('Catch Sticky Menu empowers you with Menu Selector (for desktop and mobile). A basic knowledge of HTMl/CSS is required as you need to pick the right selector for the element you want to make sticky. You can pick which element of your website to make sticky from the Inspect Element option. You can select the sticky element for desktop and mobile menu selector, separately.', 'catch-sticky-menu'); ?></p>
    7477                                </li>
    7578
    7679                                <li>
    77                                     <strong><?php esc_html_e( 'Sticky Background Color', 'catch-sticky-menu' ); ?></strong>
    78                                     <p><?php esc_html_e( 'Background colors play an important role when you’re trying to highlight something. Likewise, we’ve added the option to select the background color for your sticky menu. Select the background color from the unlimited color palette that best suits your website and its design to make your sticky menu stand out!', 'catch-sticky-menu' ); ?></p>
     80                                    <strong><?php esc_html_e('Sticky Background Color', 'catch-sticky-menu'); ?></strong>
     81                                    <p><?php esc_html_e('Background colors play an important role when you’re trying to highlight something. Likewise, we’ve added the option to select the background color for your sticky menu. Select the background color from the unlimited color palette that best suits your website and its design to make your sticky menu stand out!', 'catch-sticky-menu'); ?></p>
    7982                                </li>
    8083                                <li>
    81                                     <strong><?php esc_html_e( 'Sticky Z Index', 'catch-sticky-menu' ); ?></strong>
    82                                     <p><?php esc_html_e( 'Catch Sticky Menu supports Z Index option. You can add a sticky Z index easily if there are other elements on the page that hide or peek through your sticky element.', 'catch-sticky-menu' ); ?></p>
     84                                    <strong><?php esc_html_e('Sticky Z Index', 'catch-sticky-menu'); ?></strong>
     85                                    <p><?php esc_html_e('Catch Sticky Menu supports Z Index option. You can add a sticky Z index easily if there are other elements on the page that hide or peek through your sticky element.', 'catch-sticky-menu'); ?></p>
    8386                                </li>
    8487                                <li>
    85                                     <strong><?php esc_html_e( 'Sticky Opacity', 'catch-sticky-menu' ); ?></strong>
    86                                     <p><?php esc_html_e( 'With the Sticky Opacity option available in Catch Sticky Menu, you can select the opacity level of your sticky menu. The more you decrease the opacity level, the more faded your sticky menu will look. You can select the opacity as per your preference.', 'catch-sticky-menu' ); ?></p>
     88                                    <strong><?php esc_html_e('Sticky Opacity', 'catch-sticky-menu'); ?></strong>
     89                                    <p><?php esc_html_e('With the Sticky Opacity option available in Catch Sticky Menu, you can select the opacity level of your sticky menu. The more you decrease the opacity level, the more faded your sticky menu will look. You can select the opacity as per your preference.', 'catch-sticky-menu'); ?></p>
    8790                                </li>
    8891                                <li>
    89                                     <strong><?php esc_html_e( 'Enable on Homepage only', 'catch-sticky-menu' ); ?></strong>
    90                                     <p><?php esc_html_e( 'You can stick the menu either on the Homepage of your website only or on the entire website. Your sticky menu is enabled on the entire website by default. And if you want the sticky menu to be displayed only on the Homepage, checkmark the tiny box right next to the option.', 'catch-sticky-menu' ); ?></p>
     92                                    <strong><?php esc_html_e('Enable on Homepage only', 'catch-sticky-menu'); ?></strong>
     93                                    <p><?php esc_html_e('You can stick the menu either on the Homepage of your website only or on the entire website. Your sticky menu is enabled on the entire website by default. And if you want the sticky menu to be displayed only on the Homepage, checkmark the tiny box right next to the option.', 'catch-sticky-menu'); ?></p>
    9194                                </li>
    9295                                <li>
    93                                     <strong><?php esc_html_e( 'Lightweight', 'catch-sticky-menu' ); ?></strong>
    94                                     <p><?php esc_html_e( 'Catch Sticky Menu, a simple sticky menu plugin for WordPress is extremely lightweight. It means you will not have to worry about your website getting slower because of the plugin.', 'catch-sticky-menu' ); ?></p>
     96                                    <strong><?php esc_html_e('Lightweight', 'catch-sticky-menu'); ?></strong>
     97                                    <p><?php esc_html_e('Catch Sticky Menu, a simple sticky menu plugin for WordPress is extremely lightweight. It means you will not have to worry about your website getting slower because of the plugin.', 'catch-sticky-menu'); ?></p>
    9598                                </li>
    9699                                <li>
    97                                     <strong><?php esc_html_e( 'Responsive Design', 'catch-sticky-menu' ); ?></strong>
    98                                     <p><?php esc_html_e( 'Catch Sticky Menu, our new WordPress plugin for sticky menu comes with a responsive design, which means the sticky menu trails will look elegant on all devices.', 'catch-sticky-menu' ); ?></p>
     100                                    <strong><?php esc_html_e('Responsive Design', 'catch-sticky-menu'); ?></strong>
     101                                    <p><?php esc_html_e('Catch Sticky Menu, our new WordPress plugin for sticky menu comes with a responsive design, which means the sticky menu trails will look elegant on all devices.', 'catch-sticky-menu'); ?></p>
    99102                                </li>
    100103                                <li>
    101                                     <strong><?php esc_html_e( 'Compatible with all WordPress Themes', 'catch-sticky-menu' ); ?></strong>
    102                                     <p><?php esc_html_e( 'Catch Sticky menu has been crafted in a way that supports all the themes on WordPress. The plugin functions smoothly on any WordPress theme.', 'catch-sticky-menu' ); ?></p>
     104                                    <strong><?php esc_html_e('Compatible with all WordPress Themes', 'catch-sticky-menu'); ?></strong>
     105                                    <p><?php esc_html_e('Catch Sticky menu has been crafted in a way that supports all the themes on WordPress. The plugin functions smoothly on any WordPress theme.', 'catch-sticky-menu'); ?></p>
    103106                                </li>
    104107                                <li>
    105                                     <strong><?php esc_html_e( 'Incredible Support', 'catch-sticky-menu' ); ?></strong>
    106                                     <p><?php esc_html_e( 'We have a great line of support team and support documentation. You do not need to worry about how to use the plugins we provide, just refer to our Tech Support Forum. Further, if you need to do advanced customization to your website, you can always hire our customizer!', 'catch-sticky-menu' ); ?></p>
     108                                    <strong><?php esc_html_e('Incredible Support', 'catch-sticky-menu'); ?></strong>
     109                                    <p><?php esc_html_e('We have a great line of support team and support documentation. You do not need to worry about how to use the plugins we provide, just refer to our Tech Support Forum. Further, if you need to do advanced customization to your website, you can always hire our customizer!', 'catch-sticky-menu'); ?></p>
    107110                                </li>
    108111                            </ul>
     
    113116            </form><!-- sticky-main -->
    114117        </div><!-- .catchp_widget_settings -->
    115         <?php require_once plugin_dir_path(dirname(__FILE__) ) .'/partials/sidebar.php';?>
     118        <?php require_once plugin_dir_path(dirname(__FILE__)) . '/partials/sidebar.php'; ?>
    116119    </div><!---catch-content-wrapper---->
    117 <?php require_once plugin_dir_path( dirname( __FILE__ ) ) . '/partials/footer.php'; ?>
     120    <?php require_once plugin_dir_path(dirname(__FILE__)) . '/partials/footer.php'; ?>
    118121</div><!-- .wrap -->
  • catch-sticky-menu/trunk/admin/partials/dashboard-display.php

    r2142849 r3468483  
    11<?php
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
    25
    36/**
     
    1720    <div class="content-wrapper">
    1821        <div class="header">
    19             <h2><?php esc_html_e( 'Settings', 'catch-sticky-menu' ); ?></h2>
     22            <h2><?php esc_html_e('Settings', 'catch-sticky-menu'); ?></h2>
    2023        </div> <!-- .Header -->
    2124        <div class="content">
    22             <?php if( isset($_GET['settings-updated']) ) { ?>
    23             <div id="message" class="notice updated fade">
    24                 <p><strong><?php esc_html_e( 'Plugin Options Saved.', 'catch-sticky-menu' ) ?></strong></p>
    25             </div>
     25            <?php if (isset($_GET['settings-updated'])) { ?>
     26                <div id="message" class="notice updated fade">
     27                    <p><strong><?php esc_html_e('Plugin Options Saved.', 'catch-sticky-menu') ?></strong></p>
     28                </div>
    2629            <?php } ?>
    2730            <?php // Use nonce for verification.
    28                 wp_nonce_field( basename( __FILE__ ), 'catch_sticky_menu_nounce' );
     31            wp_nonce_field(basename(__FILE__), 'catch_sticky_menu_nounce');
    2932            ?>
    3033            <div id="sticky_main">
    3134                <form method="post" action="options.php">
    32                     <?php settings_fields( 'catch-sticky-menu-group' ); ?>
     35                    <?php settings_fields('catch-sticky-menu-group'); ?>
    3336                    <?php
    34                     $defaults =catch_sticky_menu_default_options();
     37                    $defaults = catch_sticky_menu_default_options();
    3538                    $settings = catch_sticky_menu_get_options();
    3639                    ?>
    3740                    <div class="option-container">
    38                         <table class="form-table" bgcolor="white">
     41                        <table class="form-table" bgcolor="white">
    3942                            <tbody>
    4043                                <tr>
    4144                                    <th>
    42                                         <label><?php esc_html_e( ' Desktop Menu Selector', 'catch-sticky-menu' ); ?></label>
     45                                        <label><?php esc_html_e(' Desktop Menu Selector', 'catch-sticky-menu'); ?></label>
    4346                                    </th>
    4447                                    <td>
    45                                         <input type="text" name="catch_sticky_menu_options[sticky_desktop_menu_selector]" id="sticky-desktop-menu-selector" class="sticky-desktop-menu-selector"  value="<?php echo esc_attr($settings['sticky_desktop_menu_selector']); ?>"/>
    46                                         <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e( 'Sticky Menu will be displayed just before this selector.', 'catch-sticky-menu' ); ?>"></span>
     48                                        <input type="text" name="catch_sticky_menu_options[sticky_desktop_menu_selector]" id="sticky-desktop-menu-selector" class="sticky-desktop-menu-selector" value="<?php echo esc_attr($settings['sticky_desktop_menu_selector']); ?>" />
     49                                        <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Sticky Menu will be displayed just before this selector.', 'catch-sticky-menu'); ?>"></span>
    4750                                    </td>
    4851                                </tr>
    49                                
     52
    5053                                <tr>
    5154                                    <th>
    52                                         <label><?php esc_html_e( ' Mobile Menu Selector', 'catch-sticky-menu' ); ?></label>
     55                                        <label><?php esc_html_e(' Mobile Menu Selector', 'catch-sticky-menu'); ?></label>
    5356                                    </th>
    5457                                    <td>
    55                                         <input type="text" name="catch_sticky_menu_options[sticky_mobile_menu_selector]" id="sticky-mobile-menu-selector" class="sticky-mobile-menu-selector"  value="<?php echo esc_attr($settings['sticky_mobile_menu_selector']); ?>"/>
    56                                         <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e( 'Sticky Menu will be displayed just before this selector (in mobile).', 'catch-sticky-menu' ); ?>"></span>
     58                                        <input type="text" name="catch_sticky_menu_options[sticky_mobile_menu_selector]" id="sticky-mobile-menu-selector" class="sticky-mobile-menu-selector" value="<?php echo esc_attr($settings['sticky_mobile_menu_selector']); ?>" />
     59                                        <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Sticky Menu will be displayed just before this selector (in mobile).', 'catch-sticky-menu'); ?>"></span>
    5760                                    </td>
    5861                                </tr>
    59                                
    60                            
     62
     63
     64                                <th>
     65                                    <label><?php esc_html_e('Sticky Background Color', 'catch-sticky-menu'); ?></label>
     66                                </th>
     67                                <td>
     68                                    <input type="text" name="catch_sticky_menu_options[sticky_background_color]" id="sticky-background-color" class="color-picker" data-alpha="true" value="<?php echo esc_attr($settings['sticky_background_color']); ?>" />
     69                                </td>
     70                                </tr>
     71                                </tr>
     72
     73
     74                                <th>
     75                                    <label><?php esc_html_e('Sticky Menu Text Color', 'catch-sticky-menu'); ?></label>
     76                                </th>
     77                                <td>
     78                                    <input type="text" name="catch_sticky_menu_options[sticky_text_color]" id="sticky-text-color" class="color-picker" data-alpha="true" value="<?php echo esc_attr($settings['sticky_text_color']); ?>" />
     79                                </td>
     80                                </tr>
     81
     82
     83                                <tr>
    6184                                    <th>
    62                                         <label><?php esc_html_e( 'Sticky Background Color', 'catch-sticky-menu' ); ?></label>
     85                                        <label><?php esc_html_e('Sticky Z index', 'catch-sticky-menu'); ?></label>
    6386                                    </th>
    6487                                    <td>
    65                                         <input type="text" name="catch_sticky_menu_options[sticky_background_color]" id="sticky-background-color" class="color-picker" data-alpha="true" value="<?php echo esc_attr( $settings['sticky_background_color'] ); ?>"/>
    66                                     </td>
    67                                 </tr>
    68                                 </tr>
    69                                
    70                            
    71                                     <th>
    72                                         <label><?php esc_html_e( 'Sticky Menu Text Color', 'catch-sticky-menu' ); ?></label>
    73                                     </th>
    74                                     <td>
    75                                         <input type="text" name="catch_sticky_menu_options[sticky_text_color]" id="sticky-text-color" class="color-picker" data-alpha="true" value="<?php echo esc_attr( $settings['sticky_text_color'] ); ?>"/>
    76                                     </td>
    77                                 </tr>
    78                                
    79                                
    80                                 <tr>
    81                                     <th>
    82                                         <label><?php esc_html_e( 'Sticky Z index', 'catch-sticky-menu' ); ?></label>
    83                                     </th>
    84                                     <td>
    85                                         <input type="number"min="-100" max="2147483647" step="1"  name="catch_sticky_menu_options[sticky_z_index]" id="sticky-z-index" class="color-z-index" data-alpha="true" value="<?php echo esc_attr( $settings['sticky_z_index'] ); ?>"/><span class="dashicons dashicons-info tooltip" title="<?php esc_html_e( 'Sticky z-index helps to set the stack order of the element. An element with greater stack order is always in front.', 'catch-sticky-menu' ); ?>"></span>
    86                                     </td>
    87                                 </tr>
    88                                 <tr>
    89                                     <th>
    90                                         <label><?php esc_html_e( 'Sticky Opacity', 'catch-sticky-menu' ); ?></label>
    91                                     </th>
    92                                     <td>
    93                                         <input type="number" min="0" max="1" step="0.1"   name="catch_sticky_menu_options[sticky_opacity]" id="sticky-opacity" class="color-opacity" data-alpha="true" value="<?php echo esc_attr( $settings['sticky_opacity'] ); ?>"/><span class="dashicons dashicons-info tooltip" title="<?php esc_html_e( 'Sticky Opacity helps to set the  transparency-level, 1 is not transparent at all where as 0 is completely transparent.', 'catch-sticky-menu' ); ?>"></span>
    94                                     </td>
    95                                 </tr>
    96                                 <tr>
    97                                     <th>
    98                                         <label><?php esc_html_e( 'Desktop Font Size', 'catch-sticky-menu' ); ?></label>
    99                                     </th>
    100                                     <td>
    101                                         <input type="number" name="catch_sticky_menu_options[sticky_desktop_font_size]" id="sticky-text-font-size" placeholder="12px" class="sticky-desktop-font-size numbers-only" value="<?php echo esc_attr( $settings['sticky_desktop_font_size'] ); ?>"/>
    102                                         <span class="add-on"><?php esc_html_e( 'px', 'catch-sticky-menu' ); ?></span>
    103                                         <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e( 'Sets your desired font size to desktop menu text. Default is set to null, and takes theme\'s font size.', 'catch-sticky-menu' ); ?>"></span>
     88                                        <input type="number" min="-100" max="2147483647" step="1" name="catch_sticky_menu_options[sticky_z_index]" id="sticky-z-index" class="color-z-index" data-alpha="true" value="<?php echo esc_attr($settings['sticky_z_index']); ?>" /><span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Sticky z-index helps to set the stack order of the element. An element with greater stack order is always in front.', 'catch-sticky-menu'); ?>"></span>
    10489                                    </td>
    10590                                </tr>
    10691                                <tr>
    10792                                    <th>
    108                                         <label><?php esc_html_e( 'Mobile Font Size', 'catch-sticky-menu' ); ?></label>
     93                                        <label><?php esc_html_e('Sticky Opacity', 'catch-sticky-menu'); ?></label>
    10994                                    </th>
    11095                                    <td>
    111                                         <input type="number" name="catch_sticky_menu_options[sticky_mobile_font_size]" id="sticky-mobile-font-size" placeholder="1em" step="0.1" class="sticky-mobile-font-size numbers-only" value="<?php echo esc_attr( $settings['sticky_mobile_font_size'] ); ?>"/>
    112                                         <span class="add-on"><?php esc_html_e( 'em', 'catch-sticky-menu' ); ?></span>
    113                                         <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e( 'Sets your desired font size to mobile menu text. Default is set to null, and takes theme\'s font size.', 'catch-sticky-menu' ); ?>"></span>
     96                                        <input type="number" min="0" max="1" step="0.1" name="catch_sticky_menu_options[sticky_opacity]" id="sticky-opacity" class="color-opacity" data-alpha="true" value="<?php echo esc_attr($settings['sticky_opacity']); ?>" /><span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Sticky Opacity helps to set the  transparency-level, 1 is not transparent at all where as 0 is completely transparent.', 'catch-sticky-menu'); ?>"></span>
    11497                                    </td>
    11598                                </tr>
    116                                 <tr>
    117                                     <th scope="row"><?php _e( 'Enable Only On Home Page', 'catch-sticky-menu' ); ?></th>
     99                                <tr>
     100                                    <th>
     101                                        <label><?php esc_html_e('Desktop Font Size', 'catch-sticky-menu'); ?></label>
     102                                    </th>
    118103                                    <td>
    119                                         <?php $text   =   ( ! empty ( $settings['enable_only_on_home'] ) && $settings['enable_only_on_home'] ) ? 'checked' : '';
    120                                         echo '<input type="checkbox" ' . $text . ' name="catch_sticky_menu_options[enable_only_on_home]" value="1"/>' . esc_html__( 'Check to enable', 'catch-sticky-menu' );
    121                                         ?>
    122                                         <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e( 'Checking this option will display sticky menu on homepage/frontpage.', 'catch-sticky-menu' ); ?>"></span>
     104                                        <input type="number" name="catch_sticky_menu_options[sticky_desktop_font_size]" id="sticky-text-font-size" placeholder="12px" class="sticky-desktop-font-size numbers-only" value="<?php echo esc_attr($settings['sticky_desktop_font_size']); ?>" />
     105                                        <span class="add-on"><?php esc_html_e('px', 'catch-sticky-menu'); ?></span>
     106                                        <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Sets your desired font size to desktop menu text. Default is set to null, and takes theme\'s font size.', 'catch-sticky-menu'); ?>"></span>
    123107                                    </td>
    124108                                </tr>
    125                                
    126                                
    127109                                <tr>
    128                                     <th scope="row"><?php esc_html_e( 'Reset Options', 'catch-sticky-menu' ); ?></th>
    129                                     <td>
    130                                         <?php
    131                                             echo '<input name="catch_sticky_menu_options[reset]" id="catch_sticky_menu_options[reset]" type="checkbox" value="1" class="catch_sticky_menu_options[reset]" />' . esc_html__( 'Check to reset', 'catch-sticky-menu' );
    132                                         ?>
    133                                         <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e( 'Caution: Reset all settings to default.', 'catch-sticky-menu' ); ?>"></span>
    134                                     </td>
    135                                 </tr>
     110                                    <th>
     111                                        <label><?php esc_html_e('Mobile Font Size', 'catch-sticky-menu'); ?></label>
     112                                    </th>
     113                                    <td>
     114                                        <input type="number" name="catch_sticky_menu_options[sticky_mobile_font_size]" id="sticky-mobile-font-size" placeholder="1em" step="0.1" class="sticky-mobile-font-size numbers-only" value="<?php echo esc_attr($settings['sticky_mobile_font_size']); ?>" />
     115                                        <span class="add-on"><?php esc_html_e('em', 'catch-sticky-menu'); ?></span>
     116                                        <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Sets your desired font size to mobile menu text. Default is set to null, and takes theme\'s font size.', 'catch-sticky-menu'); ?>"></span>
     117                                    </td>
     118                                </tr>
     119                                <tr>
     120                                    <th scope="row"><?php esc_html_e('Enable Only On Home Page', 'catch-sticky-menu'); ?></th>
     121                                    <td>
     122                                        <?php $text   =   (! empty($settings['enable_only_on_home']) && $settings['enable_only_on_home']) ? 'checked' : '';
     123                                        echo '<input type="checkbox" ' . esc_attr($text) . ' name="catch_sticky_menu_options[enable_only_on_home]" value="1"/>' . esc_html__('Check to enable', 'catch-sticky-menu');
     124                                        ?>
     125                                        <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Checking this option will display sticky menu on homepage/frontpage.', 'catch-sticky-menu'); ?>"></span>
     126                                    </td>
     127                                </tr>
     128
     129
     130                                <tr>
     131                                    <th scope="row"><?php esc_html_e('Reset Options', 'catch-sticky-menu'); ?></th>
     132                                    <td>
     133                                        <?php
     134                                        echo '<input name="catch_sticky_menu_options[reset]" id="catch_sticky_menu_options[reset]" type="checkbox" value="1" class="catch_sticky_menu_options[reset]" />' . esc_html__('Check to reset', 'catch-sticky-menu');
     135                                        ?>
     136                                        <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Caution: Reset all settings to default.', 'catch-sticky-menu'); ?>"></span>
     137                                    </td>
     138                                </tr>
    136139                            </tbody>
    137140                        </table>
    138                         <?php submit_button( esc_html__( 'Save Changes', 'catch-sticky-menu' ) ); ?>
     141                        <?php submit_button(esc_html__('Save Changes', 'catch-sticky-menu')); ?>
    139142                    </div><!-- .option-container -->
    140143                </form>
  • catch-sticky-menu/trunk/admin/partials/footer.php

    r1976181 r3468483  
     1<?php
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
     5
     6?>
    17<!-- Footer -->
    28<div class="catchp-footer">
    39    <div class="catchp-footer-site-info">
    4         <a href="<?php echo esc_url( 'https://catchplugins.com/' ); ?>" target="_blank"><?php esc_html_e( 'Catch Plugins', 'catch-sticky-menu' ); ?></a>
     10        <a href="<?php echo esc_url('https://catchplugins.com/'); ?>" target="_blank"><?php esc_html_e('Catch Plugins', 'catch-sticky-menu'); ?></a>
    511    </div>
    612
    713    <div class="catchp-footer-menu">
    814        <ul>
    9             <li><a href="<?php echo esc_url( 'https://catchthemes.com/themes/category/premium/' ); ?>" target="_blank"><?php esc_html_e( 'View Themes', 'catch-sticky-menu' ); ?></a></li>
    10             <li><a href="<?php echo esc_url( 'https://catchplugins.com/plugins/' ); ?>" target="_blank"><?php esc_html_e( 'View Plugins', 'catch-sticky-menu' ); ?></a></li>
    11             <li><a href="<?php echo esc_url( 'https://catchplugins.com/support/' ); ?>" target="_blank"><?php esc_html_e( 'Support', 'catch-sticky-menu' ); ?></a></li>
     15            <li><a href="<?php echo esc_url('https://catchthemes.com/themes/category/premium/'); ?>" target="_blank"><?php esc_html_e('View Themes', 'catch-sticky-menu'); ?></a></li>
     16            <li><a href="<?php echo esc_url('https://catchplugins.com/plugins/'); ?>" target="_blank"><?php esc_html_e('View Plugins', 'catch-sticky-menu'); ?></a></li>
     17            <li><a href="<?php echo esc_url('https://catchplugins.com/support/'); ?>" target="_blank"><?php esc_html_e('Support', 'catch-sticky-menu'); ?></a></li>
    1218        </ul>
    1319    </div>
  • catch-sticky-menu/trunk/admin/partials/sidebar.php

    r1976181 r3468483  
     1<?php
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
     5
     6?>
    17<div class="catchp-widget-sidebar" id="sidebar-container">
    28    <div id="sidebar">
    3         <div class="catch-sidebar-title highlighted"><?php esc_html_e( 'Recommendations', 'catch-sticky-menu' ); ?></div>
    4        
     9        <div class="catch-sidebar-title highlighted"><?php esc_html_e('Recommendations', 'catch-sticky-menu'); ?></div>
     10
    511        <div class="catchp-sidebar-spot-wrapper">
    612            <div class="catchp-sidebar-spot">
    713                <div class="sidebar-spot-inner">
    8                     <h3><?php esc_html_e( 'Premium Themes', 'catch-sticky-menu' ); ?></h3>
    9                     <p><?php esc_html_e( 'Check out our simple, clean and responsive Premium WordPress Themes that come with an array of crucial features with a superior functionality.', 'catch-sticky-menu' ); ?> <a target="_blank" href="https://catchthemes.com/themes/category/premium/"><?php esc_html_e( 'Check our premium themes.', 'catch-sticky-menu' ); ?></a></p>
    10                     <a class="catch-banner-link" target="_blank" href="https://catchthemes.com/themes/category/premium/"><img class="catch-banner-image" src="<?php echo esc_url( plugins_url( 'images/premium-theme-246x175.jpg', dirname(__FILE__) ) ) ; ?>" alt="catch" width="246" height="175"></a>
     14                    <h3><?php esc_html_e('Premium Themes', 'catch-sticky-menu'); ?></h3>
     15                    <p><?php esc_html_e('Check out our simple, clean and responsive Premium WordPress Themes that come with an array of crucial features with a superior functionality.', 'catch-sticky-menu'); ?> <a target="_blank" href="https://catchthemes.com/themes/category/premium/"><?php esc_html_e('Check our premium themes.', 'catch-sticky-menu'); ?></a></p>
     16                    <a class="catch-banner-link" target="_blank" href="https://catchthemes.com/themes/category/premium/"><img class="catch-banner-image" src="<?php echo esc_url(plugins_url('images/premium-theme-246x175.jpg', dirname(__FILE__))); ?>" alt="catch" width="246" height="175"></a>
    1117                </div>
    1218            </div>
    1319            <div class="catchp-sidebar-spot">
    1420                <div class="sidebar-spot-inner">
    15                     <h3><?php esc_html_e( 'Free Themes', 'catch-sticky-menu' ); ?></h3>
    16                     <p><?php esc_html_e( 'Check out our collection of Free WordPress Themes that are clean, simple and feature-rich.', 'catch-sticky-menu' ); ?> <a target="_blank" href="https://catchthemes.com/themes/category/free/"><?php esc_html_e( 'Check our free themes.', 'catch-sticky-menu' ); ?></a></p>
    17                     <a class="catch-banner-link" target="_blank" href="https://catchthemes.com/themes/category/free/"><img class="catch-banner-image" src="<?php echo esc_url( plugins_url( 'images/free-theme-246x175.jpg', dirname(__FILE__) ) ) ; ?>" alt="catch" width="246" height="175"></a>
     21                    <h3><?php esc_html_e('Free Themes', 'catch-sticky-menu'); ?></h3>
     22                    <p><?php esc_html_e('Check out our collection of Free WordPress Themes that are clean, simple and feature-rich.', 'catch-sticky-menu'); ?> <a target="_blank" href="https://catchthemes.com/themes/category/free/"><?php esc_html_e('Check our free themes.', 'catch-sticky-menu'); ?></a></p>
     23                    <a class="catch-banner-link" target="_blank" href="https://catchthemes.com/themes/category/free/"><img class="catch-banner-image" src="<?php echo esc_url(plugins_url('images/free-theme-246x175.jpg', dirname(__FILE__))); ?>" alt="catch" width="246" height="175"></a>
    1824                </div>
    1925            </div>
    2026            <div class="catchp-sidebar-spot">
    2127                <div class="sidebar-spot-inner">
    22                     <h3><?php esc_html_e( 'Premium Plugins', 'catch-sticky-menu' ); ?></h3>
    23                     <p><?php esc_html_e( 'Check out our secured Premium WordPress Plugins to enhance and add extra functionalities to your website. An exceptional way to get the most out of WordPress!', 'catch-sticky-menu' ); ?> <a target="_blank" href="https://catchplugins.com/plugins/tag/pro/"><?php esc_html_e( 'Check our premium plugins.', 'catch-sticky-menu' ); ?></a></p>
     28                    <h3><?php esc_html_e('Premium Plugins', 'catch-sticky-menu'); ?></h3>
     29                    <p><?php esc_html_e('Check out our secured Premium WordPress Plugins to enhance and add extra functionalities to your website. An exceptional way to get the most out of WordPress!', 'catch-sticky-menu'); ?> <a target="_blank" href="https://catchplugins.com/plugins/tag/pro/"><?php esc_html_e('Check our premium plugins.', 'catch-sticky-menu'); ?></a></p>
    2430                    <a class="catch-banner-link" target="_blank" href="https://catchplugins.com/plugins/tag/pro/">
    25                         <img class="catch-banner-image" src="<?php echo esc_url( plugins_url( 'images/premium-plugin-246x116.png', dirname(__FILE__) ) ) ; ?>" alt="catch" width="246" height="116"></a>
     31                        <img class="catch-banner-image" src="<?php echo esc_url(plugins_url('images/premium-plugin-246x116.png', dirname(__FILE__))); ?>" alt="catch" width="246" height="116"></a>
    2632                </div>
    2733            </div>
     
    2935            <div class="catchp-sidebar-spot">
    3036                <div class="sidebar-spot-inner">
    31                     <h3><?php esc_html_e( 'Free Plugins', 'catch-sticky-menu' ); ?></h3>
    32                     <p><?php esc_html_e( 'Check out our Free WordPress Plugins and get the taste of our service without affecting your wallet.', 'catch-sticky-menu' ); ?>
    33                     <a target="_blank" href="https://catchplugins.com/plugins/tag/free/"><?php esc_html_e( 'check our free plugins.', 'catch-sticky-menu' ); ?></a></p>
     37                    <h3><?php esc_html_e('Free Plugins', 'catch-sticky-menu'); ?></h3>
     38                    <p><?php esc_html_e('Check out our Free WordPress Plugins and get the taste of our service without affecting your wallet.', 'catch-sticky-menu'); ?>
     39                        <a target="_blank" href="https://catchplugins.com/plugins/tag/free/"><?php esc_html_e('check our free plugins.', 'catch-sticky-menu'); ?></a>
     40                    </p>
    3441                    <a class="catch-banner-link" target="_blank" href="https://catchplugins.com/plugins/tag/free/">
    35                     <img class="catch-banner-image" src="<?php echo esc_url( plugins_url( 'images/free-plugin-246x116.png', dirname(__FILE__) ) ) ; ?>" alt="catch" width="246" height="116"></a>
     42                        <img class="catch-banner-image" src="<?php echo esc_url(plugins_url('images/free-plugin-246x116.png', dirname(__FILE__))); ?>" alt="catch" width="246" height="116"></a>
    3643                </div>
    3744            </div>
  • catch-sticky-menu/trunk/catch-sticky-menu.php

    r3292536 r3468483  
    1515 * @wordpress-plugin
    1616 * Plugin Name:       Catch Sticky Menu
    17  * Plugin URI:        catchplugins.com/plugins/catch-sticky-menu
     17 * Plugin URI:        https://catchplugins.com/plugins/catch-sticky-menu
    1818 * Description:       Catch Sticky Menu is a lightweight, simple yet feature-rich free WordPress plugin for sticky menu that allows you to lock the menu (or any other element) on your website. Prevent your menu from disappearing when users scroll down the page!
    19  * Version:           1.7.5
     19 * Version:           1.8
    2020 * Author:            Catch Plugins
    21  * Author URI:        catchplugins.com
     21 * Author URI:        https://catchplugins.com
    2222 * License:           GPL-2.0+
    2323 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    2727
    2828// If this file is called directly, abort.
    29 if ( ! defined( 'WPINC' ) ) {
     29if (! defined('WPINC')) {
    3030    die;
    3131}
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'CATCH_STICKY_MENU_VERSION', '1.7.5' );
     38if ( ! defined( 'CATCH_STICKY_MENU_VERSION' ) ) {
     39    define( 'CATCH_STICKY_MENU_VERSION', '1.8' );
     40}
    3941
    4042/**
     
    4345 */
    4446// The URL of the directory that contains the plugin
    45 if ( ! defined( 'CATCH_STICKY_MENU_URL' ) ) {
    46     define( 'CATCH_STICKY_MENU_URL', plugin_dir_url( __FILE__ ) );
     47if (! defined('CATCH_STICKY_MENU_URL')) {
     48    define('CATCH_STICKY_MENU_URL', plugin_dir_url(__FILE__));
    4749}
    4850
    4951
    5052// The absolute path of the directory that contains the file
    51 if ( ! defined( 'CATCH_STICKY_MENU_PATH' ) ) {
    52     define( 'CATCH_STICKY_MENU_PATH', plugin_dir_path( __FILE__ ) );
     53if (! defined('CATCH_STICKY_MENU_PATH')) {
     54    define('CATCH_STICKY_MENU_PATH', plugin_dir_path(__FILE__));
    5355}
    5456
    5557
    5658// Gets the path to a plugin file or directory, relative to the plugins directory, without the leading and trailing slashes.
    57 if ( ! defined( 'CATCH_STICKY_MENU_BASENAME' ) ) {
    58     define( 'CATCH_STICKY_MENU_BASENAME', plugin_basename( __FILE__ ) );
     59if (! defined('CATCH_STICKY_MENU_BASENAME')) {
     60    define('CATCH_STICKY_MENU_BASENAME', plugin_basename(__FILE__));
    5961}
    6062
    61 function activate_catch_sticky_menu() {
    62     require_once plugin_dir_path( __FILE__ ) . 'includes/class-catch-sticky-menu-activator.php';
     63function activate_catch_sticky_menu()
     64{
     65    require_once plugin_dir_path(__FILE__) . 'includes/class-catch-sticky-menu-activator.php';
    6366    Catch_Sticky_Menu_Activator::activate();
    6467}
     
    6871 * This action is documented in includes/class-catch-sticky-menu-deactivator.php
    6972 */
    70 function deactivate_catch_sticky_menu() {
    71     require_once plugin_dir_path( __FILE__ ) . 'includes/class-catch-sticky-menu-deactivator.php';
     73function deactivate_catch_sticky_menu()
     74{
     75    require_once plugin_dir_path(__FILE__) . 'includes/class-catch-sticky-menu-deactivator.php';
    7276    Catch_Sticky_Menu_Deactivator::deactivate();
    7377}
    7478
    75 register_activation_hook( __FILE__, 'activate_catch_sticky_menu' );
    76 register_deactivation_hook( __FILE__, 'deactivate_catch_sticky_menu' );
     79register_activation_hook(__FILE__, 'activate_catch_sticky_menu');
     80register_deactivation_hook(__FILE__, 'deactivate_catch_sticky_menu');
    7781
    7882/**
     
    8084 * admin-specific hooks, and public-facing site hooks.
    8185 */
    82 require plugin_dir_path( __FILE__ ) . 'includes/class-catch-sticky-menu.php';
     86require plugin_dir_path(__FILE__) . 'includes/class-catch-sticky-menu.php';
    8387
    8488/**
     
    9195 * @since    1.0.0
    9296 */
    93 function sticky_menu_sanitize_checkbox( $checked ) {
     97function sticky_menu_sanitize_checkbox($checked)
     98{
    9499    // Boolean check.
    95     return ( ( isset( $checked ) && true == $checked ) ? true : false );
     100    return ((isset($checked) && true == $checked) ? true : false);
    96101}
    97102
    98 if ( ! function_exists( 'catch_sticky_menu_get_options' ) ) :
    99     function catch_sticky_menu_get_options() {
     103if (! function_exists('catch_sticky_menu_get_options')) :
     104    function catch_sticky_menu_get_options()
     105    {
    100106        $defaults = catch_sticky_menu_default_options();
    101         $options  = get_option( 'catch_sticky_menu_options', $defaults );
    102         return wp_parse_args( $options, $defaults );
     107        $options  = get_option('catch_sticky_menu_options', $defaults);
     108        return wp_parse_args($options, $defaults);
    103109    }
    104110endif;
    105111
    106112
    107 if ( ! function_exists( 'catch_sticky_menu_default_options' ) ) :
     113if (! function_exists('catch_sticky_menu_default_options')) :
    108114    /**
    109115     * Return array of default options
     
    112118     * @return    array    default options.
    113119     */
    114     function catch_sticky_menu_default_options( $option = null ) {
     120    function catch_sticky_menu_default_options($option = null)
     121    {
    115122        $default_options = array(
    116123            'sticky_desktop_menu_selector' => '#primary-menu',
     
    125132        );
    126133
    127         if ( current_theme_supports( 'catch-sticky-menu' ) ) {
    128             $catch_sticky_menu_support = get_theme_support( 'catch-sticky-menu' );
     134        if (current_theme_supports('catch-sticky-menu')) {
     135            $catch_sticky_menu_support = get_theme_support('catch-sticky-menu');
    129136
    130             $default_options['sticky_desktop_menu_selector'] = isset( $catch_sticky_menu_support[0]['sticky_desktop_menu_selector'] ) ? $catch_sticky_menu_support[0]['sticky_desktop_menu_selector'] : '';
    131             $default_options['sticky_mobile_menu_selector']  = isset( $catch_sticky_menu_support[0]['sticky_mobile_menu_selector'] ) ? $catch_sticky_menu_support[0]['sticky_mobile_menu_selector'] : '';
    132             $default_options['sticky_background_color']      = isset( $catch_sticky_menu_support[0]['sticky_background_color'] ) ? $catch_sticky_menu_support[0]['sticky_background_color'] : '';
    133             $default_options['sticky_text_color']            = isset( $catch_sticky_menu_support[0]['sticky_text_color'] ) ? $catch_sticky_menu_support[0]['sticky_text_color'] : '';
    134 
     137            $default_options['sticky_desktop_menu_selector'] = isset($catch_sticky_menu_support[0]['sticky_desktop_menu_selector']) ? $catch_sticky_menu_support[0]['sticky_desktop_menu_selector'] : '';
     138            $default_options['sticky_mobile_menu_selector']  = isset($catch_sticky_menu_support[0]['sticky_mobile_menu_selector']) ? $catch_sticky_menu_support[0]['sticky_mobile_menu_selector'] : '';
     139            $default_options['sticky_background_color']      = isset($catch_sticky_menu_support[0]['sticky_background_color']) ? $catch_sticky_menu_support[0]['sticky_background_color'] : '';
     140            $default_options['sticky_text_color']            = isset($catch_sticky_menu_support[0]['sticky_text_color']) ? $catch_sticky_menu_support[0]['sticky_text_color'] : '';
    135141        }
    136142
    137         if ( null == $option ) {
    138             return apply_filters( 'catch_sticky_menu_options', $default_options );
     143        if (null == $option) {
     144            return apply_filters('catch_sticky_menu_options', $default_options);
    139145        } else {
    140             return $default_options[ $option ];
     146            return $default_options[$option];
    141147        }
    142148    }
    143149endif; // sticky_menu_default_options
    144150
    145 function run_catch_sticky_menu() {
     151function run_catch_sticky_menu()
     152{
    146153
    147154    $plugin = new Catch_Sticky_Menu();
    148155    $plugin->run();
    149 
    150156}
    151157run_catch_sticky_menu();
    152158/* CTP tabs removal options */
    153 require plugin_dir_path( __FILE__ ) . '/includes/ctp-tabs-removal.php';
     159require plugin_dir_path(__FILE__) . '/includes/ctp-tabs-removal.php';
    154160
    155  $ctp_options = ctp_get_options();
    156 if ( 1 == $ctp_options['theme_plugin_tabs'] ) {
     161$ctp_options = ctp_get_options();
     162if (1 == $ctp_options['theme_plugin_tabs']) {
    157163    /* Adds Catch Themes tab in Add theme page and Themes by Catch Themes in Customizer's change theme option. */
    158     if ( ! class_exists( 'CatchThemesThemePlugin' ) && ! function_exists( 'add_our_plugins_tab' ) ) {
    159         require plugin_dir_path( __FILE__ ) . '/includes/CatchThemesThemePlugin.php';
     164    if (! class_exists('CatchThemesThemePlugin') && ! function_exists('add_our_plugins_tab')) {
     165        require plugin_dir_path(__FILE__) . '/includes/CatchThemesThemePlugin.php';
    160166    }
    161167}
  • catch-sticky-menu/trunk/includes/CatchThemesThemePlugin.php

    r2489093 r3468483  
    11<?php
    22
    3 class CatchThemesThemePlugin {
    4     public function __construct() {
    5         remove_action( 'wp_ajax_query-themes', array( $this, 'wp_ajax_query_themes' ), 1 );
    6         add_action( 'wp_ajax_query-themes', array( $this, 'wp_ajax_custom_query_themes' ), 1 );
    7 
    8         add_action( 'admin_enqueue_scripts', array( $this, 'our_themes_script' ) );
    9 
    10         if ( ! is_multisite() ) {
    11             add_action( 'customize_register', array( $this, 'customize_register' ) );
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
     5
     6class CatchThemesThemePlugin
     7{
     8    public function __construct()
     9    {
     10        remove_action('wp_ajax_query-themes', array($this, 'wp_ajax_query_themes'), 1);
     11        add_action('wp_ajax_query-themes', array($this, 'wp_ajax_custom_query_themes'), 1);
     12
     13        add_action('admin_enqueue_scripts', array($this, 'our_themes_script'));
     14
     15        if (! is_multisite()) {
     16            add_action('customize_register', array($this, 'customize_register'));
    1217        }
    1318
    1419        global $wp_customize;
    15         remove_action( 'wp_ajax_customize_load_themes', array( $wp_customize, 'handle_load_themes_request' ) );
    16         add_action( 'wp_ajax_customize_load_themes', array( $this, 'handle_load_themes_request' ) );
    17 
    18         add_filter( 'install_plugins_tabs', array( $this, 'add_our_plugins_tab' ), 1 );
    19         add_filter( 'install_plugins_table_api_args_catchplugins', array( $this, 'catchplugins' ), 1 );
    20         add_action( 'install_plugins_catchplugins', array( $this, 'plugins_table' ) );
     20        remove_action('wp_ajax_customize_load_themes', array($wp_customize, 'handle_load_themes_request'));
     21        add_action('wp_ajax_customize_load_themes', array($this, 'handle_load_themes_request'));
     22
     23        add_filter('install_plugins_tabs', array($this, 'add_our_plugins_tab'), 1);
     24        add_filter('install_plugins_table_api_args_catchplugins', array($this, 'catchplugins'), 1);
     25        add_action('install_plugins_catchplugins', array($this, 'plugins_table'));
    2126    }
    2227
     
    3035     * @global array $theme_field_defaults
    3136     */
    32     public function wp_ajax_custom_query_themes() {
     37    public function wp_ajax_custom_query_themes()
     38    {
    3339        global $themes_allowedtags, $theme_field_defaults;
    3440
    35         if ( ! current_user_can( 'install_themes' ) ) {
     41        if (! current_user_can('install_themes')) {
    3642            wp_send_json_error();
    3743        }
    3844
    3945        $args = wp_parse_args(
    40             wp_unslash( $_REQUEST['request'] ),
     46            wp_unslash($_REQUEST['request']),
    4147            array(
    4248                'per_page' => 20,
     
    5056        );
    5157
    52         if ( isset( $args['browse'] ) && 'catchthemes' === $args['browse'] && ! isset( $args['user'] ) ) {
     58        if (isset($args['browse']) && 'catchthemes' === $args['browse'] && ! isset($args['user'])) {
    5359            $args['author'] = 'catchthemes';
    54             unset( $args['browse'] );
    55         }
    56 
    57         if ( isset( $args['browse'] ) && 'favorites' === $args['browse'] && ! isset( $args['user'] ) ) {
    58             $user = get_user_option( 'wporg_favorites' );
    59             if ( $user ) {
     60            unset($args['browse']);
     61        }
     62
     63        if (isset($args['browse']) && 'favorites' === $args['browse'] && ! isset($args['user'])) {
     64            $user = get_user_option('wporg_favorites');
     65            if ($user) {
    6066                $args['user'] = $user;
    6167            }
    6268        }
    6369
    64         $old_filter = isset( $args['browse'] ) ? $args['browse'] : 'search';
     70        $old_filter = isset($args['browse']) ? $args['browse'] : 'search';
    6571
    6672        /** This filter is documented in wp-admin/includes/class-wp-theme-install-list-table.php */
    67         $args = apply_filters( 'install_themes_table_api_args_' . $old_filter, $args );
    68 
    69         $api = themes_api( 'query_themes', $args );
    70 
    71         if ( is_wp_error( $api ) ) {
     73        $args = apply_filters('install_themes_table_api_args_' . $old_filter, $args);
     74
     75        $api = themes_api('query_themes', $args);
     76
     77        if (is_wp_error($api)) {
    7278            wp_send_json_error();
    7379        }
    7480
    75         $update_php = network_admin_url( 'update.php?action=install-theme' );
    76         foreach ( $api->themes as &$theme ) {
     81        $update_php = network_admin_url('update.php?action=install-theme');
     82        foreach ($api->themes as &$theme) {
    7783            $theme->install_url = add_query_arg(
    7884                array(
    7985                    'theme'    => $theme->slug,
    80                     '_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ),
     86                    '_wpnonce' => wp_create_nonce('install-theme_' . $theme->slug),
    8187                ),
    8288                $update_php
    8389            );
    8490
    85             if ( current_user_can( 'switch_themes' ) ) {
    86                 if ( is_multisite() ) {
     91            if (current_user_can('switch_themes')) {
     92                if (is_multisite()) {
    8793                    $theme->activate_url = add_query_arg(
    8894                        array(
    8995                            'action'   => 'enable',
    90                             '_wpnonce' => wp_create_nonce( 'enable-theme_' . $theme->slug ),
     96                            '_wpnonce' => wp_create_nonce('enable-theme_' . $theme->slug),
    9197                            'theme'    => $theme->slug,
    9298                        ),
    93                         network_admin_url( 'themes.php' )
     99                        network_admin_url('themes.php')
    94100                    );
    95101                } else {
     
    97103                        array(
    98104                            'action'     => 'activate',
    99                             '_wpnonce'   => wp_create_nonce( 'switch-theme_' . $theme->slug ),
     105                            '_wpnonce'   => wp_create_nonce('switch-theme_' . $theme->slug),
    100106                            'stylesheet' => $theme->slug,
    101107                        ),
    102                         admin_url( 'themes.php' )
     108                        admin_url('themes.php')
    103109                    );
    104110                }
    105111            }
    106112
    107             if ( ! is_multisite() && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
     113            if (! is_multisite() && current_user_can('edit_theme_options') && current_user_can('customize')) {
    108114                $theme->customize_url = add_query_arg(
    109115                    array(
    110                         'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ),
     116                        'return' => urlencode(network_admin_url('theme-install.php', 'relative')),
    111117                    ),
    112                     wp_customize_url( $theme->slug )
     118                    wp_customize_url($theme->slug)
    113119                );
    114120            }
    115121
    116             $theme->name        = wp_kses( $theme->name, $themes_allowedtags );
    117             $theme->author      = wp_kses( $theme->author['display_name'], $themes_allowedtags );
    118             $theme->version     = wp_kses( $theme->version, $themes_allowedtags );
    119             $theme->description = wp_kses( $theme->description, $themes_allowedtags );
     122            $theme->name        = wp_kses($theme->name, $themes_allowedtags);
     123            $theme->author      = wp_kses($theme->author['display_name'], $themes_allowedtags);
     124            $theme->version     = wp_kses($theme->version, $themes_allowedtags);
     125            $theme->description = wp_kses($theme->description, $themes_allowedtags);
    120126
    121127            $theme->stars = wp_star_rating(
     
    128134            );
    129135
    130             $theme->num_ratings    = number_format_i18n( $theme->num_ratings );
    131             $theme->preview_url    = set_url_scheme( $theme->preview_url );
    132             $theme->compatible_wp  = is_wp_version_compatible( $theme->requires );
    133             $theme->compatible_php = is_php_version_compatible( $theme->requires_php );
    134 
    135         }
    136 
    137         wp_send_json_success( $api );
    138     }
    139 
    140     public function our_themes_script( $hook_suffix ) {
    141 
    142         if ( 'theme-install.php' === $hook_suffix ) {
    143             wp_enqueue_script( 'our-themes-script', plugin_dir_url( __FILE__ ) . '../js/our-themes.js', array( 'jquery' ), '2018-05-16' );
     136            $theme->num_ratings    = number_format_i18n($theme->num_ratings);
     137            $theme->preview_url    = set_url_scheme($theme->preview_url);
     138            $theme->compatible_wp  = is_wp_version_compatible($theme->requires);
     139            $theme->compatible_php = is_php_version_compatible($theme->requires_php);
     140        }
     141
     142        wp_send_json_success($api);
     143    }
     144
     145    public function our_themes_script($hook_suffix)
     146    {
     147
     148        if ('theme-install.php' === $hook_suffix) {
     149            wp_enqueue_script('our-themes-script', plugin_dir_url(__FILE__) . '../admin/js/our-themes.js', array('jquery'), '2018-05-16');
    144150        }
    145151    }
    146152
    147153    /* Add Catch Themes Section in Theme in Customizer */
    148     public function customize_register( $wp_customize ) {
     154    public function customize_register($wp_customize)
     155    {
    149156        $wp_customize->add_section(
    150157            new WP_Customize_Themes_Section(
     
    152159                'catchthemes',
    153160                array(
    154                     'title'      => __( 'Themes by CatchThemes', 'catch-themes-demo-import' ),
     161                    'title'      => __('Themes by CatchThemes', 'catch-sticky-menu'),
    155162                    'action'     => 'catchthemes',
    156163                    'capability' => 'install_themes',
     
    170177     * @since 4.9.0
    171178     */
    172     public function handle_load_themes_request() {
    173         check_ajax_referer( 'switch_themes', 'nonce' );
    174         if ( ! current_user_can( 'switch_themes' ) ) {
    175             wp_die( -1 );
    176         }
    177 
    178         if ( empty( $_POST['theme_action'] ) ) {
    179             wp_send_json_error( 'missing_theme_action' );
    180         }
    181         $theme_action = sanitize_key( $_POST['theme_action'] );
     179    public function handle_load_themes_request()
     180    {
     181        check_ajax_referer('switch_themes', 'nonce');
     182        if (! current_user_can('switch_themes')) {
     183            wp_die(-1);
     184        }
     185
     186        if (empty($_POST['theme_action'])) {
     187            wp_send_json_error('missing_theme_action');
     188        }
     189        $theme_action = sanitize_key($_POST['theme_action']);
    182190        $themes       = array();
    183191        $args         = array();
    184192
    185193        // Define query filters based on user input.
    186         if ( ! array_key_exists( 'search', $_POST ) ) {
     194        if (! array_key_exists('search', $_POST)) {
    187195            $args['search'] = '';
    188196        } else {
    189             $args['search'] = sanitize_text_field( wp_unslash( $_POST['search'] ) );
    190         }
    191 
    192         if ( ! array_key_exists( 'tags', $_POST ) ) {
     197            $args['search'] = sanitize_text_field(wp_unslash($_POST['search']));
     198        }
     199
     200        if (! array_key_exists('tags', $_POST)) {
    193201            $args['tag'] = '';
    194202        } else {
    195             $args['tag'] = array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['tags'] ) );
    196         }
    197 
    198         if ( ! array_key_exists( 'page', $_POST ) ) {
     203            $args['tag'] = array_map('sanitize_text_field', wp_unslash((array) $_POST['tags']));
     204        }
     205
     206        if (! array_key_exists('page', $_POST)) {
    199207            $args['page'] = 1;
    200208        } else {
    201             $args['page'] = absint( $_POST['page'] );
     209            $args['page'] = absint($_POST['page']);
    202210        }
    203211
    204212        require_once ABSPATH . 'wp-admin/includes/theme.php';
    205213
    206         if ( 'installed' === $theme_action ) {
     214        if ('installed' === $theme_action) {
    207215
    208216            // Load all installed themes from wp_prepare_themes_for_js().
    209             $themes = array( 'themes' => wp_prepare_themes_for_js() );
    210             foreach ( $themes['themes'] as &$theme ) {
     217            $themes = array('themes' => wp_prepare_themes_for_js());
     218            foreach ($themes['themes'] as &$theme) {
    211219                $theme['type']   = 'installed';
    212                 $theme['active'] = ( isset( $_POST['customized_theme'] ) && $_POST['customized_theme'] === $theme['id'] );
    213             }
    214         } elseif ( 'catchthemes' === $theme_action ) {
     220                $theme['active'] = (isset($_POST['customized_theme']) && $_POST['customized_theme'] === $theme['id']);
     221            }
     222        } elseif ('catchthemes' === $theme_action) {
    215223
    216224            // Load WordPress.org themes from the .org API and normalize data to match installed theme objects.
    217             if ( ! current_user_can( 'install_themes' ) ) {
    218                 wp_die( -1 );
     225            if (! current_user_can('install_themes')) {
     226                wp_die(-1);
    219227            }
    220228
     
    227235            );
    228236
    229             $args = array_merge( $wporg_args, $args );
    230 
    231             if ( '' === $args['search'] && '' === $args['tag'] ) {
     237            $args = array_merge($wporg_args, $args);
     238
     239            if ('' === $args['search'] && '' === $args['tag']) {
    232240                $args['browse'] = 'new'; // Sort by latest themes by default.
    233241            }
     
    236244
    237245            // Load themes from the .org API.
    238             $themes = themes_api( 'query_themes', $args );
    239             if ( is_wp_error( $themes ) ) {
     246            $themes = themes_api('query_themes', $args);
     247            if (is_wp_error($themes)) {
    240248                wp_send_json_error();
    241249            }
     
    243251            // This list matches the allowed tags in wp-admin/includes/theme-install.php.
    244252            $themes_allowedtags                     = array_fill_keys(
    245                 array( 'a', 'abbr', 'acronym', 'code', 'pre', 'em', 'strong', 'div', 'p', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img' ),
     253                array('a', 'abbr', 'acronym', 'code', 'pre', 'em', 'strong', 'div', 'p', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img'),
    246254                array()
    247255            );
    248             $themes_allowedtags['a']                = array_fill_keys( array( 'href', 'title', 'target' ), true );
     256            $themes_allowedtags['a']                = array_fill_keys(array('href', 'title', 'target'), true);
    249257            $themes_allowedtags['acronym']['title'] = true;
    250258            $themes_allowedtags['abbr']['title']    = true;
    251             $themes_allowedtags['img']              = array_fill_keys( array( 'src', 'class', 'alt' ), true );
     259            $themes_allowedtags['img']              = array_fill_keys(array('src', 'class', 'alt'), true);
    252260
    253261            // Prepare a list of installed themes to check against before the loop.
    254262            $installed_themes = array();
    255263            $wp_themes        = wp_get_themes();
    256             foreach ( $wp_themes as $theme ) {
     264            foreach ($wp_themes as $theme) {
    257265                $installed_themes[] = $theme->get_stylesheet();
    258266            }
    259             $update_php = network_admin_url( 'update.php?action=install-theme' );
     267            $update_php = network_admin_url('update.php?action=install-theme');
    260268
    261269            // Set up properties for themes available on WordPress.org.
    262             foreach ( $themes->themes as &$theme ) {
     270            foreach ($themes->themes as &$theme) {
    263271                $theme->install_url = add_query_arg(
    264272                    array(
    265273                        'theme'    => $theme->slug,
    266                         '_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ),
     274                        '_wpnonce' => wp_create_nonce('install-theme_' . $theme->slug),
    267275                    ),
    268276                    $update_php
    269277                );
    270278
    271                 $theme->name        = wp_kses( $theme->name, $themes_allowedtags );
    272                 $theme->version     = wp_kses( $theme->version, $themes_allowedtags );
    273                 $theme->description = wp_kses( $theme->description, $themes_allowedtags );
     279                $theme->name        = wp_kses($theme->name, $themes_allowedtags);
     280                $theme->version     = wp_kses($theme->version, $themes_allowedtags);
     281                $theme->description = wp_kses($theme->description, $themes_allowedtags);
    274282                $theme->stars       = wp_star_rating(
    275283                    array(
     
    280288                    )
    281289                );
    282                 $theme->num_ratings = number_format_i18n( $theme->num_ratings );
    283                 $theme->preview_url = set_url_scheme( $theme->preview_url );
     290                $theme->num_ratings = number_format_i18n($theme->num_ratings);
     291                $theme->preview_url = set_url_scheme($theme->preview_url);
    284292
    285293                // Handle themes that are already installed as installed themes.
    286                 if ( in_array( $theme->slug, $installed_themes, true ) ) {
     294                if (in_array($theme->slug, $installed_themes, true)) {
    287295                    $theme->type = 'installed';
    288296                } else {
     
    291299
    292300                // Set active based on customized theme.
    293                 $theme->active = ( isset( $_POST['customized_theme'] ) && $_POST['customized_theme'] === $theme->slug );
     301                $theme->active = (isset($_POST['customized_theme']) && $_POST['customized_theme'] === $theme->slug);
    294302
    295303                // Map available theme properties to installed theme properties.
    296304                $theme->id            = $theme->slug;
    297                 $theme->screenshot    = array( $theme->screenshot_url );
    298                 $theme->authorAndUri  = wp_kses( $theme->author['display_name'], $themes_allowedtags );
    299                 $theme->compatibleWP  = is_wp_version_compatible( $theme->requires ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName
    300                 $theme->compatiblePHP = is_php_version_compatible( $theme->requires_php ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName
    301 
    302                 if ( isset( $theme->parent ) ) {
     305                $theme->screenshot    = array($theme->screenshot_url);
     306                $theme->authorAndUri  = wp_kses($theme->author['display_name'], $themes_allowedtags);
     307                $theme->compatibleWP  = is_wp_version_compatible($theme->requires); // phpcs:ignore WordPress.NamingConventions.ValidVariableName
     308                $theme->compatiblePHP = is_php_version_compatible($theme->requires_php); // phpcs:ignore WordPress.NamingConventions.ValidVariableName
     309
     310                if (isset($theme->parent)) {
    303311                    $theme->parent = $theme->parent['slug'];
    304312                } else {
    305313                    $theme->parent = false;
    306314                }
    307                 unset( $theme->slug );
    308                 unset( $theme->screenshot_url );
    309                 unset( $theme->author );
     315                unset($theme->slug);
     316                unset($theme->screenshot_url);
     317                unset($theme->author);
    310318            } // End foreach().
    311         } elseif ( 'wporg' === $theme_action ) {
     319        } elseif ('wporg' === $theme_action) {
    312320
    313321            // Load WordPress.org themes from the .org API and normalize data to match installed theme objects.
    314             if ( ! current_user_can( 'install_themes' ) ) {
    315                 wp_die( -1 );
     322            if (! current_user_can('install_themes')) {
     323                wp_die(-1);
    316324            }
    317325
     
    324332            );
    325333
    326             $args = array_merge( $wporg_args, $args );
    327 
    328             if ( '' === $args['search'] && '' === $args['tag'] ) {
     334            $args = array_merge($wporg_args, $args);
     335
     336            if ('' === $args['search'] && '' === $args['tag']) {
    329337                $args['browse'] = 'new'; // Sort by latest themes by default.
    330338            }
    331339
    332340            // Load themes from the .org API.
    333             $themes = themes_api( 'query_themes', $args );
    334             if ( is_wp_error( $themes ) ) {
     341            $themes = themes_api('query_themes', $args);
     342            if (is_wp_error($themes)) {
    335343                wp_send_json_error();
    336344            }
     
    338346            // This list matches the allowed tags in wp-admin/includes/theme-install.php.
    339347            $themes_allowedtags                     = array_fill_keys(
    340                 array( 'a', 'abbr', 'acronym', 'code', 'pre', 'em', 'strong', 'div', 'p', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img' ),
     348                array('a', 'abbr', 'acronym', 'code', 'pre', 'em', 'strong', 'div', 'p', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img'),
    341349                array()
    342350            );
    343             $themes_allowedtags['a']                = array_fill_keys( array( 'href', 'title', 'target' ), true );
     351            $themes_allowedtags['a']                = array_fill_keys(array('href', 'title', 'target'), true);
    344352            $themes_allowedtags['acronym']['title'] = true;
    345353            $themes_allowedtags['abbr']['title']    = true;
    346             $themes_allowedtags['img']              = array_fill_keys( array( 'src', 'class', 'alt' ), true );
     354            $themes_allowedtags['img']              = array_fill_keys(array('src', 'class', 'alt'), true);
    347355
    348356            // Prepare a list of installed themes to check against before the loop.
    349357            $installed_themes = array();
    350358            $wp_themes        = wp_get_themes();
    351             foreach ( $wp_themes as $theme ) {
     359            foreach ($wp_themes as $theme) {
    352360                $installed_themes[] = $theme->get_stylesheet();
    353361            }
    354             $update_php = network_admin_url( 'update.php?action=install-theme' );
     362            $update_php = network_admin_url('update.php?action=install-theme');
    355363
    356364            // Set up properties for themes available on WordPress.org.
    357             foreach ( $themes->themes as &$theme ) {
     365            foreach ($themes->themes as &$theme) {
    358366                $theme->install_url = add_query_arg(
    359367                    array(
    360368                        'theme'    => $theme->slug,
    361                         '_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ),
     369                        '_wpnonce' => wp_create_nonce('install-theme_' . $theme->slug),
    362370                    ),
    363371                    $update_php
    364372                );
    365373
    366                 $theme->name        = wp_kses( $theme->name, $themes_allowedtags );
    367                 $theme->version     = wp_kses( $theme->version, $themes_allowedtags );
    368                 $theme->description = wp_kses( $theme->description, $themes_allowedtags );
     374                $theme->name        = wp_kses($theme->name, $themes_allowedtags);
     375                $theme->version     = wp_kses($theme->version, $themes_allowedtags);
     376                $theme->description = wp_kses($theme->description, $themes_allowedtags);
    369377                $theme->stars       = wp_star_rating(
    370378                    array(
     
    375383                    )
    376384                );
    377                 $theme->num_ratings = number_format_i18n( $theme->num_ratings );
    378                 $theme->preview_url = set_url_scheme( $theme->preview_url );
     385                $theme->num_ratings = number_format_i18n($theme->num_ratings);
     386                $theme->preview_url = set_url_scheme($theme->preview_url);
    379387
    380388                // Handle themes that are already installed as installed themes.
    381                 if ( in_array( $theme->slug, $installed_themes, true ) ) {
     389                if (in_array($theme->slug, $installed_themes, true)) {
    382390                    $theme->type = 'installed';
    383391                } else {
     
    386394
    387395                // Set active based on customized theme.
    388                 $theme->active = ( isset( $_POST['customized_theme'] ) && $_POST['customized_theme'] === $theme->slug );
     396                $theme->active = (isset($_POST['customized_theme']) && $_POST['customized_theme'] === $theme->slug);
    389397
    390398                // Map available theme properties to installed theme properties.
    391399                $theme->id            = $theme->slug;
    392                 $theme->screenshot    = array( $theme->screenshot_url );
    393                 $theme->authorAndUri  = wp_kses( $theme->author['display_name'], $themes_allowedtags );
    394                 $theme->compatibleWP  = is_wp_version_compatible( $theme->requires ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName
    395                 $theme->compatiblePHP = is_php_version_compatible( $theme->requires_php ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName
    396 
    397                 if ( isset( $theme->parent ) ) {
     400                $theme->screenshot    = array($theme->screenshot_url);
     401                $theme->authorAndUri  = wp_kses($theme->author['display_name'], $themes_allowedtags);
     402                $theme->compatibleWP  = is_wp_version_compatible($theme->requires); // phpcs:ignore WordPress.NamingConventions.ValidVariableName
     403                $theme->compatiblePHP = is_php_version_compatible($theme->requires_php); // phpcs:ignore WordPress.NamingConventions.ValidVariableName
     404
     405                if (isset($theme->parent)) {
    398406                    $theme->parent = $theme->parent['slug'];
    399407                } else {
    400408                    $theme->parent = false;
    401409                }
    402                 unset( $theme->slug );
    403                 unset( $theme->screenshot_url );
    404                 unset( $theme->author );
     410                unset($theme->slug);
     411                unset($theme->screenshot_url);
     412                unset($theme->author);
    405413            } // End foreach().
    406414        } // End if().
     
    423431         * @param WP_Customize_Manager $manager Instance of Customize manager.
    424432         */
    425         $themes = apply_filters( 'customize_load_themes', $themes, $args, $wp_customize );
    426 
    427         wp_send_json_success( $themes );
     433        $themes = apply_filters('customize_load_themes', $themes, $args, $wp_customize);
     434
     435        wp_send_json_success($themes);
    428436    }
    429437
    430438    /* Plugins */
    431439    /* Adds Catch Plugins tab in Add Plugin page to show all plugins by Catch Plugins in wordpress.org */
    432     public function add_our_plugins_tab( $tabs ) {
     440    public function add_our_plugins_tab($tabs)
     441    {
    433442        // Add our filter here
    434         $tabs['catchplugins'] = _x( 'Catch Plugins', 'Plugin Installer' );
     443        $tabs['catchplugins'] = _x('Catch Plugins', 'Plugin Installer', 'catch-sticky-menu');
    435444
    436445        return $tabs;
    437446    }
    438447
    439     public function catchplugins() {
     448    public function catchplugins()
     449    {
    440450        /* From CORE Start */
    441451        global $paged, $tab;
    442         wp_reset_vars( array( 'tab' ) );
     452        wp_reset_vars(array('tab'));
    443453
    444454        $defined_class = new WP_Plugin_Install_List_Table();
     
    468478    }
    469479
    470     public function plugins_table() {
     480    public function plugins_table()
     481    {
    471482        global $wp_list_table;
    472483        printf(
    473             '<p class="catch-plugins-list">' . __( 'You can use any of our free plugins or premium plugins from <a href="%s" target="_blank">Catch Plugins</a>' ) . '.</p>',
    474             'https://catchplugins.com/'
     484            '<p class="catch-plugins-list">%s</p>',
     485            sprintf(
     486                // Translators: %s is the URL to the Catch Plugins website.
     487                wp_kses_post(__('You can use any of our free plugins or premium plugins from <a href="%s" target="_blank">Catch Plugins</a>.', 'catch-sticky-menu')),
     488                esc_url('https://catchplugins.com/')
     489            )
    475490        );
    476         ?>
     491?>
    477492        <form id="plugin-filter" method="post">
    478493            <?php $wp_list_table->display(); ?>
    479494        </form>
    480         <?php
     495<?php
    481496    }
    482497}
  • catch-sticky-menu/trunk/includes/class-catch-sticky-menu-loader.php

    r1976181 r3468483  
    11<?php
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
    25
    36/**
     
    1114 */
    1215
    13 /**
    14  * Register all actions and filters for the plugin.
    15  *
    16  * Maintain a list of all hooks that are registered throughout
    17  * the plugin, and register them with the WordPress API. Call the
    18  * run function to execute the list of actions and filters.
    19  *
    20  * @package    Catch_Sticky_Menu
    21  * @subpackage Catch_Sticky_Menu/includes
    22  * @author     Catch Plugins <www.catchplugins.com>
    23  */
    24 class Catch_Sticky_Menu_Loader {
     16
     17class Catch_Sticky_Menu_Loader
     18{
    2519
    2620    /**
     
    4741     * @since    1.0.0
    4842     */
    49     public function __construct() {
     43    public function __construct()
     44    {
    5045
    5146        $this->actions = array();
    5247        $this->filters = array();
    53 
    5448    }
    5549
     
    6458     * @param    int                  $accepted_args    Optional. The number of arguments that should be passed to the $callback. Default is 1.
    6559     */
    66     public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
    67         $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
     60    public function add_action($hook, $component, $callback, $priority = 10, $accepted_args = 1)
     61    {
     62        $this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
    6863    }
    6964
     
    7873     * @param    int                  $accepted_args    Optional. The number of arguments that should be passed to the $callback. Default is 1
    7974     */
    80     public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
    81         $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
     75    public function add_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1)
     76    {
     77        $this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
    8278    }
    8379
     
    9692     * @return   array                                  The collection of actions and filters registered with WordPress.
    9793     */
    98     private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
     94    private function add($hooks, $hook, $component, $callback, $priority, $accepted_args)
     95    {
    9996
    10097        $hooks[] = array(
     
    107104
    108105        return $hooks;
    109 
    110106    }
    111107
     
    115111     * @since    1.0.0
    116112     */
    117     public function run() {
     113    public function run()
     114    {
    118115
    119         foreach ( $this->filters as $hook ) {
    120             add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
     116        foreach ($this->filters as $hook) {
     117            add_filter($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
    121118        }
    122119
    123         foreach ( $this->actions as $hook ) {
    124             add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
     120        foreach ($this->actions as $hook) {
     121            add_action($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
    125122        }
    126 
    127123    }
    128 
    129124}
  • catch-sticky-menu/trunk/includes/class-catch-sticky-menu.php

    r2142849 r3468483  
    11<?php
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
    25
    36/**
     
    1417 */
    1518
    16 /**
    17  * The core plugin class.
    18  *
    19  * This is used to define internationalization, admin-specific hooks, and
    20  * public-facing site hooks.
    21  *
    22  * Also maintains the unique identifier of this plugin as well as the current
    23  * version of the plugin.
    24  *
    25  * @since      1.0.0
    26  * @package    Catch_Sticky_Menu
    27  * @subpackage Catch_Sticky_Menu/includes
    28  * @author     Catch Plugins <www.catchplugins.com>
    29  */
    30 class Catch_Sticky_Menu {
     19
     20class Catch_Sticky_Menu
     21{
    3122
    3223    /**
     
    6758     * @since    1.0.0
    6859     */
    69     public function __construct() {
    70         if ( defined( 'CATCH_STICKY_MENU_VERSION' ) ) {
     60    public function __construct()
     61    {
     62        if (defined('CATCH_STICKY_MENU_VERSION')) {
    7163            $this->version = CATCH_STICKY_MENU_VERSION;
    7264        } else {
     
    7971        $this->define_admin_hooks();
    8072        $this->define_public_hooks();
    81 
    8273    }
    8374
     
    9889     * @access   private
    9990     */
    100     private function load_dependencies() {
     91    private function load_dependencies()
     92    {
    10193
    10294        /**
     
    10496         * core plugin.
    10597         */
    106         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-catch-sticky-menu-loader.php';
     98        require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-catch-sticky-menu-loader.php';
    10799
    108100        /**
     
    110102         * of the plugin.
    111103         */
    112         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-catch-sticky-menu-i18n.php';
     104        require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-catch-sticky-menu-i18n.php';
    113105
    114106        /**
    115107         * The class responsible for defining all actions that occur in the admin area.
    116108         */
    117         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-catch-sticky-menu-admin.php';
     109        require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-catch-sticky-menu-admin.php';
    118110
    119111        /**
     
    121113         * side of the site.
    122114         */
    123         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-catch-sticky-menu-public.php';
     115        require_once plugin_dir_path(dirname(__FILE__)) . 'public/class-catch-sticky-menu-public.php';
    124116
    125117        $this->loader = new Catch_Sticky_Menu_Loader();
    126 
    127118    }
    128119
     
    136127     * @access   private
    137128     */
    138     private function set_locale() {
     129    private function set_locale()
     130    {
    139131
    140132        $plugin_i18n = new Catch_Sticky_Menu_i18n();
    141133
    142         $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
    143 
     134        $this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
    144135    }
    145136
     
    151142     * @access   private
    152143     */
    153     private function define_admin_hooks() {
    154 
    155         $plugin_admin = new Catch_Sticky_Menu_Admin( $this->get_plugin_name(), $this->get_version() );
    156 
    157         $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
    158         $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
    159         $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_settings_menu' );
    160         $this->loader->add_action( 'admin_init', $plugin_admin, 'register_settings' );
    161         $this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'action_links', 10, 2 );
    162         $this->loader->add_filter( 'plugin_row_meta', $plugin_admin, 'add_plugin_meta_links', 10, 2 );
    163 
     144    private function define_admin_hooks()
     145    {
     146
     147        $plugin_admin = new Catch_Sticky_Menu_Admin($this->get_plugin_name(), $this->get_version());
     148
     149        $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
     150        $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
     151        $this->loader->add_action('admin_menu', $plugin_admin, 'add_plugin_settings_menu');
     152        $this->loader->add_action('admin_init', $plugin_admin, 'register_settings');
     153        $this->loader->add_filter('plugin_action_links', $plugin_admin, 'action_links', 10, 2);
     154        $this->loader->add_filter('plugin_row_meta', $plugin_admin, 'add_plugin_meta_links', 10, 2);
    164155    }
    165156
     
    171162     * @access   private
    172163     */
    173     private function define_public_hooks() {
    174 
    175         $plugin_public = new Catch_Sticky_Menu_Public( $this->get_plugin_name(), $this->get_version() );
    176 
    177         $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
    178         $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    179         $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'catch_stickymenu' );
    180         $this->loader->add_action( 'wp_localize_script', $plugin_public,'sticky_object' );
    181     }
    182 
    183    
     164    private function define_public_hooks()
     165    {
     166
     167        $plugin_public = new Catch_Sticky_Menu_Public($this->get_plugin_name(), $this->get_version());
     168
     169        $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
     170        $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
     171        $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'catch_stickymenu');
     172        $this->loader->add_action('wp_localize_script', $plugin_public, 'sticky_object');
     173    }
     174
     175
    184176
    185177    /**
     
    188180     * @since    1.0.0
    189181     */
    190     public function run() {
     182    public function run()
     183    {
    191184        $this->loader->run();
    192185    }
     
    199192     * @return    string    The name of the plugin.
    200193     */
    201     public function get_plugin_name() {
     194    public function get_plugin_name()
     195    {
    202196        return $this->plugin_name;
    203197    }
     
    209203     * @return    Catch_Sticky_Menu_Loader    Orchestrates the hooks of the plugin.
    210204     */
    211     public function get_loader() {
     205    public function get_loader()
     206    {
    212207        return $this->loader;
    213208    }
     
    219214     * @return    string    The version number of the plugin.
    220215     */
    221     public function get_version() {
     216    public function get_version()
     217    {
    222218        return $this->version;
    223219    }
    224 
    225220}
  • catch-sticky-menu/trunk/includes/ctp-tabs-removal.php

    r2600962 r3468483  
    11<?php
    2 /**
    3  * ctp_register_settings
    4  * Header Enhacement Pro Register Settings
    5  */
    6 if ( ! function_exists( 'ctp_register_settings' ) ) {
    7     function ctp_register_settings() {
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
     5
     6if (! function_exists('ctp_register_settings')) {
     7    function ctp_register_settings()
     8    {
    89        // register_setting( $option_group, $option_name, $sanitize_callback )
    910        register_setting(
     
    1415    }
    1516}
    16 add_action( 'admin_init', 'ctp_register_settings' );
     17add_action('admin_init', 'ctp_register_settings');
    1718
    18 if ( ! function_exists( 'ctp_get_options' ) ) {
     19if (! function_exists('ctp_get_options')) {
    1920    /**
    2021     * Returns the options array for ctp_get options
     
    2223     *  @since    1.9
    2324     */
    24     function ctp_get_options() {
     25    function ctp_get_options()
     26    {
    2527        $defaults = ctp_default_options();
    26         $options  = get_option( 'ctp_options', $defaults );
     28        $options  = get_option('ctp_options', $defaults);
    2729
    28         return wp_parse_args( $options, $defaults );
     30        return wp_parse_args($options, $defaults);
    2931    }
    3032}
    3133
    32 if ( ! function_exists( 'ctp_default_options' ) ) {
     34if (! function_exists('ctp_default_options')) {
    3335    /**
    3436     * Return array of default options
     
    3739     * @return    string    1 or 2.
    3840     */
    39     function ctp_default_options( $option = null ) {
     41    function ctp_default_options($option = null)
     42    {
    4043        $default_options['theme_plugin_tabs'] = 1;
    41         if ( null == $option ) {
    42             return apply_filters( 'ctp_options', $default_options );
     44        if (null == $option) {
     45            return apply_filters('ctp_options', $default_options);
    4346        } else {
    44             return $default_options[ $option ];
     47            return $default_options[$option];
    4548        }
    4649    }
    4750}
    4851
    49 if ( ! function_exists( 'ctp_switch' ) ) {
     52if (! function_exists('ctp_switch')) {
    5053    /**
    5154     * Return $string
     
    5457     * @return    $string    1 or 2.
    5558     */
    56     function ctp_switch() {
     59    function ctp_switch()
     60    {
    5761        // Check nonce before doing and changes.
    58         if ( ! check_ajax_referer( 'ctp_tabs_nonce', 'security', false ) ) {
    59             wp_die( esc_html__( 'Invalid Nonce', 'catch-sticky-menu' ) );
     62        if (! check_ajax_referer('ctp_tabs_nonce', 'security', false)) {
     63            wp_die(esc_html__('Invalid Nonce', 'catch-sticky-menu'));
    6064        } else {
    61             if ( ! current_user_can( 'manage_options' ) ) {
    62                 wp_die( esc_html__( 'Permission denied!', 'catch-sticky-menu' ) );
     65            if (! current_user_can('manage_options')) {
     66                wp_die(esc_html__('Permission denied!', 'catch-sticky-menu'));
    6367            }
    64             $value = ( 'true' == $_POST['value'] ) ? 1 : 0;
     68            $value = ('true' == $_POST['value']) ? 1 : 0;
    6569
    6670            $option_name = $_POST['option_name'];
     
    6872            $option_value = ctp_get_options();
    6973
    70             $option_value[ $option_name ] = $value;
     74            $option_value[$option_name] = $value;
    7175
    72             if ( update_option( 'ctp_options', $option_value ) ) {
    73                 echo $value;
     76            if (update_option('ctp_options', $option_value)) {
     77                echo esc_html((string) $value);
    7478            } else {
    75                 esc_html_e( 'Connection Error. Please try again.', 'catch-sticky-menu' );
     79                esc_html_e('Connection Error. Please try again.', 'catch-sticky-menu');
    7680            }
    7781        }
     
    7983    }
    8084}
    81 add_action( 'wp_ajax_ctp_switch', 'ctp_switch' );
     85add_action('wp_ajax_ctp_switch', 'ctp_switch');
  • catch-sticky-menu/trunk/languages/catch-sticky-menu.pot

    r3292536 r3468483  
    1 # Copyright (C) 2018-2022 Catch Plugins
     1# Copyright (C) 2018-2026 Catch Plugins
    22# This file is distributed under the GNU General Public License v2 or later.
    33#, fuzzy
     
    66"Project-Id-Version: Catch Sticky Menu\n"
    77"Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
    8 "POT-Creation-Date: 2025-05-13 17:50+0545\n"
     8"POT-Creation-Date: 2026-02-24 15:32+0545\n"
    99"PO-Revision-Date: 2016-12-12 09:23-0500\n"
    1010"Last-Translator: Sakin Shrestha <[email protected]>\n"
     
    1515"Content-Transfer-Encoding: 8bit\n"
    1616"Plural-Forms: nplurals=2; plural=n != 1;\n"
    17 "X-Generator: Poedit 3.6\n"
     17"X-Generator: Poedit 3.8\n"
    1818"X-Poedit-KeywordsList: "
    1919"__;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;_x;esc_html_e;esc_html__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_n_noop:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
     
    2222"X-Poedit-SearchPath-0: ..\n"
    2323
    24 #: ../admin/class-catch-sticky-menu-admin.php:117
    25 #: ../admin/class-catch-sticky-menu-admin.php:137
    26 #: ../admin/partials/dashboard-display.php:19
     24#: ../admin/class-catch-sticky-menu-admin.php:114
     25#: ../admin/class-catch-sticky-menu-admin.php:135
     26#: ../admin/partials/dashboard-display.php:22
    2727msgid "Settings"
    2828msgstr ""
    2929
    30 #: ../admin/class-catch-sticky-menu-admin.php:126
    31 #: ../admin/class-catch-sticky-menu-admin.php:127
    32 #: ../admin/class-catch-sticky-menu-admin.php:136
    33 #: ../admin/partials/catch-sticky-menu-admin-display.php:18
     30#: ../admin/class-catch-sticky-menu-admin.php:124
     31#: ../admin/class-catch-sticky-menu-admin.php:125
     32#: ../admin/class-catch-sticky-menu-admin.php:134
     33#: ../admin/partials/catch-sticky-menu-admin-display.php:21
    3434msgid "Catch Sticky Menu"
    3535msgstr ""
    3636
    37 #: ../admin/class-catch-sticky-menu-admin.php:147
     37#: ../admin/class-catch-sticky-menu-admin.php:146
    3838msgid "You do not have sufficient permissions to access this page."
    3939msgstr ""
    4040
    41 #: ../admin/partials/catch-sticky-menu-admin-display.php:20
     41#: ../admin/partials/catch-sticky-menu-admin-display.php:23
    4242msgid "Lets you display Sticky Menu anywhere on your website elegantly."
    4343msgstr ""
    4444
    45 #: ../admin/partials/catch-sticky-menu-admin-display.php:26
     45#: ../admin/partials/catch-sticky-menu-admin-display.php:29
    4646msgid "Dashboard"
    4747msgstr ""
    4848
    49 #: ../admin/partials/catch-sticky-menu-admin-display.php:27
    50 #: ../admin/partials/catch-sticky-menu-admin-display.php:67
     49#: ../admin/partials/catch-sticky-menu-admin-display.php:30
     50#: ../admin/partials/catch-sticky-menu-admin-display.php:70
    5151msgid "Features"
    5252msgstr ""
    5353
    54 #: ../admin/partials/catch-sticky-menu-admin-display.php:34
     54#: ../admin/partials/catch-sticky-menu-admin-display.php:37
    5555msgid "Catch Themes & Catch Plugins Tabs"
    5656msgstr ""
    5757
    58 #: ../admin/partials/catch-sticky-menu-admin-display.php:39
     58#: ../admin/partials/catch-sticky-menu-admin-display.php:42
    5959msgid ""
    6060"If you want to turn off Catch Themes & Catch Plugins tabs option in Add "
     
    6262msgstr ""
    6363
    64 #: ../admin/partials/catch-sticky-menu-admin-display.php:44
     64#: ../admin/partials/catch-sticky-menu-admin-display.php:47
    6565msgid "Turn On Catch Themes & Catch Plugin tabs"
    6666msgstr ""
    6767
    68 #: ../admin/partials/catch-sticky-menu-admin-display.php:72
     68#: ../admin/partials/catch-sticky-menu-admin-display.php:75
    6969msgid "Menu Selector"
    7070msgstr ""
    7171
    72 #: ../admin/partials/catch-sticky-menu-admin-display.php:73
     72#: ../admin/partials/catch-sticky-menu-admin-display.php:76
    7373msgid ""
    7474"Catch Sticky Menu empowers you with Menu Selector (for desktop and mobile). "
     
    7979msgstr ""
    8080
    81 #: ../admin/partials/catch-sticky-menu-admin-display.php:77
    82 #: ../admin/partials/dashboard-display.php:62
     81#: ../admin/partials/catch-sticky-menu-admin-display.php:80
     82#: ../admin/partials/dashboard-display.php:65
    8383msgid "Sticky Background Color"
    8484msgstr ""
    8585
    86 #: ../admin/partials/catch-sticky-menu-admin-display.php:78
     86#: ../admin/partials/catch-sticky-menu-admin-display.php:81
    8787msgid ""
    8888"Background colors play an important role when you’re trying to highlight "
     
    9393msgstr ""
    9494
    95 #: ../admin/partials/catch-sticky-menu-admin-display.php:81
     95#: ../admin/partials/catch-sticky-menu-admin-display.php:84
    9696msgid "Sticky Z Index"
    9797msgstr ""
    9898
    99 #: ../admin/partials/catch-sticky-menu-admin-display.php:82
     99#: ../admin/partials/catch-sticky-menu-admin-display.php:85
    100100msgid ""
    101101"Catch Sticky Menu supports Z Index option. You can add a sticky Z index "
     
    104104msgstr ""
    105105
    106 #: ../admin/partials/catch-sticky-menu-admin-display.php:85
    107 #: ../admin/partials/dashboard-display.php:90
     106#: ../admin/partials/catch-sticky-menu-admin-display.php:88
     107#: ../admin/partials/dashboard-display.php:93
    108108msgid "Sticky Opacity"
    109109msgstr ""
    110110
    111 #: ../admin/partials/catch-sticky-menu-admin-display.php:86
     111#: ../admin/partials/catch-sticky-menu-admin-display.php:89
    112112msgid ""
    113113"With the Sticky Opacity option available in Catch Sticky Menu, you can "
     
    117117msgstr ""
    118118
    119 #: ../admin/partials/catch-sticky-menu-admin-display.php:89
     119#: ../admin/partials/catch-sticky-menu-admin-display.php:92
    120120msgid "Enable on Homepage only"
    121121msgstr ""
    122122
    123 #: ../admin/partials/catch-sticky-menu-admin-display.php:90
     123#: ../admin/partials/catch-sticky-menu-admin-display.php:93
    124124msgid ""
    125125"You can stick the menu either on the Homepage of your website only or on the "
     
    129129msgstr ""
    130130
    131 #: ../admin/partials/catch-sticky-menu-admin-display.php:93
     131#: ../admin/partials/catch-sticky-menu-admin-display.php:96
    132132msgid "Lightweight"
    133133msgstr ""
    134134
    135 #: ../admin/partials/catch-sticky-menu-admin-display.php:94
     135#: ../admin/partials/catch-sticky-menu-admin-display.php:97
    136136msgid ""
    137137"Catch Sticky Menu, a simple sticky menu plugin for WordPress is extremely "
     
    140140msgstr ""
    141141
    142 #: ../admin/partials/catch-sticky-menu-admin-display.php:97
     142#: ../admin/partials/catch-sticky-menu-admin-display.php:100
    143143msgid "Responsive Design"
    144144msgstr ""
    145145
    146 #: ../admin/partials/catch-sticky-menu-admin-display.php:98
     146#: ../admin/partials/catch-sticky-menu-admin-display.php:101
    147147msgid ""
    148148"Catch Sticky Menu, our new WordPress plugin for sticky menu comes with a "
     
    151151msgstr ""
    152152
    153 #: ../admin/partials/catch-sticky-menu-admin-display.php:101
     153#: ../admin/partials/catch-sticky-menu-admin-display.php:104
    154154msgid "Compatible with all WordPress Themes"
    155155msgstr ""
    156156
    157 #: ../admin/partials/catch-sticky-menu-admin-display.php:102
     157#: ../admin/partials/catch-sticky-menu-admin-display.php:105
    158158msgid ""
    159159"Catch Sticky menu has been crafted in a way that supports all the themes on "
     
    161161msgstr ""
    162162
    163 #: ../admin/partials/catch-sticky-menu-admin-display.php:105
     163#: ../admin/partials/catch-sticky-menu-admin-display.php:108
    164164msgid "Incredible Support"
    165165msgstr ""
    166166
    167 #: ../admin/partials/catch-sticky-menu-admin-display.php:106
     167#: ../admin/partials/catch-sticky-menu-admin-display.php:109
    168168msgid ""
    169169"We have a great line of support team and support documentation. You do not "
     
    173173msgstr ""
    174174
    175 #: ../admin/partials/dashboard-display.php:24
     175#: ../admin/partials/dashboard-display.php:27
    176176msgid "Plugin Options Saved."
    177177msgstr ""
    178178
    179 #: ../admin/partials/dashboard-display.php:42
     179#: ../admin/partials/dashboard-display.php:45
    180180msgid " Desktop Menu Selector"
    181181msgstr ""
    182182
    183 #: ../admin/partials/dashboard-display.php:46
     183#: ../admin/partials/dashboard-display.php:49
    184184msgid "Sticky Menu will be displayed just before this selector."
    185185msgstr ""
    186186
    187 #: ../admin/partials/dashboard-display.php:52
     187#: ../admin/partials/dashboard-display.php:55
    188188msgid " Mobile Menu Selector"
    189189msgstr ""
    190190
    191 #: ../admin/partials/dashboard-display.php:56
     191#: ../admin/partials/dashboard-display.php:59
    192192msgid "Sticky Menu will be displayed just before this selector (in mobile)."
    193193msgstr ""
    194194
    195 #: ../admin/partials/dashboard-display.php:72
     195#: ../admin/partials/dashboard-display.php:75
    196196msgid "Sticky Menu Text Color"
    197197msgstr ""
    198198
    199 #: ../admin/partials/dashboard-display.php:82
     199#: ../admin/partials/dashboard-display.php:85
    200200msgid "Sticky Z index"
    201201msgstr ""
    202202
    203 #: ../admin/partials/dashboard-display.php:85
     203#: ../admin/partials/dashboard-display.php:88
    204204msgid ""
    205205"Sticky z-index helps to set the stack order of the element. An element with "
     
    207207msgstr ""
    208208
    209 #: ../admin/partials/dashboard-display.php:93
     209#: ../admin/partials/dashboard-display.php:96
    210210msgid ""
    211211"Sticky Opacity helps to set the  transparency-level, 1 is not transparent at "
     
    213213msgstr ""
    214214
    215 #: ../admin/partials/dashboard-display.php:98
     215#: ../admin/partials/dashboard-display.php:101
    216216msgid "Desktop Font Size"
    217217msgstr ""
    218218
    219 #: ../admin/partials/dashboard-display.php:102
     219#: ../admin/partials/dashboard-display.php:105
    220220msgid "px"
    221221msgstr ""
    222222
    223 #: ../admin/partials/dashboard-display.php:103
     223#: ../admin/partials/dashboard-display.php:106
    224224msgid ""
    225225"Sets your desired font size to desktop menu text. Default is set to null, "
     
    227227msgstr ""
    228228
    229 #: ../admin/partials/dashboard-display.php:108
     229#: ../admin/partials/dashboard-display.php:111
    230230msgid "Mobile Font Size"
    231231msgstr ""
    232232
    233 #: ../admin/partials/dashboard-display.php:112
     233#: ../admin/partials/dashboard-display.php:115
    234234msgid "em"
    235235msgstr ""
    236236
    237 #: ../admin/partials/dashboard-display.php:113
     237#: ../admin/partials/dashboard-display.php:116
    238238msgid ""
    239239"Sets your desired font size to mobile menu text. Default is set to null, and "
     
    241241msgstr ""
    242242
    243 #: ../admin/partials/dashboard-display.php:117
     243#: ../admin/partials/dashboard-display.php:120
    244244msgid "Enable Only On Home Page"
    245245msgstr ""
    246246
    247 #: ../admin/partials/dashboard-display.php:120
     247#: ../admin/partials/dashboard-display.php:123
    248248msgid "Check to enable"
    249249msgstr ""
    250250
    251 #: ../admin/partials/dashboard-display.php:122
     251#: ../admin/partials/dashboard-display.php:125
    252252msgid "Checking this option will display sticky menu on homepage/frontpage."
    253253msgstr ""
    254254
    255 #: ../admin/partials/dashboard-display.php:128
     255#: ../admin/partials/dashboard-display.php:131
    256256msgid "Reset Options"
    257257msgstr ""
    258258
    259 #: ../admin/partials/dashboard-display.php:131
     259#: ../admin/partials/dashboard-display.php:134
    260260msgid "Check to reset"
    261261msgstr ""
    262262
    263 #: ../admin/partials/dashboard-display.php:133
     263#: ../admin/partials/dashboard-display.php:136
    264264msgid "Caution: Reset all settings to default."
    265265msgstr ""
    266266
    267 #: ../admin/partials/dashboard-display.php:138
     267#: ../admin/partials/dashboard-display.php:141
    268268msgid "Save Changes"
    269269msgstr ""
    270270
    271 #: ../admin/partials/footer.php:4
     271#: ../admin/partials/footer.php:10
    272272msgid "Catch Plugins"
    273273msgstr ""
    274274
    275 #: ../admin/partials/footer.php:9
     275#: ../admin/partials/footer.php:15
    276276msgid "View Themes"
    277277msgstr ""
    278278
    279 #: ../admin/partials/footer.php:10
     279#: ../admin/partials/footer.php:16
    280280msgid "View Plugins"
    281281msgstr ""
    282282
    283 #: ../admin/partials/footer.php:11
     283#: ../admin/partials/footer.php:17
    284284msgid "Support"
    285285msgstr ""
    286286
    287 #: ../admin/partials/sidebar.php:3
     287#: ../admin/partials/sidebar.php:9
    288288msgid "Recommendations"
    289289msgstr ""
    290290
    291 #: ../admin/partials/sidebar.php:8
     291#: ../admin/partials/sidebar.php:14
    292292msgid "Premium Themes"
    293293msgstr ""
    294294
    295 #: ../admin/partials/sidebar.php:9
     295#: ../admin/partials/sidebar.php:15
    296296msgid ""
    297297"Check out our simple, clean and responsive Premium WordPress Themes that "
     
    299299msgstr ""
    300300
    301 #: ../admin/partials/sidebar.php:9
     301#: ../admin/partials/sidebar.php:15
    302302msgid "Check our premium themes."
    303303msgstr ""
    304304
    305 #: ../admin/partials/sidebar.php:15
     305#: ../admin/partials/sidebar.php:21
    306306msgid "Free Themes"
    307307msgstr ""
    308308
    309 #: ../admin/partials/sidebar.php:16
     309#: ../admin/partials/sidebar.php:22
    310310msgid ""
    311311"Check out our collection of Free WordPress Themes that are clean, simple and "
     
    313313msgstr ""
    314314
    315 #: ../admin/partials/sidebar.php:16
     315#: ../admin/partials/sidebar.php:22
    316316msgid "Check our free themes."
    317317msgstr ""
    318318
    319 #: ../admin/partials/sidebar.php:22
     319#: ../admin/partials/sidebar.php:28
    320320msgid "Premium Plugins"
    321321msgstr ""
    322322
    323 #: ../admin/partials/sidebar.php:23
     323#: ../admin/partials/sidebar.php:29
    324324msgid ""
    325325"Check out our secured Premium WordPress Plugins to enhance and add extra "
     
    328328msgstr ""
    329329
    330 #: ../admin/partials/sidebar.php:23
     330#: ../admin/partials/sidebar.php:29
    331331msgid "Check our premium plugins."
    332332msgstr ""
    333333
    334 #: ../admin/partials/sidebar.php:31
     334#: ../admin/partials/sidebar.php:37
    335335msgid "Free Plugins"
    336336msgstr ""
    337337
    338 #: ../admin/partials/sidebar.php:32
     338#: ../admin/partials/sidebar.php:38
    339339msgid ""
    340340"Check out our Free WordPress Plugins and get the taste of our service "
     
    342342msgstr ""
    343343
    344 #: ../admin/partials/sidebar.php:33
     344#: ../admin/partials/sidebar.php:39
    345345msgid "check our free plugins."
    346346msgstr ""
    347347
    348 #: ../includes/CatchThemesThemePlugin.php:154
     348#: ../includes/CatchThemesThemePlugin.php:161
    349349msgid "Themes by CatchThemes"
    350350msgstr ""
    351351
    352 #: ../includes/CatchThemesThemePlugin.php:434
     352#: ../includes/CatchThemesThemePlugin.php:443
    353353msgctxt "Plugin Installer"
    354354msgid "Catch Plugins"
    355355msgstr ""
    356356
    357 #: ../includes/CatchThemesThemePlugin.php:473
     357#: ../includes/CatchThemesThemePlugin.php:487
    358358#, php-format
    359359msgid ""
    360360"You can use any of our free plugins or premium plugins from <a href=\"%s\" "
    361 "target=\"_blank\">Catch Plugins</a>"
    362 msgstr ""
    363 
    364 #: ../includes/ctp-tabs-removal.php:59
     361"target=\"_blank\">Catch Plugins</a>."
     362msgstr ""
     363
     364#: ../includes/ctp-tabs-removal.php:63
    365365msgid "Invalid Nonce"
    366366msgstr ""
    367367
    368 #: ../includes/ctp-tabs-removal.php:62
     368#: ../includes/ctp-tabs-removal.php:66
    369369msgid "Permission denied!"
    370370msgstr ""
    371371
    372 #: ../includes/ctp-tabs-removal.php:75
     372#: ../includes/ctp-tabs-removal.php:79
    373373msgid "Connection Error. Please try again."
    374374msgstr ""
  • catch-sticky-menu/trunk/public/partials/catch-sticky-menu-public-display.php

    r1976181 r3468483  
    11<?php
     2
     3// Exit if accessed directly
     4if (! defined('ABSPATH')) exit;
    25
    36/**
Note: See TracChangeset for help on using the changeset viewer.