Make WordPress Themes

Changeset 354896


Ignore:
Timestamp:
10/21/2026 01:34:28 PM (7 hours ago)
Author:
themedropbox
Message:

New version of SKT Association - 2.2

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

Legend:

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

    r276415 r354896  
    237237add_action( 'widgets_init', 'skt_association_unregister_widgets_area', 11 );
    238238
    239 require_once get_stylesheet_directory() . '/inc/about-themes.php'; 
    240239require_once get_stylesheet_directory() . '/inc/customizer.php';
    241240
    … …  
    275274        tgmpa( $plugins, $config );
    276275}
     276
     277/**
     278 * Parent theme dashboard customizations.
     279 */
     280if ( is_admin() ) {
     281        add_filter( 'skt_activism_lite_ti_links', 'skt_association_override_ti_links', 20 );
     282        add_filter( 'template_directory_uri', 'skt_association_override_ti_shot_uri', 20 );
     283}
     284
     285/**
     286 * Override the parent theme info-page links.
     287 *
     288 * @param array $links Links from the parent theme.
     289 * @return array
     290 */
     291function skt_association_override_ti_links( $links ) {
     292        if ( ! is_array( $links ) ) {
     293                return $links;
     294        }
     295
     296        $overrides = array(
     297                'brand'           => __( 'Let Us Build with SKT Themes', 'skt-association' ),
     298                'pro_buy'         => 'https://www.sktthemes.org/shop/association-wordpress-theme/',
     299                'live_demo'       => 'https://sktperfectdemo.com/themepack/association/',
     300                'support'         => 'https://wordpress.org/support/theme/skt-association/',
     301                'pro_doc'         => 'https://www.sktthemesdemo.net/documentation/skt-elementor-doc/',
     302                'free_doc'        => 'https://www.sktthemesdemo.net/documentation/skt-association-doc/',
     303                'bundle_buy'      => 'https://www.sktthemes.org/shop/all-themes/',
     304                'bundle_lifetime' => 'https://www.sktthemes.org/shop/lifetime-access-wordpress-themes/',
     305                'bundle_doc'      => 'https://sktthemesdemo.net/documentation/',
     306                'theme_count'     => '420+',
     307                'bundle_price'    => '$69',
     308                'lifetime_price'  => '$199',
     309        );
     310
     311        return array_merge( $links, $overrides );
     312}
     313
     314function skt_association_override_ti_shot_uri( $uri ) {
     315        static $source_cache = array();
     316
     317        if ( ! is_child_theme() ) {
     318                return $uri;
     319        }
     320
     321        // Parent functions whose $shot should use the child theme screenshot.
     322        $allowed_callers = array(
     323                'skt_activism_lite_ti_page_display',
     324                'skt_activism_lite_ti_welcome_notice', // Replace with the real function name from theme-welcome.php.
     325        );
     326
     327        $trace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 6 ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
     328
     329        foreach ( $trace as $i => $frame ) {
     330                if ( ! isset( $frame['function'] ) || 'get_template_directory_uri' !== $frame['function'] ) {
     331                        continue;
     332                }
     333
     334                $caller = isset( $trace[ $i + 1 ]['function'] ) ? $trace[ $i + 1 ]['function'] : '';
     335                if ( ! in_array( $caller, $allowed_callers, true ) || empty( $frame['file'] ) || empty( $frame['line'] ) ) {
     336                        return $uri;
     337                }
     338
     339                if ( ! isset( $source_cache[ $frame['file'] ] ) ) {
     340                        $source_cache[ $frame['file'] ] = file( $frame['file'] );
     341                }
     342                $lines = $source_cache[ $frame['file'] ];
     343                $code  = isset( $lines[ $frame['line'] - 1 ] ) ? $lines[ $frame['line'] - 1 ] : '';
     344
     345                if ( false !== strpos( $code, 'screenshot.png' )
     346                        && file_exists( get_stylesheet_directory() . '/screenshot.png' ) ) {
     347                        return get_stylesheet_directory_uri();
     348                }
     349
     350                return $uri;
     351        }
     352
     353        return $uri;
     354}
     355/**
     356 * Parent theme dashboard customizations.
     357 */
  • skt-association/2.2/readme.txt

    r316199 r354896  
    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
    … …  
    4848License URL: https://www.gnu.org/licenses/license-list.html#GNUGPLv2
    4949
     50
     51= 2.2 =
     52*      Added the Theme Dashboard menu and corrected the author.
     53
    5054= 2.1 =
    5155*      Author URL to be rectified.
  • skt-association/2.2/style.css

    r316199 r354896  
    66Description: SKT Association theme is responsive. It caters to government municipality, alumni, university school and college websites. Civic society non profit, neighborhood charity donation, fundraiser, blood banks, activism and community kind of websites can also be built using this. Simple and built using Elementor. It is SEO friendly and compatible with contact form and WooCommerce. Documentation: https://www.sktthemesdemo.net/documentation/skt-association-doc/
    77Template: skt-activism-lite
    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.