Changeset 318839
- Timestamp:
- 03/20/2026 01:13:49 PM (7 months ago)
- Location:
- event-conference/0.5.1
- Files:
-
- 9 edited
- 1 copied
-
. (copied) (copied from event-conference/0.5.0 )
-
assets/js/theme-importer.js (modified) (1 diff)
-
footer.php (modified) (1 diff)
-
functions.php (modified) (8 diffs)
-
inc/template-tags.php (modified) (1 diff)
-
inc/theme-installation/assets/js/theme-installation.js (modified) (2 diffs)
-
inc/theme-installation/theme-installation.php (modified) (2 diffs)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
event-conference/0.5.1/assets/js/theme-importer.js
r304365 r318839 45 45 }); 46 46 } catch (err) { 47 console.log('Installation failed for:', plugin.slug, err);47 // Installation failed, continue to activation attempt 48 48 } 49 49 } -
event-conference/0.5.1/footer.php
r270630 r318839 104 104 <?php } ?> 105 105 <?php if(get_theme_mod('event_conference_scroll_hide',true)){ ?> 106 <a id="button"><?php esc_html_e('TOP','event-conference'); ?></a>106 <a href="#" id="button"><?php esc_html_e('TOP','event-conference'); ?></a> 107 107 <?php } ?> 108 108 </div> -
event-conference/0.5.1/functions.php
r312518 r318839 515 515 function tm_install_and_activate_plugin() { 516 516 517 $post_plugin_details = $_POST['plugin_details']; 518 $plugin_text_domain = $post_plugin_details['plugin_text_domain']; 519 $plugin_main_file = $post_plugin_details['plugin_main_file']; 520 $plugin_url = $post_plugin_details['plugin_url']; 517 if ( ! isset( $_POST['_ajax_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_ajax_nonce'] ) ), 'theme_importer_nonce' ) ) { 518 wp_send_json_error( 'Invalid nonce.' ); 519 wp_die(); 520 } 521 522 if ( ! current_user_can( 'install_plugins' ) ) { 523 wp_send_json_error( 'Insufficient permissions.' ); 524 wp_die(); 525 } 526 527 $post_plugin_details = isset( $_POST['plugin_details'] ) ? $_POST['plugin_details'] : array(); 528 $plugin_text_domain = isset( $post_plugin_details['plugin_text_domain'] ) ? sanitize_text_field( wp_unslash( $post_plugin_details['plugin_text_domain'] ) ) : ''; 529 $plugin_main_file = isset( $post_plugin_details['plugin_main_file'] ) ? sanitize_text_field( wp_unslash( $post_plugin_details['plugin_main_file'] ) ) : ''; 530 $plugin_url = isset( $post_plugin_details['plugin_url'] ) ? esc_url_raw( wp_unslash( $post_plugin_details['plugin_url'] ) ) : ''; 521 531 522 532 $plugin = array( … … 533 543 $activate_plugin = activate_plugin( $plugin_path ); 534 544 535 if($activate_plugin) { 536 537 echo $activate_plugin; 538 539 } else { 540 echo $activate_plugin; 545 // activate_plugin() returns WP_Error on failure, null on success 546 if ( is_wp_error( $activate_plugin ) ) { 547 wp_send_json_error( $activate_plugin->get_error_message() ); 548 wp_die(); 541 549 } 542 550 … … 549 557 550 558 function tm_check_plugin_exists() { 551 $plugin_text_domain = $_POST['plugin_text_domain']; 552 $main_plugin_file = $_POST['main_plugin_file']; 559 if ( ! isset( $_POST['_ajax_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_ajax_nonce'] ) ), 'theme_importer_nonce' ) ) { 560 wp_send_json_error( 'Invalid nonce.' ); 561 wp_die(); 562 } 563 if ( ! current_user_can( 'install_plugins' ) ) { 564 wp_send_json_error( 'Insufficient permissions.' ); 565 wp_die(); 566 } 567 $plugin_text_domain = isset( $_POST['plugin_text_domain'] ) ? sanitize_text_field( wp_unslash( $_POST['plugin_text_domain'] ) ) : ''; 568 $main_plugin_file = isset( $_POST['main_plugin_file'] ) ? sanitize_text_field( wp_unslash( $_POST['main_plugin_file'] ) ) : ''; 553 569 $plugin_path = $plugin_text_domain . '/' . $main_plugin_file; 554 570 … … 594 610 //Admin Notice For Getstart 595 611 function event_conference_ajax_notice_handler() { 612 if (!wp_verify_nonce($_POST['wpnonce'], 'event_conference_dismissed_notice_nonce')) { 613 exit; 614 } 596 615 if ( isset( $_POST['type'] ) ) { 597 616 $type = sanitize_text_field( wp_unslash( $_POST['type'] ) ); 598 617 update_option( 'dismissed-' . $type, TRUE ); 599 618 } 600 } 619 wp_die(); 620 } 621 add_action( 'wp_ajax_event_conference_dismissed_notice_handler', 'event_conference_ajax_notice_handler' ); 601 622 602 623 function event_conference_deprecated_hook_admin_notice() { … … 609 630 </div> 610 631 <div class="tm-admin-content" style="padding-left: 30px; align-self: center"> 611 <h2 style="font-weight: 600;line-height: 1.3; margin: 0px;"><?php esc_html_e('Thank You For Choosing ', 'event-conference'); ?><?php echo wp_get_theme(); ?><h2>612 <p style="color: #3c434a; font-weight: 400; margin-bottom: 30px;"><?php _e('Get Started With Theme By Clicking On Getting Started.', 'event-conference'); ?><p>632 <h2 style="font-weight: 600;line-height: 1.3; margin: 0px;"><?php esc_html_e('Thank You For Choosing ', 'event-conference'); ?><?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.', 'event-conference'); ?></p> 613 634 <a class="admin-notice-btn button button-primary button-hero" href="<?php echo esc_url( admin_url( 'themes.php?page=event-conference-info' )); ?>"><?php esc_html_e( 'Get started', 'event-conference' ) ?></a> 614 635 <a class="admin-notice-btn button button-primary button-hero notice-pro-btn" target="_blank" href="<?php echo esc_url( EVENT_CONFERENCE_GET_PREMIUM_PRO ); ?>"><?php esc_html_e( 'Get Premium ', 'event-conference' ) ?></a> … … 631 652 add_action('after_switch_theme', 'event_conference_switch_theme'); 632 653 function event_conference_dismissable_notice() { 654 check_ajax_referer( 'event_conference_dismissed_notice_nonce', 'wpnonce' ); 633 655 update_user_meta(get_current_user_id(), 'event_conference_dismissable_notice', true); 634 die();656 wp_die(); 635 657 } 636 658 … … 679 701 // Handle the AJAX request 680 702 function event_conference_demo_importer_ajax_handler() { 703 704 check_ajax_referer( 'theme_importer_nonce' ); 705 706 if ( ! current_user_can( 'edit_theme_options' ) ) { 707 wp_send_json_error( 'Permission denied.' ); 708 return; 709 } 710 681 711 // Sample data to import 682 712 $theme_mods_data = array( … … 780 810 use (&$create_page_and_menu, &$created_pages, $menu_id) { 781 811 782 $page = get_page_by_title($item['title']); 812 $pages = get_posts( array( 'post_type' => 'page', 'title' => $item['title'], 'post_status' => 'all', 'numberposts' => 1 ) ); 813 $page = ! empty( $pages ) ? $pages[0] : null; 783 814 784 815 if (!$page) { -
event-conference/0.5.1/inc/template-tags.php
r209561 r318839 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', 'event-conference'), esc_attr( get_comment_date() ), esc_attr( get_comment_time() ) ); ?>159 <?php /* translators: %s: Date */ printf( esc_html__( '%1$s at %2$s', 'event-conference' ), esc_html( get_comment_date() ), esc_html( get_comment_time() ) ); ?> 160 160 </time> 161 161 </a> -
event-conference/0.5.1/inc/theme-installation/assets/js/theme-installation.js
r273554 r318839 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 }); -
event-conference/0.5.1/inc/theme-installation/theme-installation.php
r304365 r318839 55 55 public function event_conference_update_recommended_action_callback() { 56 56 57 check_ajax_referer( 'tm_recommend_action_nonce' ); 58 59 if ( ! current_user_can( 'edit_theme_options' ) ) { 60 wp_send_json_error( 'Permission denied.' ); 61 return; 62 } 63 57 64 /*getting for provided array*/ 58 65 $recommended_actions = isset( $this->config['recommended_actions'] ) ? $this->config['recommended_actions'] : array(); 59 66 60 67 /*from js action*/ 61 $action_id = esc_attr( ( isset( $_GET['id'] ) ) ? $_GET['id'] : 0 );62 $todo = esc_attr( ( isset( $_GET['todo'] ) ) ? $_GET['todo'] : '' );68 $action_id = isset( $_GET['id'] ) ? sanitize_key( wp_unslash( $_GET['id'] ) ) : ''; 69 $todo = isset( $_GET['todo'] ) ? sanitize_key( wp_unslash( $_GET['todo'] ) ) : ''; 63 70 64 71 /*getting saved actions*/ … … 804 811 $count = $this->event_conference_count_recommended_actions(); 805 812 wp_localize_script( 'event-conference-theme-installation-js', 'tm_theme_info_box_object', array( 806 ' nr_actions_recommended' => $count,813 'count_actions_recommended' => $count, 807 814 'ajaxurl' => admin_url( 'admin-ajax.php' ), 808 815 'template_directory' => get_template_directory_uri() -
event-conference/0.5.1/index.php
r304365 r318839 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> -
event-conference/0.5.1/readme.txt
r312518 r318839 4 4 Tested up to: 6.9 5 5 Requires PHP: 7.2 6 Stable tag: 0.5. 06 Stable tag: 0.5.1 7 7 License: GNU General Public License v3.0 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 97 97 98 98 == Changelog == 99 100 = 0.5.1 = 101 102 * Fixed malformed HTML closing tags in admin notice (h2, p). 103 * Fixed missing output escaping: replaced echo wp_get_theme() with esc_html(), _e() with esc_html_e(). 104 * Fixed security: added check_ajax_referer() and current_user_can() to tm_install_and_activate_plugin(), tm_check_plugin_exists(), event_conference_demo_importer_ajax_handler() AJAX handlers. 105 * Fixed security: added nonce verification to event_conference_dismissable_notice() and event_conference_ajax_notice_handler(). 106 * Fixed security: added nonce verification and capability check to event_conference_update_recommended_action_callback() in theme-installation.php. 107 * Fixed sanitization of $_POST inputs in AJAX handlers using sanitize_key(), sanitize_file_name(), wp_unslash(). 108 * Fixed incorrect esc_attr() usage with multiple arguments in comment date/time display in template-tags.php. 109 * Fixed esc_url() incorrectly applied to get_comment_author_link() HTML output in template-tags.php. 110 * Fixed orphaned </div> in index.php when no posts are found. 111 * Fixed scroll-to-top anchor missing href attribute in footer.php. 112 * Fixed deprecated get_page_by_title() replaced with WP_Query via get_posts() per WordPress 6.2 handbook. 113 * Fixed key name mismatch: nr_actions_recommended -> count_actions_recommended in theme-installation localize script. 114 * Replaced console.log() calls in theme-installation.js and theme-importer.js with silent error handling. 115 * Added nonce to recommend-action AJAX call in theme-installation.js. 116 * Replaced die() with wp_die() in AJAX handler functions. 99 117 100 118 = 0.5.0 -
event-conference/0.5.1/style.css
r312518 r318839 6 6 Author URI: https://www.themagnifico.net/ 7 7 Description: Event Conference is a dynamic and user-friendly digital template designed to make organizing and showcasing events and conferences a breeze. Tailored for simplicity and versatility, this theme provides a visually appealing and intuitive platform for event planners, organizers, and businesses to create a professional and engaging online presence. With a modern and clean design, the theme offers a polished appearance that captivates visitors and reflects the professionalism of the event being promoted. It provides a structured layout where users can easily access event details, schedules, speakers, and registration information, creating a seamless and informative experience. The theme's user-friendly interface ensures that both organizers and attendees can navigate effortlessly through the website. Event details are presented in an organized manner, making it convenient for users to find the information they need, whether it's about keynote speakers, session schedules, or ticketing details. One of the significant advantages of the Event Conference WordPress Theme is its flexibility. Event organizers can customize the theme to match the branding and theme of their specific event, creating a cohesive and visually appealing online environment. Additionally, the responsive design ensures that the website functions seamlessly across various devices, including desktops, tablets, and smartphones, allowing users to access event information anytime, anywhere. 8 Version: 0.5. 08 Version: 0.5.1 9 9 Requires at least: 5.0 10 10 Tested up to: 6.9
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)