Make WordPress Core


Ignore:
Timestamp:
08/27/2016 06:06:50 AM (8 years ago)
Author:
wonderboymusic
Message:

Press This: the file for the WP_Press_This class should not produce side effects. Similar to what we did in r38355 for WP_Site_Icon, drop the instances of global instantiation for $wp_press_this via loading the file. The variable can be set inline when necessary. In most of those places, if the global is already set, the file does not load and stomp it currently.

See #37699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r38388 r38397  
    29112911
    29122912    include_once( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
     2913    $GLOBALS['wp_press_this'] = new WP_Press_This();
    29132914    $bookmarklet_version = $GLOBALS['wp_press_this']->version;
    29142915    $link = '';
Note: See TracChangeset for help on using the changeset viewer.