Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Fixed add new media notice, with carasmo's solution #9

Merged
merged 2 commits into from
Dec 20, 2017

Conversation

m9n
Copy link
Collaborator

@m9n m9n commented Dec 5, 2017

See for background: #5 (comment)

I applied the change to the controller assets class

@m9n m9n mentioned this pull request Dec 6, 2017
@@ -22,7 +22,10 @@ function __construct() {
* Do Work
*/
public function run() {
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
global $pagenow;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @m9n looking good, but a couple of code quality things:

  • Ensure globals are at the top of the function.
  • Use !== instead of !=
  • Use 'Yoda' type expressions, so if ( 'media-new.php' !== $pagenow )

The code sniffer should pick these up in your IDE, if they aren't let me know and we can work out why these rules are not triggering.

@m9n
Copy link
Collaborator Author

m9n commented Dec 12, 2017

Fixed this, I think?
2ae5476

@mattwatsoncodes mattwatsoncodes merged commit 6dd51a1 into master Dec 20, 2017
@mattwatsoncodes mattwatsoncodes deleted the issue/5-upload-media-error branch December 20, 2017 11:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants