-
Notifications
You must be signed in to change notification settings - Fork 385
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
Fix deprecation warnings #7614
Fix deprecation warnings #7614
Changes from 9 commits
1bd40ef
2c43d0d
020eaaa
6e9f2cf
308e17c
1e8de9a
14b70d7
41b2ff6
091fdfd
6d8a722
e8f73c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ public static function get_registration_action() { | |
*/ | ||
public function register() { | ||
add_submenu_page( | ||
'', | ||
'options.php', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Linking your pervious #7614 (comment) here. This was made an empty string in e30168c. You say:
Can you clarify further what this is doing? Is it that there is no menu item for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. It won't be accessible from a submenu item but rather only accessible via the URL which is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or if we want to hook it to |
||
__( 'AMP Onboarding Wizard', 'amp' ), | ||
__( 'AMP Onboarding Wizard', 'amp' ), | ||
'manage_options', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,6 +290,13 @@ public function test_render_screen_for_admin_user() { | |
) | ||
); | ||
|
||
// Set current screen to be the options menu. | ||
set_current_screen( $this->instance->screen_handle() ); | ||
|
||
// Set title to be used in the screen. | ||
global $title; | ||
$title = 'Test Title'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see this is coming from 1e8de9a. It was needed due to a PHP warning during tests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, while rendering the screen it requires the title, but the title is not being set anywhere. |
||
|
||
ob_start(); | ||
$this->instance->render_screen(); | ||
$this->assertStringContainsString( '<div class="wrap">', ob_get_clean() ); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this commit needed to work around the issue in tests which you're fixing in core? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which commit? I am unable to see any diff with this comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I meant 2c43d0d There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's different from that one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What was the deprecation warning? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those were the same as passing null to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redirect_is
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be
$redirect_to
. Will update it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 6d8a722