Changeset 3466675
- Timestamp:
- 02/22/2026 03:30:18 AM (5 weeks ago)
- Location:
- dashboard-welcome-for-elementor
- Files:
-
- 2 added
- 2 deleted
- 12 edited
- 1 copied
-
tags/1.0.9 (copied) (copied from dashboard-welcome-for-elementor/trunk)
-
tags/1.0.9/README.md (modified) (1 diff)
-
tags/1.0.9/assets/css/dashboard.css (modified) (2 diffs)
-
tags/1.0.9/classes/class-dwe-admin.php (deleted)
-
tags/1.0.9/classes/class-dwel-admin.php (added)
-
tags/1.0.9/dashboard-welcome-elementor.php (modified) (11 diffs)
-
tags/1.0.9/includes/admin-settings.php (modified) (1 diff)
-
tags/1.0.9/includes/welcome-panel.php (modified) (2 diffs)
-
tags/1.0.9/readme.txt (modified) (2 diffs)
-
trunk/README.md (modified) (1 diff)
-
trunk/assets/css/dashboard.css (modified) (2 diffs)
-
trunk/classes/class-dwe-admin.php (deleted)
-
trunk/classes/class-dwel-admin.php (added)
-
trunk/dashboard-welcome-elementor.php (modified) (11 diffs)
-
trunk/includes/admin-settings.php (modified) (1 diff)
-
trunk/includes/welcome-panel.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dashboard-welcome-for-elementor/tags/1.0.9/README.md
r2287331 r3466675 33 33 ### Changelog ### 34 34 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 35 47 #### 1.0.5 - April 20, 2020 #### 36 48 * Tested compatibility with latest versions of WP and Elementor -
dashboard-welcome-for-elementor/tags/1.0.9/assets/css/dashboard.css
r1926073 r3466675 4 4 } 5 5 6 .welcome-panel .dwe -panel-content {6 .welcome-panel .dwel-panel-content { 7 7 margin-left: 0; 8 8 margin-right: 0; … … 11 11 } 12 12 13 .welcome-panel .dwe -panel-content h3 {13 .welcome-panel .dwel-panel-content h3 { 14 14 margin: auto; 15 15 } -
dashboard-welcome-for-elementor/tags/1.0.9/dashboard-welcome-elementor.php
r3047389 r3466675 4 4 * Plugin URI: https://powerpackelements.com/dashboard-welcome-elementor/ 5 5 * Description: Replaces the default WordPress dashboard welcome panel with a Elementor template. 6 * Version: 1.0. 86 * Version: 1.0.9 7 7 * Author: IdeaBox Creations 8 8 * Author URI: https://ideaboxcreations.com … … 10 10 * License: GNU General Public License v2.0 11 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 * Text Domain: ibx-dwe12 * Text Domain: dashboard-welcome-for-elementor 13 13 */ 14 14 … … 18 18 } 19 19 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__ );20 define( 'DWEL_VER', '1.0.9' ); 21 define( 'DWEL_DIR', plugin_dir_path( __FILE__ ) ); 22 define( 'DWEL_URL', plugins_url( '/', __FILE__ ) ); 23 define( 'DWEL_PATH', plugin_basename( __FILE__ ) ); 24 define( 'DWEL_FILE', __FILE__ ); 25 25 26 final class D WE_Plugin {26 final class Dashboard_Welcome_Elementor_Plugin { 27 27 /** 28 28 * Holds the current class object. … … 38 38 * @since 1.0.0 39 39 */ 40 public function __construct() 41 { 40 public function __construct() { 42 41 add_action( 'plugins_loaded', array( $this, 'loader' ) ); 43 42 } … … 49 48 * @return void 50 49 */ 51 public function loader() 52 { 50 public function loader() { 53 51 if ( ! did_action( 'elementor/loaded' ) ) { 54 52 add_action( 'admin_notices', array( $this, 'plugin_load_fail' ) ); … … 56 54 } 57 55 58 require_once IBX_DWE_DIR . 'classes/class-dwe-admin.php';56 require_once DWEL_DIR . 'classes/class-dwel-admin.php'; 59 57 60 $dwe_admin = D WE_Plugin\Admin::get_instance();58 $dwe_admin = Dashboard_Welcome_Elementor_Plugin\Admin::get_instance(); 61 59 } 62 60 … … 67 65 * @return void 68 66 */ 69 public function plugin_load_fail() 70 { 67 public function plugin_load_fail() { 71 68 $screen = get_current_screen(); 72 69 if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) { … … 81 78 } 82 79 83 $activation_url = wp_nonce_url( 'plugins.php?action=activate& amp;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 ); 84 81 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 ); 87 88 } else { 88 89 if ( ! current_user_can( 'install_plugins' ) ) { … … 92 93 $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' ); 93 94 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 ); 96 101 } 97 102 98 echo '<div class=" error"><p>' . $message . '</p></div>';103 echo '<div class="notice notice-error">' . wp_kses_post( $message ) . '</div>'; 99 104 } 100 105 … … 105 110 * @return object 106 111 */ 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(); 111 115 } 112 116 … … 116 120 117 121 // 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. 3 if ( ! defined( 'ABSPATH' ) ) { 4 exit; 5 } 6 7 function 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> 9 123 <?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 } 47 126 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 } ?> 127 dwel_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. 3 if ( ! defined( 'ABSPATH' ) ) { 4 exit; 5 } 6 ?> 7 <div id="dwel-dashboard-welcome" class="dwel-panel-content"> 2 8 <?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> 4 10 <?php } ?> 5 11 … … 11 17 ;(function($) { 12 18 $(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')); 14 20 }); 15 21 })(jQuery); -
dashboard-welcome-for-elementor/tags/1.0.9/readme.txt
r3206537 r3466675 1 1 === Dashboard Welcome for Elementor === 2 2 Contributors: ideaboxcreations, ibachal, simrandeep 3 Tags: elementor, elementor addon, elementor template, dashboard w elcome, dashboard widget, dashboard, powerpack elements, widgets, welcome, welcome screen, elementor extensions3 Tags: elementor, elementor addon, elementor template, dashboard widget, dashboard 4 4 Requires at least: 6.3 5 Tested up to: 6. 75 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: trunk 8 License: GPLv3 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html 7 Stable tag: 1.0.9 8 9 License: GPLv2 or later 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 11 11 12 Replaces the default WordPress dashboard welcome panel with custom designed Elementor template. … … 51 52 == Changelog == 52 53 54 = 1.0.9 - February 23, 2026 = 55 * Security update 56 53 57 = 1.0.8 - March 7, 2024 = 54 58 * Security update -
dashboard-welcome-for-elementor/trunk/README.md
r2287331 r3466675 33 33 ### Changelog ### 34 34 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 35 48 #### 1.0.5 - April 20, 2020 #### 36 49 * Tested compatibility with latest versions of WP and Elementor -
dashboard-welcome-for-elementor/trunk/assets/css/dashboard.css
r1926073 r3466675 4 4 } 5 5 6 .welcome-panel .dwe -panel-content {6 .welcome-panel .dwel-panel-content { 7 7 margin-left: 0; 8 8 margin-right: 0; … … 11 11 } 12 12 13 .welcome-panel .dwe -panel-content h3 {13 .welcome-panel .dwel-panel-content h3 { 14 14 margin: auto; 15 15 } -
dashboard-welcome-for-elementor/trunk/dashboard-welcome-elementor.php
r3047389 r3466675 4 4 * Plugin URI: https://powerpackelements.com/dashboard-welcome-elementor/ 5 5 * Description: Replaces the default WordPress dashboard welcome panel with a Elementor template. 6 * Version: 1.0. 86 * Version: 1.0.9 7 7 * Author: IdeaBox Creations 8 8 * Author URI: https://ideaboxcreations.com … … 10 10 * License: GNU General Public License v2.0 11 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 * Text Domain: ibx-dwe12 * Text Domain: dashboard-welcome-for-elementor 13 13 */ 14 14 … … 18 18 } 19 19 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__ );20 define( 'DWEL_VER', '1.0.9' ); 21 define( 'DWEL_DIR', plugin_dir_path( __FILE__ ) ); 22 define( 'DWEL_URL', plugins_url( '/', __FILE__ ) ); 23 define( 'DWEL_PATH', plugin_basename( __FILE__ ) ); 24 define( 'DWEL_FILE', __FILE__ ); 25 25 26 final class D WE_Plugin {26 final class Dashboard_Welcome_Elementor_Plugin { 27 27 /** 28 28 * Holds the current class object. … … 38 38 * @since 1.0.0 39 39 */ 40 public function __construct() 41 { 40 public function __construct() { 42 41 add_action( 'plugins_loaded', array( $this, 'loader' ) ); 43 42 } … … 49 48 * @return void 50 49 */ 51 public function loader() 52 { 50 public function loader() { 53 51 if ( ! did_action( 'elementor/loaded' ) ) { 54 52 add_action( 'admin_notices', array( $this, 'plugin_load_fail' ) ); … … 56 54 } 57 55 58 require_once IBX_DWE_DIR . 'classes/class-dwe-admin.php';56 require_once DWEL_DIR . 'classes/class-dwel-admin.php'; 59 57 60 $dwe_admin = D WE_Plugin\Admin::get_instance();58 $dwe_admin = Dashboard_Welcome_Elementor_Plugin\Admin::get_instance(); 61 59 } 62 60 … … 67 65 * @return void 68 66 */ 69 public function plugin_load_fail() 70 { 67 public function plugin_load_fail() { 71 68 $screen = get_current_screen(); 72 69 if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) { … … 81 78 } 82 79 83 $activation_url = wp_nonce_url( 'plugins.php?action=activate& amp;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 ); 84 81 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 ); 87 88 } else { 88 89 if ( ! current_user_can( 'install_plugins' ) ) { … … 92 93 $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' ); 93 94 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 ); 96 101 } 97 102 98 echo '<div class=" error"><p>' . $message . '</p></div>';103 echo '<div class="notice notice-error">' . wp_kses_post( $message ) . '</div>'; 99 104 } 100 105 … … 105 110 * @return object 106 111 */ 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(); 111 115 } 112 116 … … 116 120 117 121 // 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. 3 if ( ! defined( 'ABSPATH' ) ) { 4 exit; 5 } 6 7 function 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> 9 123 <?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 } 47 126 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 } ?> 127 dwel_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. 3 if ( ! defined( 'ABSPATH' ) ) { 4 exit; 5 } 6 ?> 7 <div id="dwel-dashboard-welcome" class="dwel-panel-content"> 2 8 <?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> 4 10 <?php } ?> 5 11 … … 11 17 ;(function($) { 12 18 $(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')); 14 20 }); 15 21 })(jQuery); -
dashboard-welcome-for-elementor/trunk/readme.txt
r3206537 r3466675 1 1 === Dashboard Welcome for Elementor === 2 2 Contributors: ideaboxcreations, ibachal, simrandeep 3 Tags: elementor, elementor addon, elementor template, dashboard w elcome, dashboard widget, dashboard, powerpack elements, widgets, welcome, welcome screen, elementor extensions3 Tags: elementor, elementor addon, elementor template, dashboard widget, dashboard 4 4 Requires at least: 6.3 5 Tested up to: 6. 75 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: trunk 8 License: GPLv3 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html 7 Stable tag: 1.0.9 8 9 License: GPLv2 or later 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 11 11 12 Replaces the default WordPress dashboard welcome panel with custom designed Elementor template. … … 51 52 == Changelog == 52 53 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 53 58 = 1.0.8 - March 7, 2024 = 54 59 * Security update
Note: See TracChangeset
for help on using the changeset viewer.