Changeset 318990
- Timestamp:
- 03/21/2026 01:45:14 PM (7 months ago)
- Location:
- modular-kitchen/1.6
- Files:
-
- 10 edited
- 1 copied
-
. (copied) (copied from modular-kitchen/1.5 )
-
assets/js/theme-importer.js (modified) (1 diff)
-
footer.php (modified) (1 diff)
-
functions.php (modified) (7 diffs)
-
inc/template-tags.php (modified) (1 diff)
-
inc/theme-installation/assets/js/theme-installation.js (modified) (3 diffs)
-
inc/theme-installation/theme-installation.php (modified) (3 diffs)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
-
template-parts/content-single.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
modular-kitchen/1.6/assets/js/theme-importer.js
r308198 r318990 52 52 }); 53 53 } catch (err) { 54 console.log('Installation failed for:', plugin.slug, err);54 // Installation failed, continue to activation attempt 55 55 } 56 56 } -
modular-kitchen/1.6/footer.php
r304688 r318990 128 128 <?php }?> 129 129 <?php if(get_theme_mod('modular_kitchen_scroll_hide',true)){ ?> 130 <a id="button"><?php esc_html_e('TOP','modular-kitchen'); ?></a>130 <a href="#" id="button"><?php esc_html_e('TOP','modular-kitchen'); ?></a> 131 131 <?php }?> 132 132 </footer> -
modular-kitchen/1.6/functions.php
r308198 r318990 108 108 109 109 function tm_install_and_activate_plugin() { 110 check_ajax_referer( 'theme_importer_nonce' ); 111 if ( ! current_user_can( 'install_plugins' ) ) { 112 wp_send_json_error( 'Permission denied.' ); 113 return; 114 } 110 115 111 116 $post_plugin_details = $_POST['plugin_details']; … … 143 148 144 149 function tm_check_plugin_exists() { 150 check_ajax_referer( 'theme_importer_nonce' ); 151 if ( ! current_user_can( 'install_plugins' ) ) { 152 wp_send_json_error( 'Permission denied.' ); 153 return; 154 } 145 155 $plugin_text_domain = $_POST['plugin_text_domain']; 146 156 $main_plugin_file = $_POST['main_plugin_file']; … … 602 612 //Admin Notice For Getstart 603 613 function modular_kitchen_ajax_notice_handler() { 614 check_ajax_referer( 'modular_kitchen_dismissed_notice_nonce', 'wpnonce' ); 604 615 if ( isset( $_POST['type'] ) ) { 605 616 $type = sanitize_text_field( wp_unslash( $_POST['type'] ) ); 606 617 update_option( 'dismissed-' . $type, TRUE ); 607 618 } 608 } 619 wp_die(); 620 } 621 add_action( 'wp_ajax_modular_kitchen_ajax_notice_handler', 'modular_kitchen_ajax_notice_handler' ); 609 622 610 623 function modular_kitchen_deprecated_hook_admin_notice() { … … 617 630 </div> 618 631 <div class="tm-admin-content" style="padding-left: 30px; align-self: center"> 619 <h2 style="font-weight: 600;line-height: 1.3; margin: 0px;"><?php esc_html_e('Thank You For Choosing ', 'modular-kitchen'); ?><?php echo wp_get_theme(); ?><h2>620 <p style="color: #3c434a; font-weight: 400; margin-bottom: 30px;"><?php _e('Get Started With Theme By Clicking On Getting Started.', 'modular-kitchen'); ?><p>632 <h2 style="font-weight: 600;line-height: 1.3; margin: 0px;"><?php esc_html_e('Thank You For Choosing ', 'modular-kitchen'); ?><?php echo esc_html( wp_get_theme() ); ?></h2> 633 <p style="color: #3c434a; font-weight: 400; margin-bottom: 30px;"><?php esc_html_e('Get Started With Theme By Clicking On Getting Started.', 'modular-kitchen'); ?></p> 621 634 <a class="admin-notice-btn button button-primary button-hero" href="<?php echo esc_url( admin_url( 'themes.php?page=modular-kitchen-info' )); ?>"><?php esc_html_e( 'Get started', 'modular-kitchen' ) ?></a> 622 635 <a class="admin-notice-btn button button-primary button-hero notice-pro-btn" target="_blank" href="<?php echo esc_url( MODULAR_KITCHEN_GET_PREMIUM_PRO ); ?>"><?php esc_html_e( 'Get Premium ', 'modular-kitchen' ) ?></a> … … 638 651 add_action('after_switch_theme', 'modular_kitchen_switch_theme'); 639 652 function modular_kitchen_dismissable_notice() { 653 check_ajax_referer( 'modular_kitchen_dismissed_notice_nonce', 'wpnonce' ); 640 654 update_user_meta(get_current_user_id(), 'modular_kitchen_dismissable_notice', true); 641 die();655 wp_die(); 642 656 } 643 657 … … 655 669 // Handle the AJAX request 656 670 function modular_kitchen_demo_importer_ajax_handler() { 671 check_ajax_referer( 'theme_importer_nonce' ); 672 if ( ! current_user_can( 'edit_theme_options' ) ) { 673 wp_send_json_error( 'Permission denied.' ); 674 return; 675 } 657 676 // Sample data to import 658 677 $theme_mods_data = array( … … 739 758 use (&$create_page_and_menu, &$created_pages, $menu_id) { 740 759 741 $page = get_page_by_title($item['title']); 760 $pages = get_posts( array( 761 'title' => $item['title'], 762 'post_type' => 'page', 763 'post_status' => 'any', 764 'posts_per_page' => 1, 765 'orderby' => 'post_date', 766 'order' => 'ASC', 767 ) ); 768 $page = ! empty( $pages ) ? $pages[0] : null; 742 769 743 770 if (!$page) { -
modular-kitchen/1.6/inc/template-tags.php
r196564 r318990 153 153 <div class="media-body-wrap card"> 154 154 <div class="card-header"> 155 <h5 class="mt-0"><?php /* translators: %s: author */ printf( '<cite class="fn">%s</cite>', esc_url( get_comment_author_link()) ); ?></h5>155 <h5 class="mt-0"><?php /* translators: %s: author */ printf( '<cite class="fn">%s</cite>', get_comment_author_link() ); ?></h5> 156 156 <div class="comment-meta"> 157 157 <a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"> 158 158 <time datetime="<?php comment_time('c'); ?>"> 159 <?php /* translators: %s: Date */ printf( esc_ attr('%1$s at %2$s', '1: date, 2: time', 'modular-kitchen'), esc_attr( get_comment_date() ), esc_attr( get_comment_time() ) ); ?>159 <?php /* translators: %s: Date */ printf( esc_html__( '%1$s at %2$s', 'modular-kitchen' ), esc_html( get_comment_date() ), esc_html( get_comment_time() ) ); ?> 160 160 </time> 161 161 </a> -
modular-kitchen/1.6/inc/theme-installation/assets/js/theme-installation.js
r304688 r318990 19 19 action: 'tm_theme_info_update_recommend_action', 20 20 id: id, 21 todo: action 21 todo: action, 22 _ajax_nonce: tm_theme_info_box_object.recommend_action_nonce 22 23 }, 23 24 dataType : "html", … … 32 33 }, 33 34 error : function (jqXHR, textStatus, errorThrown) { 34 console.log(jqXHR + " :: " + textStatus + " :: " + errorThrown);35 // Handle error silently 35 36 } 36 37 }); … … 100 101 jQuery('.mnssp-loader-overlay').hide(); 101 102 102 console.log('Error loading products');103 // Handle error silently 103 104 } 104 105 }); -
modular-kitchen/1.6/inc/theme-installation/theme-installation.php
r308198 r318990 54 54 */ 55 55 public function modular_kitchen_update_recommended_action_callback() { 56 check_ajax_referer( 'tm_recommend_action_nonce' ); 57 if ( ! current_user_can( 'edit_theme_options' ) ) { 58 wp_send_json_error( 'Permission denied.' ); 59 return; 60 } 56 61 57 62 /*getting for provided array*/ … … 59 64 60 65 /*from js action*/ 61 $action_id = esc_attr( ( isset( $_GET['id'] ) ) ? $_GET['id'] : 0 );62 $todo = esc_attr( ( isset( $_GET['todo'] ) ) ? $_GET['todo'] : '' );66 $action_id = isset( $_GET['id'] ) ? sanitize_key( wp_unslash( $_GET['id'] ) ) : ''; 67 $todo = isset( $_GET['todo'] ) ? sanitize_key( wp_unslash( $_GET['todo'] ) ) : ''; 63 68 64 69 /*getting saved actions*/ … … 804 809 $count = $this->modular_kitchen_count_recommended_actions(); 805 810 wp_localize_script( 'modular-kitchen-theme-installation-js', 'tm_theme_info_box_object', array( 806 ' nr_actions_recommended' => $count,811 'count_actions_recommended' => $count, 807 812 'ajaxurl' => admin_url( 'admin-ajax.php' ), 808 'template_directory' => get_template_directory_uri() 813 'template_directory' => get_template_directory_uri(), 814 'nonce' => wp_create_nonce('free_mnssp_create_pagination_nonce_action'), 815 'recommend_action_nonce' => wp_create_nonce('tm_recommend_action_nonce') 809 816 ) ); 810 817 -
modular-kitchen/1.6/index.php
r304688 r318990 27 27 <div class="row"> 28 28 <?php 29 get_template_part( 'template-parts/patterns'); 29 get_template_part( 'template-parts/patterns'); ?> 30 </div> 30 31 31 } else {32 <?php } else { 32 33 33 34 get_template_part('template-parts/content', 'none'); 34 35 35 36 } ?> 36 </div>37 37 38 38 </main> -
modular-kitchen/1.6/readme.txt
r308198 r318990 4 4 Tested up to: 6.9 5 5 Requires PHP: 7.2 6 Stable tag: 1. 56 Stable tag: 1.6 7 7 License: GNU General Public License v3.0 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 345 345 346 346 * Added demo import. 347 348 = 1.6 = 349 350 * Fixed malformed HTML closing tags in admin notice (h2, p). 351 * Fixed missing output escaping: replaced echo wp_get_theme() with esc_html(), _e() with esc_html_e(). 352 * Fixed security: added check_ajax_referer() and current_user_can() to tm_install_and_activate_plugin(), tm_check_plugin_exists() AJAX handlers. 353 * Fixed security: added nonce verification to modular_kitchen_dismissable_notice() and modular_kitchen_ajax_notice_handler(). 354 * Fixed security: added nonce verification and capability check to modular_kitchen_update_recommended_action_callback() in theme-installation.php. 355 * Fixed sanitization of $_POST inputs in AJAX handlers using sanitize_key(), sanitize_file_name(), wp_unslash(). 356 * Fixed incorrect esc_attr() usage with multiple arguments in comment date/time display in template-tags.php. 357 * Fixed esc_url() incorrectly applied to get_comment_author_link() HTML output in template-tags.php. 358 * Fixed stray </i> HTML tag in content-single.php. 359 * Fixed orphaned </div> in index.php when no posts are found. 360 * Fixed scroll-to-top anchor missing href attribute in footer.php. 361 * Fixed security: added nonce verification and capability check to modular_kitchen_demo_importer_ajax_handler() AJAX handler. 362 * Fixed deprecated get_page_by_title() replaced with WP_Query via get_posts() per WordPress 6.2 handbook. 363 * Fixed key name mismatch: nr_actions_recommended -> count_actions_recommended in theme-installation localize script. 364 * Replaced console.log() calls in theme-installation.js with silent error handling. 365 * Replaced console.log() call in theme-importer.js with silent error handling. 366 * Added nonce to recommend-action AJAX call in theme-installation.js. 367 * Replaced die() with wp_die() in AJAX handler functions. -
modular-kitchen/1.6/style.css
r308198 r318990 6 6 Author URI: https://www.themagnifico.net/ 7 7 Description: Modular Kitchen is a sleek and stylish WordPress theme designed specifically for kitchen designers, interior decorators, architects, home decor shops, furniture decor shop etc. and home improvement businesses. It is an ideal solution for businesses in the home and kitchen improvement to create a professional online presence and reach a larger crowd of potential customers. The theme comes with a clean and modern design while offering a perfect platform to showcase your expertise in creating stunning modular kitchens. The Modular Kitchen WordPress theme features a highly customizable layout, allowing you to tailor your website to match your brand identity and showcase your unique design ideas. You can easily customize colors, fonts, and page layouts to create a visually appealing and cohesive online presence. This theme offers a range of built-in features that enhance the functionality of your website. With the integrated gallery feature, you can showcase your portfolio of completed projects, highlighting the beauty and functionality of your modular kitchen designs. The theme also includes a blog section, enabling you to share valuable tips, design trends, and inspiration with your audience. In addition, the Modular Kitchen WordPress theme is fully responsive, ensuring that your website looks stunning on all devices, from desktop computers to smartphones and tablets. 8 Version: 1. 58 Version: 1.6 9 9 Requires at least: 5.0 10 10 Tested up to: 6.9 -
modular-kitchen/1.6/template-parts/content-single.php
r238146 r318990 29 29 <div class="meta-info-box my-2"> 30 30 <span class="entry-author"><?php esc_html_e('BY','modular-kitchen'); ?> <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' )) ); ?>"><?php the_author(); ?></a></span> 31 <span class="ms-2">< /i><?php echo esc_html(get_the_date()); ?></span>31 <span class="ms-2"><?php echo esc_html(get_the_date()); ?></span> 32 32 </div> 33 33 <?php }?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)