Make WordPress Themes

Changeset 357208


Ignore:
Timestamp:
11/04/2026 01:01:53 PM (13 hours ago)
Author:
themedropbox
Message:

New version of SKT Organic - 2.2

Location:
skt-organic/2.2
Files:
3 deleted
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • skt-organic/2.2/functions.php

    r282173 r357208  
    236236}
    237237add_action( 'widgets_init', 'skt_organic_unregister_widgets_area', 11 );
    238 
    239 require_once get_stylesheet_directory() . '/inc/about-themes.php'; 
     238 
    240239require_once get_stylesheet_directory() . '/inc/customizer.php';
    241240
    … …  
    307306                return $fragments;
    308307}
     308
     309/**
     310 * Parent theme dashboard customizations.
     311 */
     312if ( is_admin() ) {
     313        add_filter( 'skt_ayurveda_ti_links', 'skt_organic_override_ti_links', 20 );
     314        add_filter( 'template_directory_uri', 'skt_organic_override_ti_shot_uri', 20 );
     315}
     316
     317/**
     318 * Override the parent theme info-page links.
     319 *
     320 * @param array $links Links from the parent theme.
     321 * @return array
     322 */
     323function skt_organic_override_ti_links( $links ) {
     324        if ( ! is_array( $links ) ) {
     325                return $links;
     326        }
     327
     328        $overrides = array(
     329                'brand'           => __( 'Let Us Build with SKT Themes', 'skt-organic' ),
     330                'pro_buy'         => 'https://www.sktthemes.org/shop/skt-organic/',
     331                'live_demo'       => 'https://sktperfectdemo.com/demos/organic/',
     332                'support'         => 'https://wordpress.org/support/theme/skt-organic/',
     333                'pro_doc'         => 'https://www.sktthemesdemo.net/documentation/skt-elementor-doc/',
     334                'free_doc'        => 'https://www.sktthemesdemo.net/documentation/skt-ayurveda-doc/',
     335                'bundle_buy'      => 'https://www.sktthemes.org/shop/all-themes/',
     336                'bundle_lifetime' => 'https://www.sktthemes.org/shop/lifetime-access-wordpress-themes/',
     337                'bundle_doc'      => 'https://sktthemesdemo.net/documentation/',
     338                'theme_count'     => '420+',
     339                'bundle_price'    => '$69',
     340                'lifetime_price'  => '$199',
     341        );
     342
     343        return array_merge( $links, $overrides );
     344}
     345
     346function skt_organic_override_ti_shot_uri( $uri ) {
     347        static $source_cache = array();
     348
     349        if ( ! is_child_theme() ) {
     350                return $uri;
     351        }
     352
     353        // Parent functions whose $shot should use the child theme screenshot.
     354        $allowed_callers = array(
     355                'skt_ayurveda_ti_page_display',
     356                'skt_ayurveda_ti_welcome_notice', // Replace with the real function name from theme-welcome.php.
     357        );
     358
     359        $trace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 6 ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
     360
     361        foreach ( $trace as $i => $frame ) {
     362                if ( ! isset( $frame['function'] ) || 'get_template_directory_uri' !== $frame['function'] ) {
     363                        continue;
     364                }
     365
     366                $caller = isset( $trace[ $i + 1 ]['function'] ) ? $trace[ $i + 1 ]['function'] : '';
     367                if ( ! in_array( $caller, $allowed_callers, true ) || empty( $frame['file'] ) || empty( $frame['line'] ) ) {
     368                        return $uri;
     369                }
     370
     371                if ( ! isset( $source_cache[ $frame['file'] ] ) ) {
     372                        $source_cache[ $frame['file'] ] = file( $frame['file'] );
     373                }
     374                $lines = $source_cache[ $frame['file'] ];
     375                $code  = isset( $lines[ $frame['line'] - 1 ] ) ? $lines[ $frame['line'] - 1 ] : '';
     376
     377                if ( false !== strpos( $code, 'screenshot.png' )
     378                        && file_exists( get_stylesheet_directory() . '/screenshot.png' ) ) {
     379                        return get_stylesheet_directory_uri();
     380                }
     381
     382                return $uri;
     383        }
     384
     385        return $uri;
     386}
     387/**
     388 * Parent theme dashboard customizations.
     389 */
  • skt-organic/2.2/readme.txt

    r316193 r357208  
    33Contributors: sonalsinha21
    44Requires PHP:  5.6
    5 Tested up to: 6.9
    6 Version: 2.1
     5Tested up to: 7.1
     6Version: 2.2
    77License: GPL-2.0-or-later
    88License URI: https://www.gnu.org/licenses/license-list.html#GPLv2
    … …  
    2020
    2121*   SKT Themes Self Designed Images:
    22         skt-organic/images/free-vs-pro.png
    23         skt-organic/images/sktskill.jpg
    2422        skt-organic/images/cart-icon.png
    2523        skt-organic/images/logo.png
    … …  
    6563= 2.1 =
    6664*      Author URL to be rectified.
     65
     66= 2.2 =
     67*      Added the Theme Dashboard menu and corrected the author.
  • skt-organic/2.2/style.css

    r316193 r357208  
    22Theme Name: SKT Organic
    33Theme URI: https://www.sktthemes.org/shop/skt-organic/
    4 Author: SKT Themes
    5 Author URI: https://wordpress.org/themes/author/sonalsinha21/
     4Author: sonalsinha21
     5Author URI: https://profiles.wordpress.org/sonalsinha21/
    66Description: SKT Organic Theme is a clean and eco friendly WordPress theme ideal for projects focused on sustainable living and natural growth. It suits websites promoting green practices like organic cultivation, chemical-free produce, regenerative agriculture, and holistic agriculture. With support for ecological methods, recycling, and conservation, this theme is perfect for those embracing bio farming, eco farming, and a greener nature future. Documentation : https://www.sktthemesdemo.net/documentation/skt-ayurveda-doc/
    77Template: skt-ayurveda
    8 Version: 2.1
     8Version: 2.2
    99Requires at least: 5.3
    10 Tested up to: 6.9
     10Tested up to: 7.1
    1111Requires PHP: 5.6
    1212License: GNU General Public License
Note: See TracChangeset for help on using the changeset viewer.