Changeset 41052
- Timestamp:
- 07/14/2017 05:22:54 PM (7 years ago)
- Location:
- branches/4.8
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
-
branches/4.8/src/wp-includes/widgets/class-wp-widget-media.php
r40812 r41052 33 33 'add_media' => '', 34 34 ); 35 36 /** 37 * Whether or not the widget has been registered yet. 38 * 39 * @since 4.8.1 40 * @var bool 41 */ 42 protected $registered = false; 35 43 36 44 /** … … 87 95 * @since 4.8.0 88 96 * @access public 89 */ 90 public function _register() { 97 * 98 * @param integer $number Optional. The unique order number of this widget instance 99 * compared to other instances of the same class. Default -1. 100 */ 101 public function _register_one( $number = -1 ) { 102 parent::_register_one( $number ); 103 if ( $this->registered ) { 104 return; 105 } 106 $this->registered = true; 91 107 92 108 // Note that the widgets component in the customizer will also do the 'admin_print_scripts-widgets.php' action in WP_Customize_Widgets::print_scripts(). … … 101 117 102 118 add_filter( 'display_media_states', array( $this, 'display_media_state' ), 10, 2 ); 103 104 parent::_register();105 119 } 106 120 -
branches/4.8/src/wp-includes/widgets/class-wp-widget-text.php
r41044 r41052 16 16 */ 17 17 class WP_Widget_Text extends WP_Widget { 18 19 /** 20 * Whether or not the widget has been registered yet. 21 * 22 * @since 4.8.1 23 * @var bool 24 */ 25 protected $registered = false; 18 26 19 27 /** … … 39 47 * Add hooks for enqueueing assets when registering all widget instances of this widget class. 40 48 * 41 * @since 4.8.0 42 * @access public 43 */ 44 public function _register() { 49 * @param integer $number Optional. The unique order number of this widget instance 50 * compared to other instances of the same class. Default -1. 51 */ 52 public function _register_one( $number = -1 ) { 53 parent::_register_one( $number ); 54 if ( $this->registered ) { 55 return; 56 } 57 $this->registered = true; 45 58 46 59 // Note that the widgets component in the customizer will also do the 'admin_print_scripts-widgets.php' action in WP_Customize_Widgets::print_scripts(). … … 49 62 // Note that the widgets component in the customizer will also do the 'admin_footer-widgets.php' action in WP_Customize_Widgets::print_footer_scripts(). 50 63 add_action( 'admin_footer-widgets.php', array( $this, 'render_control_template_scripts' ) ); 51 52 parent::_register();53 64 } 54 65
Note: See TracChangeset
for help on using the changeset viewer.