Skip to content

Commit 3b68d4f

Browse files
committed
functions rename
1 parent 9b80524 commit 3b68d4f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

modules/setting/class-setting-output.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static function init() {
6868
*/
6969
public function setup() {
7070

71-
add_action( 'admin_init', array( self::get_instance(), 'check_welcome_panel' ) );
71+
add_action( 'admin_init', array( self::get_instance(), 'custom_welcome_panel' ) );
7272
add_action( 'admin_enqueue_scripts', array( self::get_instance(), 'dashboard_custom_css' ), 200 );
7373
add_action( 'admin_head', array( self::get_instance(), 'admin_custom_css' ), 200 );
7474
add_action( 'admin_head', array( self::get_instance(), 'change_dashboard_headline' ) );
@@ -166,7 +166,7 @@ public function remove_screen_options_tab() {
166166
/**
167167
* Check if we have custom welcome panel.
168168
*/
169-
public function check_welcome_panel() {
169+
public function custom_welcome_panel() {
170170

171171
$settings = get_option( 'udb_settings' );
172172

@@ -175,14 +175,14 @@ public function check_welcome_panel() {
175175
}
176176

177177
remove_action( 'welcome_panel', 'wp_welcome_panel' );
178-
add_action( 'welcome_panel', array( self::get_instance(), 'custom_welcome_panel' ) );
178+
add_action( 'welcome_panel', array( self::get_instance(), 'welcome_panel_content' ) );
179179

180180
}
181181

182182
/**
183-
* Output custom welcome panel.
183+
* Output welcome panel content.
184184
*/
185-
public function custom_welcome_panel() {
185+
public function welcome_panel_content() {
186186

187187
$settings = get_option( 'udb_settings' );
188188
$content = ! isset( $settings['welcome_panel_content'] ) || empty( $settings['welcome_panel_content'] ) ? '' : $settings['welcome_panel_content'];
@@ -191,7 +191,8 @@ public function custom_welcome_panel() {
191191
do_action( 'udb_ms_switch_blog' );
192192

193193
$settings = get_option( 'udb_settings' );
194-
$content = ! isset( $settings['welcome_panel_content'] ) || empty( $settings['welcome_panel_content'] ) ? '' : $settings['welcome_panel_content'];
194+
// This would never be empty because we already did cheking on `custom_welcome_panel` function above from multisite.
195+
$content = $settings['welcome_panel_content'];
195196

196197
do_action( 'udb_ms_restore_blog' );
197198
}

0 commit comments

Comments
 (0)