Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the variable used to check the main import page #42646

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

Simply rename a variable used on the import page for clarity.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ function import_page_customizations_init() {
$screen = get_current_screen();

// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no changes made to the site.
$has_import_param = ! isset( $_GET['import'] );
$is_main_import_page = ! isset( $_GET['import'] );

if ( $screen && $screen->id === 'import' && $has_import_param ) {
if ( $screen && $screen->id === 'import' && $is_main_import_page ) {
// Only add the banner if the user is using the wp-admin interface.
if ( get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) {
add_action( 'admin_notices', 'import_admin_banner' );
Expand Down