Make WordPress Themes

Changeset 320678


Ignore:
Timestamp:
04/02/2026 05:39:11 AM (7 months ago)
Author:
themedropbox
Message:

New version of Trendy Storefront - 1.1

Location:
trendy-storefront/1.1
Files:
10 added
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trendy-storefront/1.1/apex-library/customizer.php

    r318639 r320678  
    2727        // Load theme options.
    2828        include get_template_directory() . '/apex-library/theme-options.php';
     29
     30        // Load footer options.
     31        include get_template_directory() . '/apex-library/footer-options.php';
    2932
    3033        if ( isset( $wp_customize->selective_refresh ) ) {
    … …  
    6669}
    6770add_action( 'customize_preview_init', 'trendy_storefront_customize_preview_js' );
     71
     72
     73/**
     74 * Singleton class for handling the theme's customizer integration.
     75 *
     76 * @since  1.0.0
     77 * @access public
     78 */
     79final class Trendy_Storefront_Customize {
     80
     81        /**
     82         * Returns the instance.
     83         *
     84         * @since  1.0.0
     85         * @access public
     86         * @return object
     87         */
     88        public static function get_instance() {
     89
     90                static $trendy_storefront_instance = null;
     91
     92                if ( is_null( $trendy_storefront_instance ) ) {
     93                        $trendy_storefront_instance = new self;
     94                        $trendy_storefront_instance->setup_actions();
     95                }
     96
     97                return $trendy_storefront_instance;
     98        }
     99
     100        /**
     101         * Constructor method.
     102         *
     103         * @since  1.0.0
     104         * @access private
     105         * @return void
     106         */
     107        private function __construct() {}
     108
     109        /**
     110         * Sets up initial actions.
     111         *
     112         * @since  1.0.0
     113         * @access private
     114         * @return void
     115         */
     116        private function setup_actions() {
     117
     118                // Register panels, sections, settings, controls, and partials.
     119                add_action( 'customize_register', array( $this, 'sections' ) );
     120
     121                // Register scripts and styles for the controls.
     122                add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
     123        }
     124
     125        /**
     126         * Sets up the customizer sections.
     127         *
     128         * @since  1.0.0
     129         * @access public
     130         * @param  object  $manager
     131         * @return void
     132        */
     133        public function sections( $manager ) {
     134
     135                // Load custom sections.
     136                load_template( trailingslashit( get_template_directory() ) . '/apex-library/section-pro.php' );
     137
     138                // Register custom section types.
     139                $manager->register_section_type( 'Trendy_Storefront_Customize_Section_Pro' );
     140
     141                // Register sections.
     142                $manager->add_section( new Trendy_Storefront_Customize_Section_Pro( $manager,'trendy_storefront_go_pro', array(
     143                        'priority'   => 1,
     144                        'title'    => esc_html__( 'Trendy Storefront Pro', 'trendy-storefront' ),
     145                        'pro_text' => esc_html__( 'Buy Pro', 'trendy-storefront' ),
     146                        'pro_url'    => 'https://www.apexthemes.net/products/ecommerce-wordpress-theme/'
     147                ) )     );
     148
     149        }
     150
     151        /**
     152         * Loads theme customizer CSS.
     153         *
     154         * @since  1.0.0
     155         * @access public
     156         * @return void
     157         */
     158        public function enqueue_control_scripts() {
     159
     160                wp_enqueue_script( 'trendy-storefront-customize-controls', trailingslashit( get_template_directory_uri() ) . '/assets/js/customize-controls.js', array( 'customize-controls' ) );
     161
     162                wp_enqueue_style( 'trendy-storefront-customize-controls', trailingslashit( get_template_directory_uri() ) . '/assets/css/customize-controls.css' );
     163        }
     164}
     165
     166// Doing this customizer thang!
     167Trendy_Storefront_Customize::get_instance();
  • trendy-storefront/1.1/footer.php

    r318639 r320678  
    7676                        <div class="container">
    7777                                <?php
    78                                 $trendy_storefront_copyright_text = sprintf( __( 'Theme Trendy Storefront By Apex Themes', 'trendy-storefront' ) ); ?>
     78                                        if ( ! get_theme_mod('trendy_storefront_copyright_option') ) {
    7979
    80                                 <?php echo $trendy_storefront_copyright_text; ?>
     80                                                $trendy_storefront_theme_name  = wp_get_theme()->get('Name');
     81                                                $trendy_storefront_theme_uri   = wp_get_theme()->get('ThemeURI');
     82                                                $trendy_storefront_author_name = wp_get_theme()->get('Author');
     83                                                $trendy_storefront_author_uri  = wp_get_theme()->get('AuthorURI');
     84                                                ?>
     85
     86                                                <a target="_blank" href="<?php echo esc_url( $trendy_storefront_theme_uri ); ?>">
     87                                                        <?php echo esc_html( $trendy_storefront_theme_name ); ?>
     88                                                </a>
     89
     90                                                <?php echo esc_html(' By '); ?>
     91
     92                                                <a target="_blank" href="<?php echo esc_url( $trendy_storefront_author_uri ); ?>">
     93                                                        <?php echo esc_html( $trendy_storefront_author_name ); ?>
     94                                                </a>
     95
     96                                        <?php
     97                                        } else {
     98                                                echo esc_html( get_theme_mod('trendy_storefront_copyright_option') );
     99                                        }
     100                                ?>
    81101                        </div>
    82102                </div>
  • trendy-storefront/1.1/functions.php

    r318639 r320678  
    1212                add_theme_support( 'automatic-feed-links' );
    1313
     14                load_theme_textdomain( 'trendy-storefront', get_template_directory() . '/languages' );
     15               
    1416                add_theme_support( 'title-tag' );
    1517
    … …  
    325327require get_template_directory() . '/apex-library/icon-functions.php';
    326328
     329/**
     330 * Get Started Page.
     331 */
     332require get_template_directory() . '/apex-library/theme-info.php';
    327333
    328334/**
    … …  
    443449add_action( 'wp_ajax_filter_products_by_category', 'trendy_storefront_filter_products_by_category' );
    444450add_action( 'wp_ajax_nopriv_filter_products_by_category', 'trendy_storefront_filter_products_by_category' );
     451
     452
     453
     454// Add admin notice
     455function trendy_storefront_admin_notice() {
     456    global $pagenow;
     457
     458    $trendy_storefront_theme = wp_get_theme();
     459    $trendy_storefront_meta  = get_option('trendy_storefront_admin_notice');
     460    $trendy_storefront_screen                  = get_current_screen();
     461
     462    if ( !$trendy_storefront_meta ) {
     463
     464        if ( is_network_admin() || ! current_user_can('manage_options') ) {
     465            return;
     466        }
     467
     468        if ( $trendy_storefront_screen->base !== 'appearance_page_trendy-storefront-info' ) {
     469
     470            $trendy_storefront_version = $trendy_storefront_theme->get('Version');
     471            ?>
     472
     473            <div class="notice trendy-storefront-notice-main-div">
     474
     475                <!-- Dismiss -->
     476                                <a class="trendy-storefront-dismiss" href="<?php echo esc_url( add_query_arg( 'trendy_storefront_admin_notice', '1' ) ); ?>">
     477                                        <span class="dashicons dashicons-no-alt"></span>
     478                                </a>
     479
     480                <!-- Header -->
     481                <div class="trendy-storefront-notice">
     482                    <div class="trendy-storefront-notice-title">
     483                        <h1><?php echo esc_html( $trendy_storefront_theme->get('Name') ); ?></h1>
     484                        <span>
     485                            <?php esc_html_e('Version', 'trendy-storefront'); ?>
     486                            <?php echo esc_html($trendy_storefront_version); ?>
     487                        </span>
     488                    </div>
     489
     490                    <div class="trendy-storefront-notice-buttons">
     491                        <a href="<?php echo esc_url('https://www.apexthemes.net/products/ecommerce-wordpress-theme/'); ?>" target="_blank" class="button button-primary">
     492                            <?php esc_html_e('Get Premium', 'trendy-storefront'); ?>
     493                        </a>
     494
     495                        <a href="<?php echo esc_url('https://trial.apexthemes.net/trendy-storefront/'); ?>" target="_blank" class="button">
     496                            <?php esc_html_e('Live Demo', 'trendy-storefront'); ?>
     497                        </a>
     498
     499                        <a href="<?php echo esc_url( admin_url( 'themes.php?page=trendy-storefront-info' ) ); ?>" target="_blank" class="button">
     500                            <?php esc_html_e('Get Started', 'trendy-storefront'); ?>
     501                        </a>
     502                    </div>
     503
     504                                        <div class="trendy-storefront-notice-logo">
     505                                                <img src="<?php echo esc_url( get_stylesheet_directory_uri() . '/assets/images/apex-logo.png' ); ?>" alt="<?php esc_attr_e( 'Theme Screenshot', 'trendy-storefront' ); ?>">
     506                    </div>
     507                </div>
     508
     509            </div>
     510
     511            <?php
     512        }
     513    }
     514}
     515add_action('admin_notices', 'trendy_storefront_admin_notice');
     516
     517if( ! function_exists( 'trendy_storefront_update_admin_notice' ) ) :
     518/**
     519 * Updating admin notice on dismiss
     520*/
     521function trendy_storefront_update_admin_notice(){
     522    if ( isset( $_GET['trendy_storefront_admin_notice'] ) && $_GET['trendy_storefront_admin_notice'] = '1' ) {
     523        update_option( 'trendy_storefront_admin_notice', true );
     524    }
     525}
     526endif;
     527add_action( 'admin_init', 'trendy_storefront_update_admin_notice' );
     528
     529
     530add_action('after_switch_theme', 'trendy_storefront_setup_options');
     531function trendy_storefront_setup_options () {
     532    update_option('trendy_storefront_admin_notice', FALSE );
     533}
     534
     535function trendy_storefront_notice_styles() {
     536        wp_enqueue_style(
     537                'trendy-storefront-notice-function',
     538                get_stylesheet_directory_uri() . '/assets/css/notice-function.css',
     539                array(),
     540                '1.0.0'
     541        );
     542}
     543add_action( 'admin_enqueue_scripts', 'trendy_storefront_notice_styles' );
  • trendy-storefront/1.1/readme.txt

    r318639 r320678  
    2828= 1.0 =
    2929* Initial release
     30
     31= 1.1 =
     32* Added Getstart.
     33* Added Notice.
     34* Added Customizer Upsell Button.
     35* Added POT File.
    3036
    3137== Image for theme screenshot ==
  • trendy-storefront/1.1/style.css

    r318639 r320678  
    55Author URI: https://www.apexthemes.net/
    66Description: Trendy Storefront is a versatile theme crafted to make your online store visually engaging and easy to navigate. Ideal for boutiques, lifestyle shops, and specialty eCommerce businesses, it lets you showcase products with organized layouts and clear category sections. Fully compatible with WooCommerce, the theme simplifies adding products, creating featured collections, and managing promotions. You can customize headers, adjust layouts, and choose color schemes that match your brand identity. With fast-loading pages, SEO-friendly coding, and mobile-ready design, Trendy Storefront delivers a smooth and efficient shopping experience for all visitors. Its intuitive structure ensures your customers can find products quickly while enjoying a visually appealing storefront. Whether you sell fashion, gadgets, or handmade goods, Trendy Storefront offers a reliable, adaptable, and performance-focused platform to grow your online business.
    7 Version: 1.0
     7Version: 1.1
    88Requires at least: 5.5
    99Requires PHP: 5.6
Note: See TracChangeset for help on using the changeset viewer.