Make WordPress Themes

Changeset 318839


Ignore:
Timestamp:
03/20/2026 01:13:49 PM (7 months ago)
Author:
themedropbox
Message:

New version of Event Conference - 0.5.1

Location:
event-conference/0.5.1
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • event-conference/0.5.1/assets/js/theme-importer.js

    r304365 r318839  
    4545          });
    4646        } catch (err) {
    47           console.log('Installation failed for:', plugin.slug, err);
     47          // Installation failed, continue to activation attempt
    4848        }
    4949      }
  • event-conference/0.5.1/footer.php

    r270630 r318839  
    104104                <?php } ?>
    105105            <?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>
    107107            <?php } ?>
    108108    </div>
  • event-conference/0.5.1/functions.php

    r312518 r318839  
    515515function tm_install_and_activate_plugin() {
    516516
    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'] ) ) : '';
    521531
    522532        $plugin = array(
    … …  
    533543        $activate_plugin = activate_plugin( $plugin_path );
    534544
    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();
    541549        }
    542550
    … …  
    549557
    550558function 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'] ) ) : '';
    553569                $plugin_path = $plugin_text_domain . '/' . $main_plugin_file;
    554570
    … …  
    594610//Admin Notice For Getstart
    595611function event_conference_ajax_notice_handler() {
     612        if (!wp_verify_nonce($_POST['wpnonce'], 'event_conference_dismissed_notice_nonce')) {
     613                exit;
     614        }
    596615    if ( isset( $_POST['type'] ) ) {
    597616        $type = sanitize_text_field( wp_unslash( $_POST['type'] ) );
    598617        update_option( 'dismissed-' . $type, TRUE );
    599618    }
    600 }
     619        wp_die();
     620}
     621add_action( 'wp_ajax_event_conference_dismissed_notice_handler', 'event_conference_ajax_notice_handler' );
    601622
    602623function event_conference_deprecated_hook_admin_notice() {
    … …  
    609630                </div>
    610631                <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>
    613634                        <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>
    614635                        <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>
    … …  
    631652add_action('after_switch_theme', 'event_conference_switch_theme');
    632653function event_conference_dismissable_notice() {
     654        check_ajax_referer( 'event_conference_dismissed_notice_nonce', 'wpnonce' );
    633655    update_user_meta(get_current_user_id(), 'event_conference_dismissable_notice', true);
    634     die();
     656    wp_die();
    635657}
    636658
    … …  
    679701// Handle the AJAX request
    680702function 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
    681711    // Sample data to import
    682712    $theme_mods_data = array(
    … …  
    780810        use (&$create_page_and_menu, &$created_pages, $menu_id) {
    781811
    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;
    783814
    784815        if (!$page) {
  • event-conference/0.5.1/inc/template-tags.php

    r209561 r318839  
    153153                    <div class="media-body-wrap card">
    154154                        <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>
    156156                            <div class="comment-meta">
    157157                                <a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>">
    158158                                    <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() ) ); ?>
    160160                                    </time>
    161161                                </a>
  • event-conference/0.5.1/inc/theme-installation/assets/js/theme-installation.js

    r273554 r318839  
    1919                action: 'tm_theme_info_update_recommend_action',
    2020                id: id,
    21                 todo: action
     21                todo: action,
     22                _ajax_nonce: tm_theme_info_box_object.recommend_action_nonce
    2223            },
    2324            dataType  : "html",
    … …  
    3233            },
    3334            error     : function (jqXHR, textStatus, errorThrown) {
    34                 console.log(jqXHR + " :: " + textStatus + " :: " + errorThrown);
     35                // Handle error silently
    3536            }
    3637        });
  • event-conference/0.5.1/inc/theme-installation/theme-installation.php

    r304365 r318839  
    5555        public function event_conference_update_recommended_action_callback() {
    5656
     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
    5764            /*getting for provided array*/
    5865            $recommended_actions = isset( $this->config['recommended_actions'] ) ? $this->config['recommended_actions'] : array();
    5966
    6067            /*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'] ) ) : '';
    6370
    6471            /*getting saved actions*/
    … …  
    804811                $count = $this->event_conference_count_recommended_actions();
    805812                wp_localize_script( 'event-conference-theme-installation-js', 'tm_theme_info_box_object', array(
    806                     'nr_actions_recommended'   => $count,
     813                    'count_actions_recommended'   => $count,
    807814                    'ajaxurl'                  => admin_url( 'admin-ajax.php' ),
    808815                    'template_directory'       => get_template_directory_uri()
  • event-conference/0.5.1/index.php

    r304365 r318839  
    2727                <div class="row">
    2828                    <?php
    29                         get_template_part( 'template-parts/patterns');
     29                        get_template_part( 'template-parts/patterns'); ?>
     30                </div>
    3031
    31                     } else {
     32                <?php } else {
    3233
    3334                        get_template_part('template-parts/content', 'none');
    3435
    3536                    } ?>
    36                 </div>
    3737
    3838            </main>
  • event-conference/0.5.1/readme.txt

    r312518 r318839  
    44Tested up to: 6.9
    55Requires PHP: 7.2
    6 Stable tag: 0.5.0
     6Stable tag: 0.5.1
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
    … …  
    9797
    9898== 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.
    99117
    100118= 0.5.0
  • event-conference/0.5.1/style.css

    r312518 r318839  
    66Author URI: https://www.themagnifico.net/
    77Description: 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.0
     8Version: 0.5.1
    99Requires at least: 5.0
    1010Tested up to: 6.9
Note: See TracChangeset for help on using the changeset viewer.