Skip to content

Commit

Permalink
Duplicate views: Check if the function exists. (#40542)
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanUngureanu authored Dec 10, 2024
1 parent fe333a6 commit 3f6eae4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions projects/plugins/wpcomsh/changelog/fix-add-function-exists
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Add a function_exists guard for a function


5 changes: 4 additions & 1 deletion projects/plugins/wpcomsh/feature-plugins/masterbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ function wpcomsh_set_connected_user_data_as_user_options( $transient, $value ) {
function wpcomsh_activate_nav_unification() {
remove_filter( 'pre_option_wpcom_admin_interface', 'wpcom_admin_interface_pre_get_option' );
$is_wp_admin_menu = get_option( 'wpcom_admin_interface' ) === 'wp-admin';
add_filter( 'pre_option_wpcom_admin_interface', 'wpcom_admin_interface_pre_get_option', 10 );

if ( function_exists( 'wpcom_admin_interface_pre_get_option' ) ) {
add_filter( 'pre_option_wpcom_admin_interface', 'wpcom_admin_interface_pre_get_option', 10 );
}

// Disable when in the redesigned nav.
if ( $is_wp_admin_menu ) {
Expand Down

0 comments on commit 3f6eae4

Please sign in to comment.