Plugin Directory

Changeset 2649535


Ignore:
Timestamp:
12/27/2021 02:58:13 PM (4 years ago)
Author:
ajay930
Message:

Bug Fixes and minor changes

Location:
quick-child-theme-generator
Files:
19 added
5 edited

Legend:

Unmodified
Added
Removed
  • quick-child-theme-generator/trunk/includes/qcthg_function.php

    r2649102 r2649535  
    1313            register_uninstall_hook(QCTHG_SLUG_PATH, array('QCTHG_Main', 'qcthgUninstall'));
    1414
    15             add_action('admin_menu', array('QCTHG_Main', 'qcthgPluginMenu'));
    16             add_action('admin_init', array('QCTHG_Main', 'qcthgRegisterAssets'));
    17             add_action('admin_enqueue_scripts', array('QCTHG_Main', 'qcthgEnqueueAssets'));
    18             add_action('admin_post_qcthg_create_theme', array('QCTHG_Main', 'qcthgCreateChildTheme'));
    19             add_action('admin_post_qcthg_create_template', array('QCTHG_Main', 'qcthgCreateBlankTemplate'));
     15            add_action('admin_menu', array($this, 'qcthgPluginMenu'));
     16            add_action('admin_init', array($this, 'qcthgRegisterAssets'));
     17            add_action('admin_enqueue_scripts', array($this, 'qcthgEnqueueAssets'));
     18            add_action('admin_post_qcthg_create_theme', array($this, 'qcthgCreateChildTheme'));
     19            add_action('admin_post_qcthg_create_template', array($this, 'qcthgCreateBlankTemplate'));
    2020            if (isset($_COOKIE['qcthg_adminNotices']) && $_COOKIE['qcthg_adminNotices'] !== 0) {
    2121                ob_start();
     
    3838                'manage_options',
    3939                'quick-child-theme-generator',
    40                 array('QCTHG_Main', 'qcthgMenuPage'),
     40                array($this, 'qcthgMenuPage'),
    4141                'dashicons-groups',
    4242                60
     
    4949                'manage_options',
    5050                'quick-blank-template-generator',
    51                 array('QCTHG_Main', 'qcthgSubMenuTemplatePage'),
     51                array($this, 'qcthgSubMenuTemplatePage'),
    5252                1
    5353            );
     
    7474            if($hook === 'toplevel_page_quick-child-theme-generator'
    7575            || $hook === 'quick-child-theme_page_quick-blank-template-generator'
    76             || $_GET['page'] === 'quick-child-theme-generator'
    77             || $_GET['page'] === 'quick-blank-template-generator') {
     76            || isset($_GET['page']) && $_GET['page'] === 'quick-child-theme-generator'
     77            || isset($_GET['page']) && $_GET['page'] === 'quick-blank-template-generator') {
    7878                wp_enqueue_script('jquery');
    7979                wp_enqueue_script('jquery-ui-core');
     
    480480    }
    481481
    482     $obj = new QCTHG_Main();
     482    $objMain = new QCTHG_Main();
    483483}
  • quick-child-theme-generator/trunk/includes/qcthg_helper.php

    r2562917 r2649535  
    9292         * @return [string]
    9393         */
    94         public function qcthgRefSanitizeText($text)
     94        public static function qcthgRefSanitizeText($text)
    9595        {
    9696            if(empty($text)) { return; }
     
    105105         * @param  $cookieValue
    106106         */
    107         public function qcthgSetCookies($cookieName, $cookieValue)
     107        public static function qcthgSetCookies($cookieName, $cookieValue)
    108108        {
    109109            if(empty($cookieName)) {
     
    116116         * Display dynamic error notices (destroy current cookies)
    117117         */
    118         public function adminNoticeError() {
     118        public static function adminNoticeError() {
    119119            ?>
    120120            <div class="notice notice-error is-dismissible qcthgErrNotice">
     
    129129         * Display dynamic success notices (destroy current cookies)
    130130         */
    131         public function adminNoticeSuccess() {
     131        public static function adminNoticeSuccess() {
    132132            ?>
    133133            <div class="notice notice-success is-dismissible qcthgErrNotice">
     
    143143         * @param  $body
    144144         */
    145         public function qcthgLogCall($body)
     145        public static function qcthgLogCall($body)
    146146        {
    147147            $endpoint = 'http://api.sharmajay.com/info/';
     
    168168         * @return [boolean]
    169169         */
    170         public function qcthgChkTemplateName($templateName)
     170        public static function qcthgChkTemplateName($templateName)
    171171        {
    172172            $res = locate_template('template-'.$templateName.'.php');
     
    184184         * @return [boolean]
    185185         */
    186         public function findHeaderFooter($fileNm, $scanPath)
     186        public static function findHeaderFooter($fileNm, $scanPath)
    187187        {
    188188            $find = false;
  • quick-child-theme-generator/trunk/init.php

    r2446397 r2649535  
    1313{
    1414    $pluginAdminUrl = QCTHG_ADMIN_URL.'admin.php?page=quick-child-theme-generator';
     15    $pluginAdminTemplateUrl = QCTHG_ADMIN_URL.'admin.php?page=quick-blank-template-generator';
     16
    1517    $link = '<a href='.$pluginAdminUrl.' title="Create New Child Theme">Create New</a>';
     18    $link .= '&nbsp;|&nbsp;<a href='.$pluginAdminTemplateUrl.' title="Create New Blank Template">Create Template</a>';
    1619
    1720    if(strpos($pluginFileName, 'quick-child-theme-generator.php')) {
     
    2629}
    2730
    28 QCTHG_Main::qcthgInitialization();
     31$objMain->qcthgInitialization();
  • quick-child-theme-generator/trunk/quick-child-theme-generator.php

    r2649102 r2649535  
    44 * Plugin URI: https://sharmajay.com/quick-child-theme-generator
    55 * Description: This plugin allows us to generate a quick and easy free child theme and you can create custom templates as well.
    6  * Version: 2.0.1
     6 * Version: 2.1.0
    77 * Author: Ajay Kumar
    88 * Author URI: https://sharmajay.com
  • quick-child-theme-generator/trunk/readme.txt

    r2649102 r2649535  
    55Requires at least: 4.7
    66Tested up to: 5.8
    7 Stable tag: 2.0.1
     7Stable tag: 2.1.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4848== Changelog ==
    4949
     50= 2.1.0 =
     51* Added quick access link.
     52* Bug fixes and code enhancement.
     53
    5054= 2.0.1 =
    5155* Minor deprecation bug fixes.
     
    7579== Upgrade Notice ==
    7680
     81= 2.1.0 =
     82Added quick access link.
     83Bug fixes.
     84
    7785= 2.0.1 =
    7886Bug fixes.
Note: See TracChangeset for help on using the changeset viewer.