Make WordPress Themes

Changeset 304968


Ignore:
Timestamp:
12/20/2025 02:00:46 PM (10 months ago)
Author:
themedropbox
Message:

New version of Bakers Bakery - 0.8.4

Location:
bakers-bakery/0.8.4
Files:
1 added
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bakers-bakery/0.8.4/functions.php

    r292917 r304968  
    166166    remove_action( 'remove_menu_page','cake-shop-bakery-info' );
    167167    remove_action( 'admin_menu','demo_importer_admin_page' );
     168    remove_action( 'admin_enqueue_scripts', 'cake_shop_bakery_getpage_css' );
     169    remove_action( 'admin_notices', 'cake_shop_bakery_deprecated_hook_admin_notice' );
     170    remove_action( 'remove_menu_page','cake-shop-bakery-info' );
     171    remove_action( 'admin_menu','cake_shop_bakery_demo_importer_admin_page' );
    168172    remove_action( 'admin_notices','cake_shop_bakery_deprecated_hook_admin_notice' );
    169173}
    170 add_action( 'init', 'bakers_bakery_remove_my_action');
     174add_action( 'after_setup_theme', 'bakers_bakery_remove_my_action');
     175
     176function bakers_bakery_remove_parent_theme_hooks() {
     177    remove_action('init', 'bakers_bakery_remove_my_action');
     178}
     179add_action('after_setup_theme', 'bakers_bakery_remove_parent_theme_hooks', 20);
    171180
    172181add_action('admin_menu', 'remove_my_theme_page', 999);
    … …  
    224233                <h2 style="font-weight: 600;line-height: 1.3; margin: 0px;"><?php esc_html_e('Thank You For Choosing ', 'bakers-bakery'); ?><?php echo wp_get_theme(); ?><h2>
    225234                <p style="color: #3c434a; font-weight: 400; margin-bottom: 30px;"><?php _e('Get Started With Theme By Clicking On Getting Started.', 'bakers-bakery'); ?><p>
    226                 <a class="admin-notice-btn button button-primary button-hero" href="<?php echo esc_url( admin_url( 'themes.php?page=bakers-bakery-info.php' )); ?>"><?php esc_html_e( 'Get started', 'bakers-bakery' ) ?></a>
    227                 <a class="admin-notice-btn button button-primary button-hero" target="_blank" href="<?php echo esc_url( CAKE_SHOP_BAKERY_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation', 'bakers-bakery' ) ?></a>
     235                <a class="admin-notice-btn button button-primary button-hero" href="<?php echo esc_url( admin_url( 'themes.php?page=bakers-bakery-info' )); ?>"><?php esc_html_e( 'Get started', 'bakers-bakery' ) ?></a>
     236                <a class="admin-notice-btn button button-primary button-hero notice-pro-btn" target="_blank" href="<?php echo esc_url( CAKE_SHOP_BAKERY_GET_PREMIUM_PRO ); ?>"><?php esc_html_e( 'Get Premium ', 'bakers-bakery' ) ?></a>
     237                <a class="admin-notice-btn button button-primary button-hero notice-bundle-btn" target="_blank" href="<?php echo esc_url( CAKE_SHOP_BAKERY_BUNDLE_LINK ); ?>"><?php esc_html_e( 'Buy All Themes - 120+ Templates', 'bakers-bakery' ) ?></a>
    228238                <span style="padding-top: 15px; display: inline-block; padding-left: 8px;">
    229239                <span class="dashicons dashicons-admin-links"></span>
    … …  
    245255    die();
    246256}
     257
     258// Demo Content Code
     259
     260// Ensure WordPress is loaded
     261if (!defined('ABSPATH')) {
     262    exit;
     263}
     264
     265// Add the AJAX action to trigger theme mods import
     266add_action('wp_ajax_import_theme_mods', 'bakers_bakery_demo_importer_ajax_handler');
     267
     268// Handle the AJAX request
     269function bakers_bakery_demo_importer_ajax_handler() {
     270    // Sample data to import
     271    $theme_mods_data = array(
     272        'header_textcolor' => '000000',  // Example: change header text color
     273        'background_color' => 'ffffff',  // Example: change background color
     274        'custom_logo'      => 123,       // Example: set a custom logo by attachment ID
     275        'footer_text'      => 'Custom Footer Text', // Example: custom footer text
     276    );
     277
     278    // Call the function to import theme mods
     279    if (bakers_bakery_demo_theme_importer($theme_mods_data)) {
     280        // After importing theme mods, create the menu
     281        bakers_bakery_create_demo_menu();
     282        wp_send_json_success(array(
     283            'msg' => 'Theme mods imported successfully.',
     284            'redirect' => home_url()
     285        ));
     286    } else {
     287        wp_send_json_error('Failed to import theme mods.');
     288    }
     289
     290    wp_die();
     291}
     292
     293// Function to set theme mods
     294function bakers_bakery_demo_theme_importer($import_data) {
     295    if (is_array($import_data)) {
     296        foreach ($import_data as $mod_name => $mod_value) {
     297            set_theme_mod($mod_name, $mod_value);
     298        }
     299        return true;
     300    } else {
     301        return false;
     302    }
     303}
     304
     305// Function to create demo menu
     306function bakers_bakery_create_demo_menu() {
     307
     308    $menu_structure = [
     309
     310        [
     311            'title' => 'Home',
     312            'slug'  => 'home',
     313            'template' => 'page-template/home-template.php',
     314        ],
     315        [
     316            'title' => 'Cupcake',
     317            'slug'  => 'cupcake',
     318            'content' => "<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
     319            "
     320        ],
     321        [
     322            'title' => 'Recipes',
     323            'slug'  => 'recipes',
     324            'content' => "<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
     325            "
     326        ],
     327        [
     328            'title' => 'Blog',
     329            'slug'  => 'blog',
     330        ],
     331        [
     332            'title' => 'Pages',
     333            'slug'  => 'pages',
     334            'content' => "<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
     335            "
     336        ],
     337        [
     338            'title' => 'Contact Us',
     339            'slug'  => 'contact',
     340            'content' => "<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
     341            "
     342        ],
     343    ];
     344
     345    // ----------------------------------------------------
     346    // Do not modify below this line unless needed
     347    // ----------------------------------------------------
     348
     349    $created_pages = [];
     350
     351    $menu_name = 'Primary Menu';
     352    $location  = 'primary';
     353    $menu = wp_get_nav_menu_object($menu_name);
     354
     355    $menu_id = (!$menu) ? wp_create_nav_menu($menu_name) : $menu->term_id;
     356
     357    $create_page_and_menu = function($item, $parent_menu_id = 0, $parent_page_id = 0)
     358        use (&$create_page_and_menu, &$created_pages, $menu_id) {
     359
     360        $page = get_page_by_title($item['title']);
     361
     362        if (!$page) {
     363            $page_id = wp_insert_post([
     364                'post_title'   => $item['title'],
     365                'post_type'    => 'page',
     366                'post_status'  => 'publish',
     367                'post_name'    => $item['slug'],
     368                'post_parent'  => $parent_page_id,
     369                'post_content' => !empty($item['content']) ? $item['content'] : '',
     370            ]);
     371
     372            if (!empty($item['template'])) {
     373                update_post_meta($page_id, '_wp_page_template', $item['template']);
     374            }
     375
     376        } else {
     377            $page_id = $page->ID;
     378        }
     379
     380        $created_pages[$item['title']] = $page_id;
     381
     382        $menu_item_id = wp_update_nav_menu_item($menu_id, 0, [
     383            'menu-item-title'     => $item['title'],
     384            'menu-item-object'    => 'page',
     385            'menu-item-object-id' => $page_id,
     386            'menu-item-type'      => 'post_type',
     387            'menu-item-parent-id' => $parent_menu_id,
     388            'menu-item-status'    => 'publish'
     389        ]);
     390
     391        if (!empty($item['children'])) {
     392            foreach ($item['children'] as $child) {
     393                $create_page_and_menu($child, $menu_item_id, $page_id);
     394            }
     395        }
     396    };
     397
     398    foreach ($menu_structure as $item) {
     399        $create_page_and_menu($item);
     400    }
     401
     402    if (!empty($created_pages['Home'])) {
     403        update_option('page_on_front', $created_pages['Home']);
     404        update_option('show_on_front', 'page');
     405    }
     406
     407    if (!empty($created_pages['Blog'])) {
     408        update_option('page_for_posts', $created_pages['Blog']);
     409    }
     410
     411    $locations = get_theme_mod('nav_menu_locations');
     412    $locations[$location] = $menu_id;
     413    set_theme_mod('nav_menu_locations', $locations);
     414
     415    //Slider
     416    set_theme_mod( 'cake_shop_bakery_slider_section_setting', true );
     417    for($i=1;$i<=3;$i++){
     418         $title = 'Yummy sweeties delivered to your dining table!';
     419         $content = 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.';
     420            // Create post object
     421         $my_post = array(
     422         'post_title'    => wp_strip_all_tags( $title ),
     423         'post_content'  => $content,
     424         'post_status'   => 'publish',
     425         'post_type'     => 'page',
     426         );
     427
     428         // Insert the post into the database
     429         $post_id = wp_insert_post( $my_post );
     430
     431         if ($post_id) {
     432            // Set the theme mod for the slider page
     433            set_theme_mod('cake_shop_bakery_top_slider_page' . $i, $post_id);
     434
     435            $image_url = get_stylesheet_directory_uri().'/assets/img/slider.png';
     436
     437            $image_id = media_sideload_image($image_url, $post_id, null, 'id');
     438
     439                if (!is_wp_error($image_id)) {
     440                    // Set the downloaded image as the post's featured image
     441                    set_post_thumbnail($post_id, $image_id);
     442                }
     443        }
     444    }
     445
     446    // Categories
     447    set_theme_mod( 'cake_shop_bakery_new_product_setting', true );
     448    set_theme_mod( 'cake_shop_bakery_new_product_title', 'This Weeks Specials' );
     449    set_theme_mod( 'cake_shop_bakery_new_product_text', 'Try our most popular signature cupcakes and taste the difference!' );
     450
     451    // Products
     452
     453    if ( class_exists( 'WooCommerce' ) ) {
     454
     455        $review_text = array(
     456            'Nice product',
     457            'Good Quality Product',
     458            'Nice Product. Must buy It.',
     459            'I like this Product',
     460            'Nice Product',
     461        );
     462
     463        for($i=1;$i<=4;$i++){
     464            $title = array('Pink Cream Cherry Milk','Gummy Tosca Mixed Flavors','Blushing Strawberry Cream','Mystery Rose Choco');
     465            $content = 'Lorem Ipsum has been the industrys standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book Lorem Ipsum has been the industrys standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book.';
     466            $excerpt = 'Lorem Ipsum has been the industrys standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book Lorem Ipsum has been the industrys standard dummy text ever since the 1500 when an unknown printer took a galley of type and scrambled it to make a type specimen book.';
     467            // Create post object
     468            $my_post = array(
     469                'post_title'    => wp_strip_all_tags( $title[$i-1] ),
     470                'post_content'  => $content,
     471                'post_status'   => 'publish',
     472                'post_type'     => 'product',
     473                'post_excerpt'  => $excerpt
     474            );
     475         
     476            // Insert the post into the database
     477            $post_id = wp_insert_post( $my_post );
     478            // array_push( $_product_ids, $post_id );
     479
     480            for ( $c=0; $c <= 5; $c++ ) {
     481                $comment_id = wp_insert_comment( array(
     482                    'comment_post_ID'      => $post_id,
     483                    'comment_author'       => get_the_author_meta( 'display_name' ),
     484                    'comment_author_email' => get_the_author_meta( 'user_email' ),
     485                    'comment_content'      => $review_text[$c],
     486                    'comment_parent'       => 0,
     487                    'user_id'              => get_current_user_id(), // <== Important
     488                    'comment_date'         => date('Y-m-d H:i:s'),
     489                    'comment_approved'     => 1,
     490                ) );
     491
     492                update_comment_meta( $comment_id, 'rating',
     493                3 );
     494            }
     495
     496            update_post_meta( $post_id, '_regular_price', "120" );
     497            update_post_meta( $post_id, '_sale_price', "80" );
     498            update_post_meta( $post_id, '_price', "80" );
     499
     500            update_post_meta($post_id, 'total_sales', '120');
     501            update_post_meta($post_id, '_manage_stock', 'true');
     502            update_post_meta($post_id, '_stock', '100');
     503
     504            $image_url = get_template_directory_uri().'/assets/images/product'.$i.'.png';
     505
     506            wp_set_object_terms($post_id, array('Featured'), 'product_cat');
     507
     508            $image_name= 'product'.$i.'.png';
     509            $upload_dir       = wp_upload_dir();
     510            // Set upload folder
     511            $image_data= file_get_contents($image_url);
     512            // Get image data
     513            $unique_file_name = wp_unique_filename( $upload_dir['path'], $image_name );
     514            // Generate unique name
     515            $filename= basename( $unique_file_name );
     516            // Create image file name
     517
     518            // Check folder permission and define file location
     519            if( wp_mkdir_p( $upload_dir['path'] ) ) {
     520                $file = $upload_dir['path'] . '/' . $filename;
     521            } else {
     522                $file = $upload_dir['basedir'] . '/' . $filename;
     523            }
     524
     525            // Create the image  file on the server
     526            file_put_contents( $file, $image_data );
     527
     528            // Check image file type
     529            $wp_filetype = wp_check_filetype( $filename, null );
     530
     531            // Set attachment data
     532            $attachment = array(
     533            'post_mime_type' => $wp_filetype['type'],
     534            'post_title'     => sanitize_file_name( $filename ),
     535            'post_content'   => '',
     536            'post_type'     => 'product',
     537            'post_status'    => 'inherit'
     538            );
     539
     540            // Create the attachment
     541            $attach_id = wp_insert_attachment( $attachment, $file, $post_id );
     542
     543            // Include image.php
     544            require_once(ABSPATH . 'wp-admin/includes/image.php');
     545
     546            // Define attachment metadata
     547            $attach_data = wp_generate_attachment_metadata( $attach_id, $file );
     548
     549            // Assign metadata to attachment
     550            wp_update_attachment_metadata( $attach_id, $attach_data );
     551
     552            // And finally assign featured image to post
     553            set_post_thumbnail( $post_id, $attach_id );
     554        }
     555        }
     556   
     557}
     558
     559add_action( 'customize_register', 'bakers_bakery_override_child_theme_global_color_defaults', 20 );
     560function bakers_bakery_override_child_theme_global_color_defaults( $wp_customize ) {
     561
     562    if ( $wp_customize->get_setting( 'cake_shop_bakery_first_color' ) ) {
     563        $wp_customize->get_setting( 'cake_shop_bakery_first_color' )->default = '#f784b9';
     564    }
     565}
  • bakers-bakery/0.8.4/inc/theme-installation/assets/css/theme-installation.css

    r292917 r304968  
    1414    margin: 0 auto;
    1515}
    16 .about-wrap .header-wrap{
    17         background-color: #f5f7f9;
    18         padding: 60px;
    19 }
    20 .bundle-btn{
    21         background-color: #FE7700 !important;
    22         font-weight: bold;
    23         border-color: #FE7700 !important;
     16.about-wrap .header-wrap {
     17    background-color: #f15b26;
     18    padding: 30px 60px;
    2419}
    2520@media screen and (min-width: 768px){
    … …  
    3833        margin: 0;
    3934}
     35.about-wrap .about-text{
     36        font-size: 15px;
     37}
    4038.about-wrap h1{
    4139        margin-bottom: 15px;
     40        color: #fff;
    4241}
    4342.about-wrap .about-text {
    4443        margin-bottom: 40px;
     44        color: #fff;
     45}
     46a.button.button-hero.button-secondary{
     47        border-color: #FFFFFF !important;
     48        color: #000000 !important;
     49        font-weight: bold;
    4550}
    4651.info-wrap .col-wrap .col.theme-img img {
    4752        max-width: 300px;
     53}
     54.bundle-btn{
     55        background-color: #4cc2c0 !important;
     56        font-weight: bold;
     57        border-color: #4cc2c0 !important;
    4858}
    4959@media screen and (max-width: 767px){
    … …  
    5464/*Tab*/
    5565.about-wrap.info-wrap .nav-tab {
    56         font-size: 14px;
    57         font-weight: 400;
     66    font-size: 15px;
     67    font-weight: 500;
    5868}
    5969.nav-tab-wrapper, .wrap h2.nav-tab-wrapper {
    60         background-color: #f5f7f9;
     70        background-color: #FFFFFF;
    6171        border-bottom: none;
    6272    display: flex;
    … …  
    6575    padding-top: 0;
    6676}
     77/*.impoter-left{
     78        display: flex;
     79        align-items: center;
     80        gap:30px;
     81}*/
     82.impoter-left .importer-description{
     83        width: 100%;
     84}
     85.impoter-left .importer-screenshot{
     86        width: 100%;
     87}
    6788.about-wrap .nav-tab {
    68         background: #f5f7f9;
    69         color: #687c93;
     89        background: #FFFFFF;
     90        color: #2f2c2c;
    7091        border: none;
    7192        margin: 0;
    7293        padding: 18px 22px;
    7394        transition: all 0.4s;
     95}
     96#adminmenu .wp-submenu a[href^="themes.php?page=bakers-bakery-info"] {
     97    background-color: #FE7700;
     98    color: #ffffff;
     99    font-weight: bold;
    74100}
    75101.about-wrap .nav-tab:hover,
    … …  
    82108}
    83109.about-wrap .nav-tab.nav-tab-active {
    84         background: #FFFFFF;
    85         color: #101010;
     110        background: #f15b26;
     111        color: #FFFFFF;
     112}
     113a.button.button-primary.button-hero.compare-pro{
     114        background: #f15b26;
     115        border-color: #f15b26;
     116        color: #FFFFFF;
    86117}
    87118.about-wrap p {
    … …  
    151182        margin-bottom: 30px;
    152183}
     184.feature-section.demo-impoter-tab {
     185        display: flex;
     186        gap:30px;
     187}
     188.col-items.impoter-box{
     189        width: 70% !important;
     190}
     191.importer-buttons{
     192        margin-bottom: 30px;
     193}
     194.importer-buttons{
     195        display: flex;
     196        align-items: center;
     197        justify-content: space-between;
     198}
     199.notice-pro-btn{
     200        background: #2f2c2c !important;
     201        border-color: #2f2c2c !important;
     202}
     203.notice-bundle-btn{
     204        background-color: #4cc2c0 !important;
     205    border-color: #4cc2c0 !important;
     206}
     207a.button.button-primary.view-site-btn {
     208    background: #f15b26;
     209    border: unset;
     210    cursor: pointer;
     211    display: inline-block;
     212    text-decoration: none;
     213    padding: 12px 20px;
     214    font-size: 15px;
     215    color: #fff;
     216    border-radius: 5px;
     217    position: relative;
     218    transition: all .3s ease;
     219    text-align: center;
     220    line-height: 15px;
     221}
     222p.success-messgae {
     223    background: #ffffff;
     224    display: inline-block;
     225    padding: 6px 26px;
     226    border-radius: 5px;
     227    color: #000000 !important;
     228}
     229a.btn.btn-purple,a.btn.btn-green,a.btn.btn-yellow,a.btn.btn-blue{
     230    background: #2f2c2c;
     231    border: unset;
     232    font-size: 14px;
     233    cursor: pointer;
     234    display: inline-block;
     235    text-decoration: none;
     236    padding: 18px 50px;
     237    font-size: 15px;
     238    text-transform: uppercase;
     239    color: #fff;
     240    border-radius: 5px;
     241    position: relative;
     242    transition: all .3s ease;
     243    text-align: center;
     244    line-height: 15px;
     245}
     246a.btn.btn-yellow {
     247    background: #3cb878;
     248}
     249a.btn.btn-purple {
     250    background: #f15b26;
     251}
     252a.btn.btn-blue{
     253    background: #4cc2c0;
     254}
     255.impoter-left{
     256        width: 50%;
     257}
     258.about-wrap .feature-section #bakers_bakery_free_pro  p{
     259        color: #000000;
     260}
     261.impoter-box-main{
     262        width: 50%;
     263}
    153264.info-wrap .feature-section .col:nth-child(3n + 1) {
    154265        clear:both;
    155266}
     267.
    156268#bakers_bakery_free_pro .free-pro-table {
    157269        border-spacing: 0;
    … …  
    204316}
    205317#bakers_bakery_free_pro .bakers-bakery-theme-installation-text-center {
    206         text-align: center;     
     318        text-align: center;
     319        width: 100%;
    207320}
    208321#bakers_bakery_free_pro .bakers-bakery-theme-installation-text-right {
    … …  
    342455.about-wrap .quick-links a {
    343456        margin: 0 5px;
     457        border-color: #000000;
     458}
     459a.button.button-hero.button.button-primary.button-hero.pro-btn{
     460    background-color: #2f2c2c !important;
     461    border-color: #2f2c2c !important;
    344462}
    345463.about-wrap .feature-section h3 {
    … …  
    403521        }
    404522}
     523
     524
     525
     526/*Pro Templates*/
     527
     528.mnssp-templates-grid.mnssp-main-grid.getstart-free {
     529    display: -ms-grid;
     530    display: grid;
     531    -ms-grid-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
     532    grid-template-columns: repeat(4, 1fr);
     533    grid-column-gap: 30px;
     534    grid-row-gap: 30px;
     535    padding: 0px;
     536}
     537.mnssp-grid-item {
     538    position: relative;
     539    overflow: hidden;
     540    border: 1px solid #e8e8e8;
     541    -webkit-box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);
     542    box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);
     543    background: #fff;
     544}
     545.mnssp-templates-grid.mnssp-main-grid.getstart-free .mnssp-image-wrap {
     546    position: relative;
     547    border-bottom: 1px solid #e8e8e8;
     548    height: 285px;
     549}
     550.mnssp-image-wrap img {
     551    height: 100%;
     552    display: block;
     553    max-width: 100%;
     554    width: 100%;
     555    object-fit: cover;
     556    object-position: top;
     557}
     558.mnssp-grid-item footer{
     559    display: -webkit-box;
     560    display: -ms-flexbox;
     561    display: flex;
     562    padding: 15px;
     563    -webkit-box-pack: justify;
     564    -ms-flex-pack: justify;
     565    justify-content: space-between;
     566}
     567.mnssp-main-grid .mnssp-grid-item footer h3 {
     568    margin: 0;
     569    font-size: 16px;
     570    text-transform: capitalize;
     571}
     572.mnssp-templates-grid .mnssp-image-overlay {
     573    opacity: 0;
     574    display: -webkit-box;
     575    display: -ms-flexbox;
     576    display: flex;
     577    -webkit-box-align: center;
     578    -ms-flex-align: center;
     579    align-items: center;
     580    -webkit-box-pack: center;
     581    -ms-flex-pack: center;
     582    justify-content: center;
     583    position: absolute;
     584    top: 0;
     585    left: 0;
     586    width: 100%;
     587    height: 100%;
     588    background: rgba(0, 0, 0, 0.7);
     589    cursor: pointer;
     590    -webkit-transition: opacity 0.2s ease-in;
     591    -o-transition: opacity 0.2s ease-in;
     592    transition: opacity 0.2s ease-in;
     593}
     594.mnssp-templates-grid .mnssp-image-wrap:hover .mnssp-image-overlay {
     595    opacity: 1;
     596}
     597.mnssp-grid-item .mnssp-btn {
     598    padding: 10px 25px;
     599    border: 0;
     600    -webkit-box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
     601    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
     602    font-size: 18px;
     603    text-decoration: none;
     604    border-radius: 5px;
     605}
     606.mnssp-grid-item .mnssp-demo-url.mnssp-btn {
     607    color: #fff;
     608    background: #2673ff;
     609    margin-right: 15px;
     610}
     611.mnssp-buy-now.mnssp-btn {
     612    color: #fff;
     613    background: #fcb03b;
     614}
     615.mnssp-loader-overlay {
     616    display: none;
     617    position: fixed;
     618    width: 100%;
     619    height: 100%;
     620    background-color: rgb(255, 255, 255);
     621    z-index: 9998;
     622}
     623.mnssp-loader {
     624    display: none;
     625    position: fixed;
     626    top: 50%;
     627    left: 50%;
     628    transform: translate(-50%, -50%);
     629    z-index: 9999;
     630    width: fit-content;
     631    font-size: 40px;
     632    font-family: system-ui,sans-serif;
     633    font-weight: bold;
     634    text-transform: uppercase;
     635    color: #0000;
     636    -webkit-text-stroke: 1px #f15b26;
     637    --g: conic-gradient(#fcb03b 0 0) no-repeat text;
     638    background: var(--g) 0,var(--g) 100%,var(--g) 0 0,var(--g) 0 100%;
     639    animation: l5 2s linear infinite;
     640  }
     641.mnssp-loader:before {
     642    content: "Loading";
     643}
     644.mnsp-feat-img img {
     645    width: 100%;
     646}
     647.mnssp-right-content .mnsp-feat {
     648    flex-basis: 45%;
     649}
     650.mnssp-right-content .mnsp-feat-img {
     651    flex-basis: 55%;
     652}
     653.mnsp-feat-img img {
     654    width: 100%;
     655    height: 360px;
     656    object-fit: cover;
     657}
     658.mnsp-feat .mnsp-buy-btn {
     659    color: #fff;
     660    text-decoration: unset;
     661    font-size: 17px;
     662    padding: 12px 26px;
     663    display: inline-block;
     664    background-color: #f15b26;
     665    border-radius: 5px;
     666    margin-top: 10px;
     667    font-weight: 500;
     668    transition: 0.3s ease-in-out;
     669    &:hover {
     670        background-color: #f15b26;
     671    }
     672}
     673.mnssp-grid-item-price {
     674    padding: 0px 15px 15px 15px;
     675    color: #000;
     676    font-size: 16px;
     677}
     678
     679.mnssp-search-box {
     680    display: flex;
     681    justify-content: space-between;
     682    margin-bottom: 20px;
     683}
     684.mnssp-templates-collections-search input {
     685    width: 100%;
     686    height: 45px;
     687    padding-left: 15px;
     688    background-color: #FBFBFB;
     689    border: none;
     690    border: 1px solid #e8e8e8 !important;
     691    -webkit-box-shadow: none !important;
     692    box-shadow: none !important;
     693    border-radius: 3px;
     694}
     695.mnssp-templates-collections-search .dashicons {
     696    margin-left: -32px;
     697    color: #f15b26;
     698    vertical-align: text-bottom;
     699}
     700#mnssp-collections {
     701    height: 45px;
     702    border: 1px solid #e8e8e8;
     703    padding: 0px 10px;
     704}
     705
     706.mnssp-loader-overlay {
     707    display: none;
     708    position: fixed;
     709    width: 100%;
     710    height: 100%;
     711    background-color: rgb(255, 255, 255);
     712    z-index: 9998;
     713}
     714.mnssp-loader {
     715    display: none;
     716    position: fixed;
     717    top: 50%;
     718    left: 50%;
     719    transform: translate(-50%, -50%);
     720    z-index: 9999;
     721    width: fit-content;
     722    font-size: 40px;
     723    font-family: system-ui,sans-serif;
     724    font-weight: bold;
     725    text-transform: uppercase;
     726    color: #0000;
     727    -webkit-text-stroke: 1px #f15b26;
     728    --g: conic-gradient(#fcb03b 0 0) no-repeat text;
     729    background: var(--g) 0,var(--g) 100%,var(--g) 0 0,var(--g) 0 100%;
     730    animation: l5 2s linear infinite;
     731  }
     732.mnssp-loader:before {
     733    content: "Loading";
     734}
  • bakers-bakery/0.8.4/inc/theme-installation/assets/js/theme-installation.js

    r274336 r304968  
    3838
    3939});
     40
     41jQuery(document).ready(function($) {
     42    var page = 1;
     43    var isLoading = false;
     44
     45    $(window).scroll(function () {
     46        if ($(window).scrollTop() + $(window).height() >= $(document).height() - 200 && !isLoading) {           
     47            loadMoreProducts();
     48        }
     49    });
     50
     51    function productsAjax( endCursor, templateSearch, collection, actionValue ) {
     52
     53        var progress = 0;
     54        var progressInterval = setInterval(function() {
     55            progress += 10;
     56            if (progress >= 100) {
     57                clearInterval(progressInterval);
     58            }
     59        }, 300);
     60
     61        $.ajax({
     62            url: tm_theme_info_box_object.ajaxurl,
     63            type: 'POST',
     64            data: {
     65                action: 'free_mnssp_get_filtered_products',
     66                cursor: endCursor,
     67                search: templateSearch,
     68                collection: collection,
     69                mnssp_pagination_nonce: tm_theme_info_box_object.nonce
     70            },
     71            success: function (response) {
     72
     73                clearInterval(progressInterval);
     74                jQuery('.mnssp-loader').hide();
     75                jQuery('.mnssp-loader-overlay').hide();
     76
     77                if (response.content) {
     78
     79                    isLoading = false;
     80
     81                    if ( actionValue != 'load' ) {
     82                        jQuery('.mnssp-templates-grid.mnssp-main-grid').empty();
     83                    }
     84                    jQuery('.mnssp-templates-grid.mnssp-main-grid').append(response.content);
     85
     86                    const hasNextPage = response?.pagination?.hasNextPage;
     87                    const endCursor = response?.pagination?.endCursor;
     88
     89                    jQuery('[name="mnssp-end-cursor"]').val(endCursor);
     90                    if (!hasNextPage) {
     91                        jQuery('[name="mnssp-end-cursor"]').val('');
     92                        isLoading = true
     93                    }
     94                }
     95            },
     96            error: function (error) {
     97               
     98                clearInterval(progressInterval);
     99                jQuery('.mnssp-loader').hide();
     100                jQuery('.mnssp-loader-overlay').hide();
     101
     102                console.log('Error loading products');
     103            }
     104        });
     105    }
     106
     107    function loadMoreProducts() {
     108        isLoading = true;
     109        page++;
     110
     111        const endCursor = jQuery('[name="mnssp-end-cursor"]').val();
     112        const templateSearch = jQuery('[name="mnssp-templates-search"]').val();
     113        const collection = jQuery('[name="mnssp-collections"]').val();
     114
     115        productsAjax( endCursor, templateSearch, collection, 'load' );
     116    }
     117
     118    function debounce(func, delay) {
     119        let timeoutId;
     120        return function() {
     121            const context = this;
     122            const args = arguments;
     123            clearTimeout(timeoutId);
     124            timeoutId = setTimeout(() => {
     125                func.apply(context, args);
     126            }, delay);
     127        };
     128    }
     129
     130    jQuery('#mnssp-collections').on('change', function() {
     131
     132        jQuery('.mnssp-loader').show();
     133        jQuery('.mnssp-loader-overlay').show();
     134
     135        productsAjax( '', '', jQuery(this).val(), 'category' );
     136    });
     137
     138    $('body').on("input", '[name="mnssp-templates-search"]', debounce(function (event) {
     139
     140        const templateSearch = $('[name="mnssp-templates-search"]').val();
     141
     142        jQuery('.mnssp-loader').show();
     143        jQuery('.mnssp-loader-overlay').show();
     144       
     145        productsAjax( '', templateSearch, '', 'search' );
     146       
     147    }, 1000));
     148});
  • bakers-bakery/0.8.4/inc/theme-installation/theme-installation.php

    r292917 r304968  
    2121        public function __construct( $config ) {
    2222            $this->config = $config;
    23             $this->bakers_bakery_bakers_bakery_prepare_class();
     23            $this->bakers_bakery_prepare_class();
    2424
    2525            /*admin menu*/
    … …  
    3636         * Prepare and setup class properties.
    3737         */
    38         public function bakers_bakery_bakers_bakery_prepare_class() {
    39             $theme = wp_get_theme(get_stylesheet());
    40             // var_dump($theme);exit;
     38        public function bakers_bakery_prepare_class() {
     39            $theme = wp_get_theme();
    4140            $this->theme_name    = esc_html( $theme->get( 'Name' ) );
    4241            $this->theme_slug    = $theme->get_stylesheet();
    … …  
    215214                        $button = 'button-secondary';
    216215                        if( 'pro_url' == $quick_key ){
    217                             $button = 'button button-primary button-hero';
     216                            $button = 'button button-primary button-hero pro-btn';
    218217                        }
    219218                        if( 'bundle_url' == $quick_key ){
    … …  
    231230                /* Display tabs */
    232231                if ( ! empty( $this->tabs ) ) {
    233                     $current_tab = isset( $_GET['tab'] ) ? wp_unslash( $_GET['tab'] ) : 'bakers_bakery_getting_started';
     232                    $current_tab = isset( $_GET['tab'] ) ? wp_unslash( $_GET['tab'] ) : 'bakers_bakery_demo_impoter';
    234233
    235234                    echo '<h2 class="nav-tab-wrapper wp-clearfix">';
    … …  
    264263         */
    265264        public function bakers_bakery_demo_impoter() {
    266             echo '<div class="feature-section display-grid col-grid-1">';
     265            echo '<div class="feature-section demo-impoter-tab ">';
    267266            if ( ! empty( $this->config['bakers_bakery_demo_impoter_steps'] ) ) {
    268267                $bakers_bakery_demo_impoter_steps = $this->config['bakers_bakery_demo_impoter_steps'];
    269                 if ( ! empty( $bakers_bakery_demo_impoter_steps ) ) {
    270 
    271                     /*defaults values for bakers_bakery_demo_impoter_steps array */
    272                     $defaults = array(
    273                         'title'     => '',
    274                         'desc'       => '',
    275                         'button_label'   => '',
    276                         'button_link'   => '',
    277                         'is_button' => true,
    278                         'is_new_tab' => false,
    279                         'is_gs' => false,
    280                     );
    281                     foreach ( $bakers_bakery_demo_impoter_steps as $gs_step ) {
    282                         $instance = wp_parse_args( (array) $gs_step, $defaults );
    283 
    284                         /*allowed 7 value in array */
    285                         $title = $instance[ 'title' ];
    286                         $desc = $instance[ 'desc'];
    287                         $button_label = $instance[ 'button_label'];
    288                         $button_link = $instance[ 'button_link'];
    289                         $is_button = $instance[ 'is_button'];
    290                         $is_new_tab = $instance[ 'is_new_tab'];
    291                         $is_gs = $instance[ 'is_gs' ];
    292                        
    293                         echo '<div class="col-items impoter-box">';
    294                             if ( ! empty( $title ) ) {
    295                                 echo '<h3>';
    296                                 echo esc_html($title);
    297                                 echo '</h3>';
    298                             }
    299 
    300                             if ( ! empty( $desc ) ) {
    301                                 echo '<p>' . esc_html($desc) . '</p>';
    302                             }
    303 
    304                             if ( ! empty( $button_link ) && ! empty( $button_label ) ) {
    305 
    306                                 echo '<p>';
    307                                 $button_class = '';
    308                                 if ( $is_button ) {
    309                                     $button_class = 'button button-primary button-hero';
    310                                 }
    311 
    312                                 $button_new_tab = '_self';
    313                                 if ( isset( $is_new_tab ) ) {
    314                                     if ( $is_new_tab ) {
    315                                         $button_new_tab = '_blank';
     268                if ( ! empty( $bakers_bakery_demo_impoter_steps ) ) { ?>
     269                        <?php
     270                            // Get current theme data
     271                            $theme = wp_get_theme();
     272                            $theme_screenshot  = $theme->get_screenshot();
     273                            ?>
     274                            <div class="impoter-box-main">
     275                                <div class="wrap-main-box">
     276                                    <div class="main-box">
     277                                        <h2><?php echo esc_html('Welcome to Bakers Bakery','bakers-bakery'); ?></h2>
     278                                        <h3><?php echo esc_html('Create your website in just one click','bakers-bakery'); ?></h3>
     279                                        <p><?php echo esc_html('The "Begin Installation" helps you quickly set up your website by importing sample content that mirrors the demo version of the theme. This tool provides you with a ready-made layout and structure, so you can easily see how your site will look and start customizing it right away. It\'s a straightforward way to get your site up and running with minimal effort.','bakers-bakery'); ?></p>
     280                                        <p><?php echo esc_html('Click the button below to install the demo content.','bakers-bakery'); ?></p>
     281                                        <button id="import-theme-mods" class="button button-primary"><?php echo esc_html('Begin Installation','bakers-bakery'); ?></button>
     282                                        <div id="import-response"></div>
     283                                    </div>
     284                                </div>
     285                            </div>
     286                            <div class="impoter-left">
     287                                <div class="importer-description">
     288                                    <div class="importer-buttons">
     289                                        <a target="_blank" href="<?php echo esc_url( CAKE_SHOP_BAKERY_GET_PREMIUM_PRO ); ?>" class="btn btn-purple"><?php echo esc_html('Get Premium','bakers-bakery'); ?></a>
     290                                        <a target="_blank" href="<?php echo esc_url( CAKE_SHOP_BAKERY_LIVE_DEMO ); ?>" class="btn btn-green"><?php echo esc_html('View Demo','bakers-bakery'); ?></a>
     291                                        <a target="_blank" href="<?php echo esc_url( CAKE_SHOP_BAKERY_FREE_DOC ); ?>" class="btn btn-yellow"><?php echo esc_html('Lite Doc','bakers-bakery'); ?></a>
     292                                        <a target="_blank" href="<?php echo esc_url( CAKE_SHOP_BAKERY_CONTACT_SUPPORT ); ?>" class="btn btn-blue"><?php echo esc_html('Lite Support','bakers-bakery'); ?></a>
     293                                    </div>
     294                                </div>
     295                                <div class="importer-screenshot">
     296                                    <img src="<?php echo esc_url( $theme_screenshot ); ?>" alt="<?php echo esc_attr( $theme->get('Name') ); ?>">
     297                                </div>
     298                            </div>
     299                         
     300                    <?php }
     301            }
     302            echo '</div><!-- .feature-section col-wrap -->';
     303        }
     304
     305        /**
     306         * Getting started tab
     307         */
     308        public function bakers_bakery_pro_templates() {
     309            echo '<div class="feature-section demo-impoter-tab ">'; ?>
     310                <div class="pro-search-main">
     311                    <div class="mnssp-search-box">
     312                        <div class="mnssp-templates-collections-search">
     313                            <input type="text" name="mnssp-templates-search" autocomplete="off" placeholder="Search Templates...">
     314                            <span class="dashicons dashicons-search"></span>
     315                        </div>
     316                        <div class="mnssp-templates-collections-filter">
     317                            <?php $collections_arr = free_mnssp_get_collections(); ?>
     318                            <select name="mnssp-collections" id="mnssp-collections">
     319                                <?php foreach ( $collections_arr as $collection ) { ?>
     320                                    <option value="<?php echo esc_attr($collection->handle); ?>"><?php echo esc_html($collection->title); ?></option>
     321                                <?php } ?>
     322                            </select>
     323                        </div>
     324                    </div>
     325                    <div class="mnssp-templates-grid mnssp-main-grid getstart-free ">
     326                        <?php $get_filtered_products = free_mnssp_get_filtered_products();
     327                            if (isset($get_filtered_products['products']) && !empty($get_filtered_products['products'])) {
     328                                foreach ( $get_filtered_products['products'] as $product ) {
     329
     330                                    $product_obj = $product->node;
     331                                   
     332                                    if (isset($product_obj->inCollection) && !$product_obj->inCollection) {
     333                                        continue;
    316334                                    }
    317                                 }
    318                                 echo '<a target="' . esc_attr( $button_new_tab ) . '" href="' . esc_attr( $button_link ) . '" class="' . esc_attr( $button_class ) . '">' . esc_html( $button_label ) . '</a>';
    319                                 echo '</p>';
    320                             }
    321                             echo '</div>';
    322                     }
    323                 }
    324             }
    325             echo '</div><!-- .feature-section col-wrap -->';
    326         }
    327 
    328 
    329         /**
    330          * Getting started tab
    331          */
    332         public function bakers_bakery_getting_started() {
    333             echo '<div class="feature-section display-grid col-grid-3">';
    334             if ( ! empty( $this->config['bakers_bakery_gs_steps'] ) ) {
    335                 $bakers_bakery_gs_steps = $this->config['bakers_bakery_gs_steps'];
    336                 if ( ! empty( $bakers_bakery_gs_steps ) ) {
    337 
    338                     /*defaults values for bakers_bakery_gs_steps array */
    339                     $defaults = array(
    340                         'title'     => '',
    341                         'desc'       => '',
    342                         'button_label'   => '',
    343                         'button_link'   => '',
    344                         'is_button' => true,
    345                         'is_new_tab' => false,
    346                         'is_gs' => false,
    347                     );
    348                     foreach ( $bakers_bakery_gs_steps as $gs_step ) {
    349                         $instance = wp_parse_args( (array) $gs_step, $defaults );
    350 
    351                         /*allowed 7 value in array */
    352                         $title = $instance[ 'title' ];
    353                         $desc = $instance[ 'desc'];
    354                         $button_label = $instance[ 'button_label'];
    355                         $button_link = $instance[ 'button_link'];
    356                         $is_button = $instance[ 'is_button'];
    357                         $is_new_tab = $instance[ 'is_new_tab'];
    358                         $is_gs = $instance[ 'is_gs' ];
    359                        
    360                         echo '<div class="col-items">';
    361                        
    362                        
    363                         if ( ! empty( $title ) ) {
    364                             echo '<h3>';
    365                             echo esc_html($title);
    366                             echo '</h3>';
    367                         }
    368 
    369                         if ( ! empty( $desc ) ) {
    370                             echo '<p>' . esc_html($desc) . '</p>';
    371                         }
    372 
    373                         if ( ! empty( $button_link ) && ! empty( $button_label ) ) {
    374 
    375                             echo '<p>';
    376                             $button_class = '';
    377                             if ( $is_button ) {
    378                                 $button_class = 'button button-primary button-hero';
    379                             }
    380 
    381                             $button_new_tab = '_self';
    382                             if ( isset( $is_new_tab ) ) {
    383                                 if ( $is_new_tab ) {
    384                                     $button_new_tab = '_blank';
    385                                 }
    386                             }
    387                             echo '<a target="' . esc_attr( $button_new_tab ) . '" href="' . esc_attr( $button_link ) . '" class="' . esc_attr( $button_class ) . '">' . esc_html( $button_label ) . '</a>';
    388                             echo '</p>';
    389                         }
    390                         echo '</div>';
    391                     }
    392                 }
    393             }
    394             echo '</div><!-- .feature-section col-wrap -->';
     335
     336                                    $demo_url = isset($product->node->metafield->value) ? $product->node->metafield->value : '';
     337                                    $product_url = isset($product->node->onlineStoreUrl) ? $product->node->onlineStoreUrl : '';
     338                                    $image_src = isset($product->node->images->edges[0]->node->src) ? $product->node->images->edges[0]->node->src : '';
     339                                    $price = isset($product->node->variants->edges[0]->node->price) ? '$' . $product->node->variants->edges[0]->node->price : ''; ?>
     340
     341                                    <div class="mnssp-grid-item">
     342                                        <div class="mnssp-image-wrap">
     343                                            <img src="<?php echo esc_url($image_src); ?>" alt="<?php echo esc_attr($product_obj->title); ?>">
     344                                            <div class="mnssp-image-overlay">
     345                                                <a class="mnssp-demo-url mnssp-btn" href="<?php echo esc_attr($demo_url); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html('Demo'); ?></a>
     346                                                <a class="mnssp-buy-now mnssp-btn" href="<?php echo esc_attr($product_url); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html('Buy Now'); ?></a>
     347                                            </div>
     348                                        </div>
     349                                        <footer>
     350                                            <h3><?php echo esc_html($product_obj->title); ?></h3>
     351                                        </footer>
     352                                        <div class="mnssp-grid-item-price">Price: <?php echo esc_html($price); ?></div>
     353                                    </div>
     354                                <?php }
     355                            }
     356                        ?>
     357                    </div>
     358
     359                    <?php if (isset($get_filtered_products['pagination']->hasNextPage) && $get_filtered_products['pagination']->hasNextPage) { ?>
     360                        <input type="hidden" name="mnssp-end-cursor" value="<?php echo esc_attr(isset($get_filtered_products['pagination']->endCursor) ? $get_filtered_products['pagination']->endCursor : '') ?>">
     361                    <?php } ?>
     362                </div>
     363            <?php echo '</div><!-- .feature-section col-wrap -->';
    395364        }
    396365
    … …  
    785754
    786755        /**
    787          * Support tab
    788          */
    789         public function bakers_bakery_support() {
    790             echo '<div class="feature-section col-wrap">';
    791 
    792             if ( ! empty( $this->config['bakers_bakery_support_content'] ) ) {
    793 
    794                 $supports = $this->config['bakers_bakery_support_content'];
    795 
    796                 if ( ! empty( $supports ) ) {
    797 
    798                     /*defaults values for child theme array */
    799                     $defaults = array(
    800                         'title' => '',
    801                         'icon' => '',
    802                         'desc' => '',
    803                         'button_label' => '',
    804                         'button_link' => '',
    805                         'is_button' => true,
    806                         'is_new_tab' => true
    807                     );
    808 
    809                     foreach ( $supports as $support ) {
    810                         $instance = wp_parse_args( (array) $support, $defaults );
    811 
    812                         /*allowed 7 value in array */
    813                         $title = $instance[ 'title' ];
    814                         $icon = $instance[ 'icon'];
    815                         $desc = $instance[ 'desc'];
    816                         $button_label = $instance[ 'button_label'];
    817                         $button_link = $instance[ 'button_link'];
    818                         $is_button = $instance[ 'is_button'];
    819                         $is_new_tab = $instance[ 'is_new_tab'];
    820                        
    821                         echo '<div class="col"><div class="col-items">';
    822 
    823                         if ( ! empty( $title ) ) {
    824                             echo '<h3>';
    825                             if ( ! empty( $icon ) ) {
    826                                 echo '<i class="' . esc_attr( $icon ) . '"></i>';
    827                             }
    828                             echo esc_html($title);
    829                             echo '</h3>';
    830                         }
    831 
    832                         if ( ! empty( $desc ) ) {
    833                             echo '<p>' . esc_html( $desc ) . '</p>';
    834                         }
    835 
    836                         if ( ! empty( $button_link ) && ! empty( $button_label ) ) {
    837 
    838                             echo '<p>';
    839                             $button_class = '';
    840                             if ( $is_button ) {
    841                                 $button_class = 'button button-primary button-hero';
    842                             }
    843 
    844                             $button_new_tab = '_self';
    845                             if ( isset( $is_new_tab ) ) {
    846                                 if ( $is_new_tab ) {
    847                                     $button_new_tab = '_blank';
    848                                 }
    849                             }
    850                             echo '<a target="' . esc_attr( $button_new_tab ) . '" href="' . esc_attr( $button_link ) . '" class="' . esc_attr( $button_class ) . '">' . esc_html( $button_label ) . '</a>';
    851                             echo '</p>';
    852                         }
    853                         echo '</div></div>';
    854                     }
    855                 }
    856             }
    857             echo '</div>';
    858         }
    859 
    860         /**
    861756         * Changelog tab
    862757         */
    … …  
    911806                    'nr_actions_recommended'   => $count,
    912807                    'ajaxurl'                  => admin_url( 'admin-ajax.php' ),
    913                     'template_directory'       => get_template_directory_uri()
     808                    'template_directory'       => get_template_directory_uri(),
     809                    'nonce'   => wp_create_nonce('free_mnssp_create_pagination_nonce_action')
    914810                ) );
    915811
    … …  
    950846
    951847    'tabs' => array(
    952         //'bakers_bakery_demo_impoter'         => esc_html__( 'Demo Impoter', 'bakers-bakery' ),
    953         'bakers_bakery_getting_started'      => esc_html__( 'Getting Started', 'bakers-bakery' ),
     848        'bakers_bakery_demo_impoter'         => esc_html__( 'Demo Impoter', 'bakers-bakery' ),
     849        'bakers_bakery_pro_templates'        => esc_html__( 'Pro Templates', 'bakers-bakery' ),
    954850        'bakers_bakery_free_pro'             => esc_html__( 'Compare Free Vs Pro', 'bakers-bakery' ),
    955851        'bakers_bakery_recommended_plugins'  => esc_html__( 'Recommended Plugins', 'bakers-bakery' ),
    956         'bakers_bakery_support'              => esc_html__( 'Support', 'bakers-bakery' ),
    957852        'bakers_bakery_changelog'            => esc_html__( 'Changelog', 'bakers-bakery' ),
    958853    ),
    … …  
    11431038    // Generic Plugins array.
    11441039    'bakers_bakery_recommended_plugins' => array(
    1145         'WooCommerce' => array(
    1146             'slug' => 'woocommerce'
    1147         ),
    11481040        'Classic Widgets' => array(
    11491041            'slug' => 'classic-widgets'
    … …  
    11521044            'slug' => 'magnify-suggestive-search'
    11531045        ),
    1154     ),
    1155 
    1156     // Support content tab.
    1157     'bakers_bakery_support_content' => array(
    1158         'first' => array(
    1159             'title' => esc_html__( 'Have a question? We’re here to help—ask now!', 'bakers-bakery' ),
    1160             'desc' => esc_html__( 'We are dedicated to addressing any issues that may occur, ensuring your experience with Shippable is seamless and uninterrupted.', 'bakers-bakery' ),
    1161             'button_label' => esc_html__( 'Contact Support', 'bakers-bakery' ),
    1162             'button_link' => esc_url( CAKE_SHOP_BAKERY_CONTACT_SUPPORT ),
    1163             'is_button' => true,
    1164             'is_new_tab' => true
    1165         )
    1166     ),
     1046        'Contact Form 7' => array(
     1047            'slug' => 'contact-form-7'
     1048        ),
     1049    )
     1050
    11671051
    11681052);
  • bakers-bakery/0.8.4/readme.txt

    r303290 r304968  
    44Tested up to: 6.8
    55Requires PHP: 7.2
    6 Stable tag: 0.8.3
     6Stable tag: 0.8.4
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
    9 Tags: wide-blocks, block-styles, custom-logo, one-column, two-columns, grid-layout, sticky-post, custom-background, custom-colors, custom-header, custom-menu, featured-images, flexible-header, threaded-comments, theme-options, left-sidebar, right-sidebar, full-width-template, editor-style, food-and-drink, blog, e-commerce
     9Tags: three-columns, four-columns, translation-ready, wide-blocks, block-styles, custom-logo, one-column, two-columns, grid-layout, sticky-post, custom-background, custom-colors, custom-header, custom-menu, featured-images, flexible-header, threaded-comments, theme-options, left-sidebar, right-sidebar, full-width-template, editor-style, food-and-drink, blog, e-commerce
    1010
    1111Bakers Bakery is a website design made exclusively for bakeries or companies that offer baked goods.
    … …  
    7474
    7575== Changelog ==
     76
     77= 0.8.4
     78
     79* Added demo importer.
     80* Update single.php file
     81* Update page single file.
     82* Update archive product file.
     83* Update single-product file.
     84* Update notice code.
     85* Added new code of global color.
     86* Update pattern file.
     87* Added some tags.
     88* Added post layout option.
    7689
    7790= 0.8.3
  • bakers-bakery/0.8.4/style.css

    r303290 r304968  
    66Author URI: https://www.themagnifico.net/
    77Description: Bakers Bakery is a website design made exclusively for bakeries or companies that offer baked goods. The theme incorporates a warm and welcoming colour scheme, high-quality images of baked goods, and a user-friendly layout to make it easier for potential customers to navigate the website and find the products they're looking for. The theme also comes with a built-in shopping cart, order form, or reservation system to let customers make appointments or special cake or dessert orders. A blog or recipe section is also included for bakers so that they can inform their customers about their skills, tips, and techniques. The finest possible product presentation is one of the main objectives of the Bakers Bakery WordPress theme. The theme is also responsive and cross-browser compatible. This is because a large number of users are accessing websites through their smartphones and tablets. A crucial feature of the Bakers Bakery WordPress theme is its ease of use. The website created using this theme is easy to navigate and user-friendly. It is also translation ready and can translate the text from your website to multiple local and international languages so the customers can navigate through your website smoothly in the comfort of their preferred language.
    8 Version: 0.8.3
     8Version: 0.8.4
    99Tested up to: 6.8
    1010Requires PHP: 7.2
    … …  
    1313Template: cake-shop-bakery
    1414Text Domain: bakers-bakery
    15 Tags: wide-blocks, block-styles, custom-logo, one-column, two-columns, grid-layout, sticky-post, custom-background, custom-colors, custom-header, custom-menu, featured-images, flexible-header, threaded-comments, theme-options, left-sidebar, right-sidebar, full-width-template, editor-style, food-and-drink, blog, e-commerce
     15Tags: three-columns, four-columns, translation-ready, wide-blocks, block-styles, custom-logo, one-column, two-columns, grid-layout, sticky-post, custom-background, custom-colors, custom-header, custom-menu, featured-images, flexible-header, threaded-comments, theme-options, left-sidebar, right-sidebar, full-width-template, editor-style, food-and-drink, blog, e-commerce
    1616
    1717Bakers Bakery WordPress Theme has been created by TheMagnifico52(themagnifico.net), 2023.
    1818Bakers Bakery WordPress Theme is released under the terms of GNU GPL
    1919*/
     20
     21/*--------------------------------------------------------------
     22# Global Color
     23--------------------------------------------------------------*/
     24
     25:root {
     26  --first-color: #f784b9;
     27}
    2028
    2129body{
    … …  
    2937}
    3038button.wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button.contained,button.wc-block-components-button.wp-element-button.wc-block-components-totals-coupon__button.contained,a.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained,a.added_to_cart.wc-forward,.main-navigation .menu li.page_item_has_children ul.children,.sidebar h5, .sidebar .wp-block-search .wp-block-search__label, .sidebar .widget h2.wp-block-heading,.slider-box-btn a, .addtocart a,#button:hover, #button:active,#button,#colophon,span.onsale,.main-navigation .sub-menu,.woocommerce-account .woocommerce-MyAccount-navigation ul li,.woocommerce .woocommerce-ordering select,.sidebar h5,.pro-button a, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt,.sidebar input[type="submit"], .sidebar button[type="submit"],.sidebar .tagcloud a:hover,.socialmedia,.comment-respond input#submit,.post-navigation .nav-previous a:hover, .post-navigation .nav-next a:hover, .posts-navigation .nav-previous a:hover, .posts-navigation .nav-next a:hover,.page-template-home-template .socialmedia,#top-slider .owl-nav i:hover, .load hr, .navigation.pagination .nav-links a.current, .navigation.pagination .nav-links a:hover, .navigation.pagination .nav-links span.current, .navigation.pagination .nav-links span:hover{
    31     background: #f784b9;
     39    background: var(--first-color);
    3240}
    3341button.wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button.contained,button.wc-block-components-button.wp-element-button.wc-block-components-totals-coupon__button.contained,a.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained{
    … …  
    4250}
    4351.navigation.pagination .nav-links a.current, .navigation.pagination .nav-links a:hover, .navigation.pagination .nav-links span.current, .navigation.pagination .nav-links span:hover {
    44     border-color: #f784b9;
     52    border-color: var(--first-color);
    4553}
    4654.wp-block-button__link{
    47     background: #f784b9 !important;
     55    background: var(--first-color) !important;
    4856}
    4957.main-navigation .sub-menu > li > a:hover, .main-navigation .sub-menu > li > a:focus,.pro-button a:hover, .woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover,.slider-box-btn a:hover, .addtocart a:hover{
    … …  
    5159}
    5260h2.woocommerce-loop-product__title,#site-navigation .menu ul li a:hover,.widget a,.slider-inner-box h1 a:hover, p.product-title a:hover, .page-template-home-template .cart_no a:hover, .page-template-home-template .navbar-brand a:hover, .page-template-home-template .main-navigation .menu > li > a:hover, .page-template-home-template #site-navigation .menu ul li a:hover{
    53     color: #f784b9 !important;
     61    color: var(--first-color) !important;
    5462}
    5563#site-navigation .menu ul.children a:hover,.meta-info-box a:hover, .main-navigation .menu > li > a:hover, .navbar-brand a:hover, .cart_no a:hover{
    … …  
    6775}
    6876.page-template-home-template .navbar-brand a:hover, .sidebar ul li a:hover,.article-box a,.widget a:hover, .widget a:focus,.woocommerce-message::before, .woocommerce-info::before,.page-template-home-template .addtocart a:hover{
    69     color: #f784b9;
     77    color: var(--first-color);
    7078}
    7179.article-box,.woocommerce ul.products li{
    … …  
    7381}
    7482.post-navigation .nav-previous a:hover, .post-navigation .nav-next a:hover, .posts-navigation .nav-previous a:hover, .posts-navigation .nav-next a:hover,.woocommerce-message, .woocommerce-info,#top-slider .owl-nav i:hover{
    75     border-color: #f784b9;
     83    border-color: var(--first-color);
    7684}
    7785.slider-box-btn a:hover, .addtocart a:hover,.page-template-home-template .slider-box-btn a:hover{
    … …  
    8290}
    8391.wp-block-quote, .wp-block-quote:not(.is-large):not(.is-style-large), .wp-block-pullquote{
    84     border-left: 4px solid #f784b9 !important;
     92    border-left: 4px solid var(--first-color) !important;
    8593}
    8694.woocommerce ul.products li{
    … …  
    103111}
    104112.page-content .btn-primary{
    105     background: #f784b9;
     113    background: var(--first-color);
    106114}
    107115.slider-inner-box h1 a, .slider-inner-box p{
    … …  
    117125@media screen and (max-width: 1000px){
    118126    .toggle-nav i {
    119         background: #f784b9;
     127        background: var(--first-color);
    120128    }
    121129    .main-navigation .sub-menu{
    … …  
    123131    }
    124132    .sidenav .closebtn{
    125         background: #f784b9;
     133        background: var(--first-color);
    126134    }
    127135    .slider-inner-box {
    … …  
    131139    .main-navigation ul.sub-menu > li > a:hover, .main-navigation ul.sub-menu > li > a:focus, .main-navigation .menu > li > a:hover {
    132140        background: transparent;
    133         color: #f784b9 !important;
     141        color: var(--first-color) !important;
    134142    }
    135143    .page-template-home-template .main-navigation .menu > li > a{
    … …  
    137145    }
    138146    #site-navigation .menu ul li a:hover{
    139         color: #f784b9 !important;
     147        color: var(--first-color) !important;
    140148    }
    141149}
Note: See TracChangeset for help on using the changeset viewer.