Plugin Directory

Changeset 3466675


Ignore:
Timestamp:
02/22/2026 03:30:18 AM (5 weeks ago)
Author:
simrandeep
Message:

Updated to v1.0.9

Location:
dashboard-welcome-for-elementor
Files:
2 added
2 deleted
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • dashboard-welcome-for-elementor/tags/1.0.9/README.md

    r2287331 r3466675  
    3333### Changelog ###
    3434
     35#### 1.0.9 - February 23, 2026 ####
     36*   Security update
     37
     38#### 1.0.8 - March 7, 2024 ####
     39*   Security update
     40
     41#### 1.0.7 - December 14, 2022 ####
     42*   Security update
     43
     44#### 1.0.6 - February 9, 2022 ####
     45*   Fixed compatibility issues with WordPress 5.9
     46
    3547#### 1.0.5 - April 20, 2020 ####
    3648*   Tested compatibility with latest versions of WP and Elementor
  • dashboard-welcome-for-elementor/tags/1.0.9/assets/css/dashboard.css

    r1926073 r3466675  
    44}
    55
    6 .welcome-panel .dwe-panel-content {
     6.welcome-panel .dwel-panel-content {
    77    margin-left: 0;
    88    margin-right: 0;
     
    1111}
    1212
    13 .welcome-panel .dwe-panel-content h3 {
     13.welcome-panel .dwel-panel-content h3 {
    1414    margin: auto;
    1515}
  • dashboard-welcome-for-elementor/tags/1.0.9/dashboard-welcome-elementor.php

    r3047389 r3466675  
    44 * Plugin URI: https://powerpackelements.com/dashboard-welcome-elementor/
    55 * Description: Replaces the default WordPress dashboard welcome panel with a Elementor template.
    6  * Version: 1.0.8
     6 * Version: 1.0.9
    77 * Author: IdeaBox Creations
    88 * Author URI: https://ideaboxcreations.com
     
    1010 * License: GNU General Public License v2.0
    1111 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
    12  * Text Domain: ibx-dwe
     12 * Text Domain: dashboard-welcome-for-elementor
    1313 */
    1414
     
    1818}
    1919
    20 define( 'IBX_DWE_VER', '1.0.8' );
    21 define( 'IBX_DWE_DIR', plugin_dir_path( __FILE__ ) );
    22 define( 'IBX_DWE_URL', plugins_url( '/', __FILE__ ) );
    23 define( 'IBX_DWE_PATH', plugin_basename( __FILE__ ) );
    24 define( 'IBX_DWE_FILE', __FILE__ );
     20define( 'DWEL_VER', '1.0.9' );
     21define( 'DWEL_DIR', plugin_dir_path( __FILE__ ) );
     22define( 'DWEL_URL', plugins_url( '/', __FILE__ ) );
     23define( 'DWEL_PATH', plugin_basename( __FILE__ ) );
     24define( 'DWEL_FILE', __FILE__ );
    2525
    26 final class DWE_Plugin {
     26final class Dashboard_Welcome_Elementor_Plugin {
    2727    /**
    2828     * Holds the current class object.
     
    3838     * @since 1.0.0
    3939     */
    40     public function __construct()
    41     {
     40    public function __construct() {
    4241        add_action( 'plugins_loaded', array( $this, 'loader' ) );
    4342    }
     
    4948     * @return void
    5049     */
    51     public function loader()
    52     {
     50    public function loader() {
    5351        if ( ! did_action( 'elementor/loaded' ) ) {
    5452            add_action( 'admin_notices', array( $this, 'plugin_load_fail' ) );
     
    5654        }
    5755
    58         require_once IBX_DWE_DIR . 'classes/class-dwe-admin.php';
     56        require_once DWEL_DIR . 'classes/class-dwel-admin.php';
    5957
    60         $dwe_admin = DWE_Plugin\Admin::get_instance();
     58        $dwe_admin = Dashboard_Welcome_Elementor_Plugin\Admin::get_instance();
    6159    }
    6260
     
    6765     * @return void
    6866     */
    69     public function plugin_load_fail()
    70     {
     67    public function plugin_load_fail() {
    7168        $screen = get_current_screen();
    7269        if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
     
    8178            }
    8279
    83             $activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
     80            $activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
    8481
    85             $message = '<p>' . __( 'Dashboard Welcome is not working because you need to activate the Elementor plugin.', 'ibx-dwe' ) . '</p>';
    86             $message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Elementor Now', 'ibx-dwe' ) ) . '</p>';
     82            $message  = '<p>' . esc_html__( 'Dashboard Welcome is not working because you need to activate the Elementor plugin.', 'dashboard-welcome-for-elementor' ) . '</p>';
     83            $message .= sprintf(
     84                '<p><a href="%s" class="button-primary">%s</a></p>',
     85                esc_url( $activation_url ),
     86                esc_html__( 'Activate Elementor Now', 'dashboard-welcome-for-elementor' )
     87            );
    8788        } else {
    8889            if ( ! current_user_can( 'install_plugins' ) ) {
     
    9293            $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
    9394
    94             $message = '<p>' . __( 'Dashboard Welcome is not working because you need to install the Elementor plugin', 'ibx-dwe' ) . '</p>';
    95             $message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $install_url, __( 'Install Elementor Now', 'ibx-dwe' ) ) . '</p>';
     95            $message  = '<p>' . esc_html__( 'Dashboard Welcome is not working because you need to install the Elementor plugin.', 'dashboard-welcome-for-elementor' ) . '</p>';
     96            $message .= sprintf(
     97                '<p><a href="%s" class="button-primary">%s</a></p>',
     98                esc_url( $install_url ),
     99                esc_html__( 'Install Elementor Now', 'dashboard-welcome-for-elementor' )
     100            );
    96101        }
    97102
    98         echo '<div class="error"><p>' . $message . '</p></div>';
     103        echo '<div class="notice notice-error">' . wp_kses_post( $message ) . '</div>';
    99104    }
    100105
     
    105110     * @return object
    106111     */
    107     public static function get_instance()
    108     {
    109         if ( ! isset( self::$instance ) && ! ( self::$instance instanceof DWE_Plugin ) ) {
    110             self::$instance = new DWE_Plugin();
     112    public static function get_instance() {
     113        if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Dashboard_Welcome_Elementor_Plugin ) ) {
     114            self::$instance = new Dashboard_Welcome_Elementor_Plugin();
    111115        }
    112116
     
    116120
    117121// Initialize the class.
    118 $dwe_plugin = DWE_Plugin::get_instance();
     122$dwel_plugin = Dashboard_Welcome_Elementor_Plugin::get_instance();
  • dashboard-welcome-for-elementor/tags/1.0.9/includes/admin-settings.php

    r1926078 r3466675  
    1 <div class="dwe-settings-header">
    2     <h2><?php echo $title; ?></h2>
    3 </div>
    4 <div class="dwe-settings-wrap">
    5     <?php if ( is_multisite() && get_current_blog_id() != 1 ) { ?>
    6         <div class="notice notice-warning dwe-subsite-notice">
    7             <p><?php esc_html_e('Please note, changing the template in subsite will override the main settings.', 'ibx-dwe'); ?></p>
    8         </div>
     1<?php
     2// Exit if accessed directly.
     3if ( ! defined( 'ABSPATH' ) ) {
     4    exit;
     5}
     6
     7function dwel_render_admin_settings_page( $title, $form_action, $roles, $templates, $settings ) {
     8    ?>
     9    <div class="dwel-settings-header">
     10        <h2><?php echo esc_html( $title ); ?></h2>
     11    </div>
     12
     13    <div class="dwel-settings-wrap">
     14        <?php if ( is_multisite() && get_current_blog_id() !== 1 ) : ?>
     15            <div class="notice notice-warning dwel-subsite-notice">
     16                <p><?php esc_html_e( 'Please note, changing the template in subsite will override the main settings.', 'dashboard-welcome-for-elementor' ); ?></p>
     17            </div>
     18        <?php endif; ?>
     19
     20        <form method="post" id="dwel-settings-form" action="<?php echo esc_url( $form_action ); ?>">
     21            <table class="dwel-settings-table wp-list-table widefat">
     22                <tr valign="top">
     23                    <th scope="row"><strong><?php esc_html_e( 'User Role', 'dashboard-welcome-for-elementor' ); ?></strong></th>
     24                    <th scope="row"><strong><?php esc_html_e( 'Select Template', 'dashboard-welcome-for-elementor' ); ?></strong></th>
     25                    <th scope="row"><strong><?php esc_html_e( 'Is Dismissible?', 'dashboard-welcome-for-elementor' ); ?></strong></th>
     26                </tr>
     27
     28                <?php
     29                $dwe_count = 0;
     30                foreach ( $roles as $role => $dwe_role_title ) :
     31                    $dwe_row_class = ( 0 === $dwe_count % 2 ) ? 'alternate' : '';
     32                    ?>
     33                    <tr class="<?php echo esc_attr( $dwe_row_class ); ?>">
     34                        <td><?php echo esc_html( $dwe_role_title ); ?></td>
     35
     36                        <td>
     37                            <select name="dwe_templates[<?php echo esc_attr( $role ); ?>][template]" class="dwel-templates-list">
     38                                <option value=""><?php esc_html_e( '-- Select --', 'dashboard-welcome-for-elementor' ); ?></option>
     39
     40                                <?php foreach ( $templates as $id => $dwe_template ) : ?>
     41                                    <option
     42                                        value="<?php echo esc_attr( $id ); ?>"
     43                                        data-site="<?php echo esc_attr( $dwe_template['site'] ?? '' ); ?>"
     44                                        <?php
     45                                        if ( ! empty( $settings[ $role ]['template'] ) ) {
     46                                            selected( $settings[ $role ]['template'], $id );
     47                                        }
     48                                        ?>
     49                                    >
     50                                        <?php echo esc_html( $dwe_template['title'] ); ?>
     51                                    </option>
     52                                <?php endforeach; ?>
     53                            </select>
     54
     55                            <?php if ( is_multisite() ) : ?>
     56                                <input
     57                                    type="hidden"
     58                                    name="dwe_templates[<?php echo esc_attr( $role ); ?>][site]"
     59                                    value="<?php echo esc_attr( $settings[ $role ]['site'] ?? '' ); ?>"
     60                                />
     61                            <?php endif; ?>
     62                        </td>
     63
     64                        <td>
     65                            <input
     66                                type="checkbox"
     67                                name="dwe_templates[<?php echo esc_attr( $role ); ?>][dismissible]"
     68                                value="1"
     69                                <?php checked( ! empty( $settings[ $role ]['dismissible'] ) ); ?>
     70                            />
     71                        </td>
     72                    </tr>
     73                    <?php
     74                    $dwe_count++;
     75                endforeach;
     76                ?>
     77            </table>
     78
     79            <?php if ( is_multisite() && get_current_blog_id() === 1 ) : ?>
     80                <p>
     81                    <label>
     82                        <input
     83                            type="checkbox"
     84                            name="dwe_hide_from_subsites"
     85                            value="1"
     86                            <?php checked( get_option( 'dwe_hide_from_subsites' ) ); ?>
     87                        />
     88                        <?php esc_html_e( 'Hide settings from network subsites', 'dashboard-welcome-for-elementor' ); ?>
     89                    </label>
     90                </p>
     91            <?php endif; ?>
     92
     93            <?php
     94            wp_nonce_field( 'dwe_settings', 'dwe_settings_nonce' );
     95            submit_button();
     96            ?>
     97        </form>
     98    </div>
     99
     100    <style>
     101    .dwel-settings-wrap {
     102        max-width: 860px;
     103    }
     104    .dwel-subsite-notice {
     105        margin: 0;
     106        margin-bottom: 10px;
     107    }
     108    </style>
     109
     110    <?php if ( is_multisite() ) { ?>
     111    <script>
     112    (function($) {
     113        $('.dwel-templates-list').on('change', function() {
     114            var id = $(this).val();
     115            var siteId = $(this).find('option[value="'+id+'"]').data('site'); console.log(siteId);
     116
     117            if ( '' !== siteId && undefined !== siteId ) {
     118                $(this).parent().find('input[type="hidden"]').val(siteId);
     119            }
     120        });
     121    })(jQuery);
     122    </script>
    9123    <?php } ?>
    10     <form method="post" id="dwe-settings-form" action="<?php echo $form_action; ?>">
    11         <table class="dwe-settings-table wp-list-table widefat">
    12             <tr valign="top">
    13                 <th scope="row" valign="top">
    14                     <strong><?php esc_html_e('User Role', 'ibx-dwe'); ?></strong>
    15                 </th>
    16                 <th scope="row" valign="top">
    17                     <strong><?php esc_html_e('Select Template', 'ibx-dwe'); ?></strong>
    18                 </th>
    19                 <th scope="row" valign="top">
    20                     <strong><?php esc_html_e('Is Dismissible?', 'ibx-dwe'); ?></strong>
    21                 </th>
    22             </tr>
    23             <?php $count = 0; foreach ( $roles as $role => $role_title ) { ?>
    24             <tr class="<?php echo $count % 2 == 0 ? 'alternate' : ''; ?>">
    25                 <td><?php echo $role_title; ?></td>
    26                 <td>
    27                     <select name="dwe_templates[<?php echo $role; ?>][template]" class="dwe-templates-list">
    28                         <option value=""><?php _e( '-- Select --', 'ibx-dwe' ); ?></option>
    29                         <?php foreach ( $templates as $id => $template ) { ?>
    30                             <?php if ( ! empty( $settings ) && isset( $settings[$role]['template'] ) && $id == $settings[$role]['template'] ) { ?>
    31                                 <option value="<?php echo $id; ?>" selected="selected" data-site="<?php echo null != $template['site'] ? $template['site'] : '';?>"><?php echo $template['title']; ?></option>
    32                             <?php } else { ?>
    33                                 <option value="<?php echo $id; ?>" data-site="<?php echo null != $template['site'] ? $template['site'] : '';?>"><?php echo $template['title']; ?></option>
    34                             <?php } ?>
    35                         <?php } ?>
    36                     </select>
    37                     <?php if ( is_multisite() ) { ?>
    38                         <input type="hidden" name="dwe_templates[<?php echo $role; ?>][site]" value="<?php echo isset( $settings[$role]['site'] ) ? $settings[$role]['site'] : ''; ?>" />
    39                     <?php } ?>
    40                 </td>
    41                 <td>
    42                     <input type="checkbox" name="dwe_templates[<?php echo $role; ?>][dismissible]" value="1"<?php echo ( ! empty( $settings ) && isset( $settings[$role]['dismissible'] ) ) ? ' checked="checked"' : ''; ?> />
    43                 </td>
    44             </tr>
    45             <?php $count++; } ?>
    46         </table>
     124    <?php
     125}
    47126
    48         <?php if ( is_multisite() && get_current_blog_id() == 1 ) { ?>
    49             <p>
    50                 <label>
    51                     <input type="checkbox" value="1" name="dwe_hide_from_subsites" <?php if ( get_option( 'dwe_hide_from_subsites' ) == true ) { echo 'checked="checked"'; } ?> />
    52                     <?php esc_html_e( 'Hide settings from network subsites', 'ibx-dwe' ); ?>
    53                 </label>
    54             </p>
    55         <?php } ?>
    56        
    57         <?php wp_nonce_field( 'dwe_settings', 'dwe_settings_nonce' ); ?>
    58         <?php submit_button(); ?>
    59 
    60     </form>
    61 </div>
    62 
    63 <style>
    64 .dwe-settings-wrap {
    65     max-width: 860px;
    66 }
    67 .dwe-subsite-notice {
    68     margin: 0;
    69     margin-bottom: 10px;
    70 }
    71 </style>
    72 
    73 <?php if ( is_multisite() ) { ?>
    74 <script>
    75 (function($) {
    76     $('.dwe-templates-list').on('change', function() {
    77         var id = $(this).val();
    78         var siteId = $(this).find('option[value="'+id+'"]').data('site'); console.log(siteId);
    79 
    80         if ( '' !== siteId && undefined !== siteId ) {
    81             $(this).parent().find('input[type="hidden"]').val(siteId);
    82         }
    83     });
    84 })(jQuery);
    85 </script>
    86 <?php } ?>
     127dwel_render_admin_settings_page( $title, $form_action, $roles, $templates, $settings );
  • dashboard-welcome-for-elementor/tags/1.0.9/includes/welcome-panel.php

    r2675528 r3466675  
    1 <div id="dwe-dashboard-welcome" class="dwe-panel-content">
     1<?php
     2// Exit if accessed directly.
     3if ( ! defined( 'ABSPATH' ) ) {
     4    exit;
     5}
     6?>
     7<div id="dwel-dashboard-welcome" class="dwel-panel-content">
    28    <?php if ( ! current_user_can( 'edit_theme_options' ) ) { ?>
    3         <a class="welcome-panel-close" href="<?php echo admin_url('welcome=0'); ?>"><?php _e('Dismiss'); ?></a>
     9        <a class="welcome-panel-close" href="<?php echo esc_url( admin_url('welcome=0') ); ?>"><?php esc_html_e( 'Dismiss', 'dashboard-welcome-for-elementor' ); ?></a>
    410    <?php } ?>
    511   
     
    1117    ;(function($) {
    1218        $(document).ready(function() {
    13             $('<div id="welcome-panel" class="welcome-panel"></div>').insertBefore('#dashboard-widgets-wrap').append($('#dwe-dashboard-welcome'));
     19            $('<div id="welcome-panel" class="welcome-panel"></div>').insertBefore('#dashboard-widgets-wrap').append($('#dwel-dashboard-welcome'));
    1420        });
    1521    })(jQuery);
  • dashboard-welcome-for-elementor/tags/1.0.9/readme.txt

    r3206537 r3466675  
    11=== Dashboard Welcome for Elementor ===
    22Contributors: ideaboxcreations, ibachal, simrandeep
    3 Tags: elementor, elementor addon, elementor template, dashboard welcome, dashboard widget, dashboard, powerpack elements, widgets, welcome, welcome screen, elementor extensions
     3Tags: elementor, elementor addon, elementor template, dashboard widget, dashboard
    44Requires at least: 6.3
    5 Tested up to: 6.7
     5Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: trunk
    8 License: GPLv3
    9 License URI: https://www.gnu.org/licenses/gpl-3.0.html
     7Stable tag: 1.0.9
     8
     9License: GPLv2 or later
     10License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1011
    1112Replaces the default WordPress dashboard welcome panel with custom designed Elementor template.
     
    5152== Changelog ==
    5253
     54= 1.0.9 - February 23, 2026 =
     55*   Security update
     56
    5357= 1.0.8 - March 7, 2024 =
    5458*   Security update
  • dashboard-welcome-for-elementor/trunk/README.md

    r2287331 r3466675  
    3333### Changelog ###
    3434
     35#### 1.0.9 - February 23, 2026 ####
     36*   Enhancement: Improved plugin codebase to make the code more secure
     37*   Fix: Fixed an issue with load_plugin_textdomain
     38
     39#### 1.0.8 - March 7, 2024 ####
     40*   Security update
     41
     42#### 1.0.7 - December 14, 2022 ####
     43*   Security update
     44
     45#### 1.0.6 - February 9, 2022 ####
     46*   Fixed compatibility issues with WordPress 5.9
     47
    3548#### 1.0.5 - April 20, 2020 ####
    3649*   Tested compatibility with latest versions of WP and Elementor
  • dashboard-welcome-for-elementor/trunk/assets/css/dashboard.css

    r1926073 r3466675  
    44}
    55
    6 .welcome-panel .dwe-panel-content {
     6.welcome-panel .dwel-panel-content {
    77    margin-left: 0;
    88    margin-right: 0;
     
    1111}
    1212
    13 .welcome-panel .dwe-panel-content h3 {
     13.welcome-panel .dwel-panel-content h3 {
    1414    margin: auto;
    1515}
  • dashboard-welcome-for-elementor/trunk/dashboard-welcome-elementor.php

    r3047389 r3466675  
    44 * Plugin URI: https://powerpackelements.com/dashboard-welcome-elementor/
    55 * Description: Replaces the default WordPress dashboard welcome panel with a Elementor template.
    6  * Version: 1.0.8
     6 * Version: 1.0.9
    77 * Author: IdeaBox Creations
    88 * Author URI: https://ideaboxcreations.com
     
    1010 * License: GNU General Public License v2.0
    1111 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
    12  * Text Domain: ibx-dwe
     12 * Text Domain: dashboard-welcome-for-elementor
    1313 */
    1414
     
    1818}
    1919
    20 define( 'IBX_DWE_VER', '1.0.8' );
    21 define( 'IBX_DWE_DIR', plugin_dir_path( __FILE__ ) );
    22 define( 'IBX_DWE_URL', plugins_url( '/', __FILE__ ) );
    23 define( 'IBX_DWE_PATH', plugin_basename( __FILE__ ) );
    24 define( 'IBX_DWE_FILE', __FILE__ );
     20define( 'DWEL_VER', '1.0.9' );
     21define( 'DWEL_DIR', plugin_dir_path( __FILE__ ) );
     22define( 'DWEL_URL', plugins_url( '/', __FILE__ ) );
     23define( 'DWEL_PATH', plugin_basename( __FILE__ ) );
     24define( 'DWEL_FILE', __FILE__ );
    2525
    26 final class DWE_Plugin {
     26final class Dashboard_Welcome_Elementor_Plugin {
    2727    /**
    2828     * Holds the current class object.
     
    3838     * @since 1.0.0
    3939     */
    40     public function __construct()
    41     {
     40    public function __construct() {
    4241        add_action( 'plugins_loaded', array( $this, 'loader' ) );
    4342    }
     
    4948     * @return void
    5049     */
    51     public function loader()
    52     {
     50    public function loader() {
    5351        if ( ! did_action( 'elementor/loaded' ) ) {
    5452            add_action( 'admin_notices', array( $this, 'plugin_load_fail' ) );
     
    5654        }
    5755
    58         require_once IBX_DWE_DIR . 'classes/class-dwe-admin.php';
     56        require_once DWEL_DIR . 'classes/class-dwel-admin.php';
    5957
    60         $dwe_admin = DWE_Plugin\Admin::get_instance();
     58        $dwe_admin = Dashboard_Welcome_Elementor_Plugin\Admin::get_instance();
    6159    }
    6260
     
    6765     * @return void
    6866     */
    69     public function plugin_load_fail()
    70     {
     67    public function plugin_load_fail() {
    7168        $screen = get_current_screen();
    7269        if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
     
    8178            }
    8279
    83             $activation_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $plugin );
     80            $activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
    8481
    85             $message = '<p>' . __( 'Dashboard Welcome is not working because you need to activate the Elementor plugin.', 'ibx-dwe' ) . '</p>';
    86             $message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Elementor Now', 'ibx-dwe' ) ) . '</p>';
     82            $message  = '<p>' . esc_html__( 'Dashboard Welcome is not working because you need to activate the Elementor plugin.', 'dashboard-welcome-for-elementor' ) . '</p>';
     83            $message .= sprintf(
     84                '<p><a href="%s" class="button-primary">%s</a></p>',
     85                esc_url( $activation_url ),
     86                esc_html__( 'Activate Elementor Now', 'dashboard-welcome-for-elementor' )
     87            );
    8788        } else {
    8889            if ( ! current_user_can( 'install_plugins' ) ) {
     
    9293            $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
    9394
    94             $message = '<p>' . __( 'Dashboard Welcome is not working because you need to install the Elementor plugin', 'ibx-dwe' ) . '</p>';
    95             $message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $install_url, __( 'Install Elementor Now', 'ibx-dwe' ) ) . '</p>';
     95            $message  = '<p>' . esc_html__( 'Dashboard Welcome is not working because you need to install the Elementor plugin.', 'dashboard-welcome-for-elementor' ) . '</p>';
     96            $message .= sprintf(
     97                '<p><a href="%s" class="button-primary">%s</a></p>',
     98                esc_url( $install_url ),
     99                esc_html__( 'Install Elementor Now', 'dashboard-welcome-for-elementor' )
     100            );
    96101        }
    97102
    98         echo '<div class="error"><p>' . $message . '</p></div>';
     103        echo '<div class="notice notice-error">' . wp_kses_post( $message ) . '</div>';
    99104    }
    100105
     
    105110     * @return object
    106111     */
    107     public static function get_instance()
    108     {
    109         if ( ! isset( self::$instance ) && ! ( self::$instance instanceof DWE_Plugin ) ) {
    110             self::$instance = new DWE_Plugin();
     112    public static function get_instance() {
     113        if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Dashboard_Welcome_Elementor_Plugin ) ) {
     114            self::$instance = new Dashboard_Welcome_Elementor_Plugin();
    111115        }
    112116
     
    116120
    117121// Initialize the class.
    118 $dwe_plugin = DWE_Plugin::get_instance();
     122$dwel_plugin = Dashboard_Welcome_Elementor_Plugin::get_instance();
  • dashboard-welcome-for-elementor/trunk/includes/admin-settings.php

    r1926078 r3466675  
    1 <div class="dwe-settings-header">
    2     <h2><?php echo $title; ?></h2>
    3 </div>
    4 <div class="dwe-settings-wrap">
    5     <?php if ( is_multisite() && get_current_blog_id() != 1 ) { ?>
    6         <div class="notice notice-warning dwe-subsite-notice">
    7             <p><?php esc_html_e('Please note, changing the template in subsite will override the main settings.', 'ibx-dwe'); ?></p>
    8         </div>
     1<?php
     2// Exit if accessed directly.
     3if ( ! defined( 'ABSPATH' ) ) {
     4    exit;
     5}
     6
     7function dwel_render_admin_settings_page( $title, $form_action, $roles, $templates, $settings ) {
     8    ?>
     9    <div class="dwel-settings-header">
     10        <h2><?php echo esc_html( $title ); ?></h2>
     11    </div>
     12
     13    <div class="dwel-settings-wrap">
     14        <?php if ( is_multisite() && get_current_blog_id() !== 1 ) : ?>
     15            <div class="notice notice-warning dwel-subsite-notice">
     16                <p><?php esc_html_e( 'Please note, changing the template in subsite will override the main settings.', 'dashboard-welcome-for-elementor' ); ?></p>
     17            </div>
     18        <?php endif; ?>
     19
     20        <form method="post" id="dwel-settings-form" action="<?php echo esc_url( $form_action ); ?>">
     21            <table class="dwel-settings-table wp-list-table widefat">
     22                <tr valign="top">
     23                    <th scope="row"><strong><?php esc_html_e( 'User Role', 'dashboard-welcome-for-elementor' ); ?></strong></th>
     24                    <th scope="row"><strong><?php esc_html_e( 'Select Template', 'dashboard-welcome-for-elementor' ); ?></strong></th>
     25                    <th scope="row"><strong><?php esc_html_e( 'Is Dismissible?', 'dashboard-welcome-for-elementor' ); ?></strong></th>
     26                </tr>
     27
     28                <?php
     29                $dwe_count = 0;
     30                foreach ( $roles as $role => $dwe_role_title ) :
     31                    $dwe_row_class = ( 0 === $dwe_count % 2 ) ? 'alternate' : '';
     32                    ?>
     33                    <tr class="<?php echo esc_attr( $dwe_row_class ); ?>">
     34                        <td><?php echo esc_html( $dwe_role_title ); ?></td>
     35
     36                        <td>
     37                            <select name="dwe_templates[<?php echo esc_attr( $role ); ?>][template]" class="dwel-templates-list">
     38                                <option value=""><?php esc_html_e( '-- Select --', 'dashboard-welcome-for-elementor' ); ?></option>
     39
     40                                <?php foreach ( $templates as $id => $dwe_template ) : ?>
     41                                    <option
     42                                        value="<?php echo esc_attr( $id ); ?>"
     43                                        data-site="<?php echo esc_attr( $dwe_template['site'] ?? '' ); ?>"
     44                                        <?php
     45                                        if ( ! empty( $settings[ $role ]['template'] ) ) {
     46                                            selected( $settings[ $role ]['template'], $id );
     47                                        }
     48                                        ?>
     49                                    >
     50                                        <?php echo esc_html( $dwe_template['title'] ); ?>
     51                                    </option>
     52                                <?php endforeach; ?>
     53                            </select>
     54
     55                            <?php if ( is_multisite() ) : ?>
     56                                <input
     57                                    type="hidden"
     58                                    name="dwe_templates[<?php echo esc_attr( $role ); ?>][site]"
     59                                    value="<?php echo esc_attr( $settings[ $role ]['site'] ?? '' ); ?>"
     60                                />
     61                            <?php endif; ?>
     62                        </td>
     63
     64                        <td>
     65                            <input
     66                                type="checkbox"
     67                                name="dwe_templates[<?php echo esc_attr( $role ); ?>][dismissible]"
     68                                value="1"
     69                                <?php checked( ! empty( $settings[ $role ]['dismissible'] ) ); ?>
     70                            />
     71                        </td>
     72                    </tr>
     73                    <?php
     74                    $dwe_count++;
     75                endforeach;
     76                ?>
     77            </table>
     78
     79            <?php if ( is_multisite() && get_current_blog_id() === 1 ) : ?>
     80                <p>
     81                    <label>
     82                        <input
     83                            type="checkbox"
     84                            name="dwe_hide_from_subsites"
     85                            value="1"
     86                            <?php checked( get_option( 'dwe_hide_from_subsites' ) ); ?>
     87                        />
     88                        <?php esc_html_e( 'Hide settings from network subsites', 'dashboard-welcome-for-elementor' ); ?>
     89                    </label>
     90                </p>
     91            <?php endif; ?>
     92
     93            <?php
     94            wp_nonce_field( 'dwe_settings', 'dwe_settings_nonce' );
     95            submit_button();
     96            ?>
     97        </form>
     98    </div>
     99
     100    <style>
     101    .dwel-settings-wrap {
     102        max-width: 860px;
     103    }
     104    .dwel-subsite-notice {
     105        margin: 0;
     106        margin-bottom: 10px;
     107    }
     108    </style>
     109
     110    <?php if ( is_multisite() ) { ?>
     111    <script>
     112    (function($) {
     113        $('.dwel-templates-list').on('change', function() {
     114            var id = $(this).val();
     115            var siteId = $(this).find('option[value="'+id+'"]').data('site'); console.log(siteId);
     116
     117            if ( '' !== siteId && undefined !== siteId ) {
     118                $(this).parent().find('input[type="hidden"]').val(siteId);
     119            }
     120        });
     121    })(jQuery);
     122    </script>
    9123    <?php } ?>
    10     <form method="post" id="dwe-settings-form" action="<?php echo $form_action; ?>">
    11         <table class="dwe-settings-table wp-list-table widefat">
    12             <tr valign="top">
    13                 <th scope="row" valign="top">
    14                     <strong><?php esc_html_e('User Role', 'ibx-dwe'); ?></strong>
    15                 </th>
    16                 <th scope="row" valign="top">
    17                     <strong><?php esc_html_e('Select Template', 'ibx-dwe'); ?></strong>
    18                 </th>
    19                 <th scope="row" valign="top">
    20                     <strong><?php esc_html_e('Is Dismissible?', 'ibx-dwe'); ?></strong>
    21                 </th>
    22             </tr>
    23             <?php $count = 0; foreach ( $roles as $role => $role_title ) { ?>
    24             <tr class="<?php echo $count % 2 == 0 ? 'alternate' : ''; ?>">
    25                 <td><?php echo $role_title; ?></td>
    26                 <td>
    27                     <select name="dwe_templates[<?php echo $role; ?>][template]" class="dwe-templates-list">
    28                         <option value=""><?php _e( '-- Select --', 'ibx-dwe' ); ?></option>
    29                         <?php foreach ( $templates as $id => $template ) { ?>
    30                             <?php if ( ! empty( $settings ) && isset( $settings[$role]['template'] ) && $id == $settings[$role]['template'] ) { ?>
    31                                 <option value="<?php echo $id; ?>" selected="selected" data-site="<?php echo null != $template['site'] ? $template['site'] : '';?>"><?php echo $template['title']; ?></option>
    32                             <?php } else { ?>
    33                                 <option value="<?php echo $id; ?>" data-site="<?php echo null != $template['site'] ? $template['site'] : '';?>"><?php echo $template['title']; ?></option>
    34                             <?php } ?>
    35                         <?php } ?>
    36                     </select>
    37                     <?php if ( is_multisite() ) { ?>
    38                         <input type="hidden" name="dwe_templates[<?php echo $role; ?>][site]" value="<?php echo isset( $settings[$role]['site'] ) ? $settings[$role]['site'] : ''; ?>" />
    39                     <?php } ?>
    40                 </td>
    41                 <td>
    42                     <input type="checkbox" name="dwe_templates[<?php echo $role; ?>][dismissible]" value="1"<?php echo ( ! empty( $settings ) && isset( $settings[$role]['dismissible'] ) ) ? ' checked="checked"' : ''; ?> />
    43                 </td>
    44             </tr>
    45             <?php $count++; } ?>
    46         </table>
     124    <?php
     125}
    47126
    48         <?php if ( is_multisite() && get_current_blog_id() == 1 ) { ?>
    49             <p>
    50                 <label>
    51                     <input type="checkbox" value="1" name="dwe_hide_from_subsites" <?php if ( get_option( 'dwe_hide_from_subsites' ) == true ) { echo 'checked="checked"'; } ?> />
    52                     <?php esc_html_e( 'Hide settings from network subsites', 'ibx-dwe' ); ?>
    53                 </label>
    54             </p>
    55         <?php } ?>
    56        
    57         <?php wp_nonce_field( 'dwe_settings', 'dwe_settings_nonce' ); ?>
    58         <?php submit_button(); ?>
    59 
    60     </form>
    61 </div>
    62 
    63 <style>
    64 .dwe-settings-wrap {
    65     max-width: 860px;
    66 }
    67 .dwe-subsite-notice {
    68     margin: 0;
    69     margin-bottom: 10px;
    70 }
    71 </style>
    72 
    73 <?php if ( is_multisite() ) { ?>
    74 <script>
    75 (function($) {
    76     $('.dwe-templates-list').on('change', function() {
    77         var id = $(this).val();
    78         var siteId = $(this).find('option[value="'+id+'"]').data('site'); console.log(siteId);
    79 
    80         if ( '' !== siteId && undefined !== siteId ) {
    81             $(this).parent().find('input[type="hidden"]').val(siteId);
    82         }
    83     });
    84 })(jQuery);
    85 </script>
    86 <?php } ?>
     127dwel_render_admin_settings_page( $title, $form_action, $roles, $templates, $settings );
  • dashboard-welcome-for-elementor/trunk/includes/welcome-panel.php

    r2675528 r3466675  
    1 <div id="dwe-dashboard-welcome" class="dwe-panel-content">
     1<?php
     2// Exit if accessed directly.
     3if ( ! defined( 'ABSPATH' ) ) {
     4    exit;
     5}
     6?>
     7<div id="dwel-dashboard-welcome" class="dwel-panel-content">
    28    <?php if ( ! current_user_can( 'edit_theme_options' ) ) { ?>
    3         <a class="welcome-panel-close" href="<?php echo admin_url('welcome=0'); ?>"><?php _e('Dismiss'); ?></a>
     9        <a class="welcome-panel-close" href="<?php echo esc_url( admin_url('welcome=0') ); ?>"><?php esc_html_e( 'Dismiss', 'dashboard-welcome-for-elementor' ); ?></a>
    410    <?php } ?>
    511   
     
    1117    ;(function($) {
    1218        $(document).ready(function() {
    13             $('<div id="welcome-panel" class="welcome-panel"></div>').insertBefore('#dashboard-widgets-wrap').append($('#dwe-dashboard-welcome'));
     19            $('<div id="welcome-panel" class="welcome-panel"></div>').insertBefore('#dashboard-widgets-wrap').append($('#dwel-dashboard-welcome'));
    1420        });
    1521    })(jQuery);
  • dashboard-welcome-for-elementor/trunk/readme.txt

    r3206537 r3466675  
    11=== Dashboard Welcome for Elementor ===
    22Contributors: ideaboxcreations, ibachal, simrandeep
    3 Tags: elementor, elementor addon, elementor template, dashboard welcome, dashboard widget, dashboard, powerpack elements, widgets, welcome, welcome screen, elementor extensions
     3Tags: elementor, elementor addon, elementor template, dashboard widget, dashboard
    44Requires at least: 6.3
    5 Tested up to: 6.7
     5Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: trunk
    8 License: GPLv3
    9 License URI: https://www.gnu.org/licenses/gpl-3.0.html
     7Stable tag: 1.0.9
     8
     9License: GPLv2 or later
     10License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1011
    1112Replaces the default WordPress dashboard welcome panel with custom designed Elementor template.
     
    5152== Changelog ==
    5253
     54= 1.0.9 - February 23, 2026 =
     55*   Enhancement: Improved plugin codebase to make the code more secure
     56*   Fix: Fixed an issue with load_plugin_textdomain
     57
    5358= 1.0.8 - March 7, 2024 =
    5459*   Security update
Note: See TracChangeset for help on using the changeset viewer.