Changeset 55553
- Timestamp:
- 03/15/2023 11:36:52 AM (21 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/package-lock.json
r55542 r55553 11942 11942 "version": "1.1.0", 11943 11943 "resolved": "https://registry.npmjs.org/from2-string/-/from2-string-1.1.0.tgz", 11944 "integrity": "sha 512-m8vCh+KnXXXBtfF2VUbiYlQ+nczLcntB0BrtNgpmLkHylhObe9WF1b2LZjBBzrZzA6P4mkEla6ZYQoOUTG8cYA==",11944 "integrity": "sha1-GCgrJ9CKJnyzAwzSuLSw8hKvdSo=", 11945 11945 "requires": { 11946 11946 "from2": "^2.0.3" … … 21100 21100 "version": "1.1.6", 21101 21101 "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-1.1.6.tgz", 21102 "integrity": "sha 512-7rrONfyLkDEc7OJ5QBkqa4KI4EBhCd340xRuIUPGCfu13znS+vx+VDdrT9ODAJHlXm7w4lbxN3DRjyv58EuzDg=="21102 "integrity": "sha1-zQTv9G9clcOn0EVZHXm14+AfEtc=" 21103 21103 }, 21104 21104 "prompts": { … … 23239 23239 "version": "1.0.0", 23240 23240 "resolved": "https://registry.npmjs.org/stream-from-promise/-/stream-from-promise-1.0.0.tgz", 23241 "integrity": "sha 512-j84KLkudt+gr8KJ21RB02btPLx61uGbrLnewsWz6QKmsz8/c4ZFqXw6mJh5+G4oRN7DgDxdbjPxnpySpg1mUig=="23241 "integrity": "sha1-djaH9913fkyJT2QIMz/Gs/yKYbs=" 23242 23242 }, 23243 23243 "stream-to-string": { … … 24507 24507 "version": "2.0.2", 24508 24508 "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", 24509 "integrity": "sha 512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg=="24509 "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=" 24510 24510 }, 24511 24511 "totalist": { -
trunk/src/wp-includes/widgets/class-wp-widget-custom-html.php
r55276 r55553 69 69 } 70 70 $this->registered = true; 71 72 wp_add_inline_script( 'custom-html-widgets', sprintf( 'wp.customHtmlWidgets.idBases.push( %s );', wp_json_encode( $this->id_base ) ) );73 71 74 72 // Note that the widgets component in the customizer will also do … … 217 215 218 216 wp_enqueue_script( 'custom-html-widgets' ); 217 wp_add_inline_script( 'custom-html-widgets', sprintf( 'wp.customHtmlWidgets.idBases.push( %s );', wp_json_encode( $this->id_base ) ) ); 218 219 219 if ( empty( $settings ) ) { 220 220 $settings = array( -
trunk/src/wp-includes/widgets/class-wp-widget-text.php
r55276 r55553 56 56 } 57 57 $this->registered = true; 58 59 wp_add_inline_script( 'text-widgets', sprintf( 'wp.textWidgets.idBases.push( %s );', wp_json_encode( $this->id_base ) ) );60 58 61 59 if ( $this->is_preview() ) { … … 437 435 wp_enqueue_media(); 438 436 wp_enqueue_script( 'text-widgets' ); 437 wp_add_inline_script( 'text-widgets', sprintf( 'wp.textWidgets.idBases.push( %s );', wp_json_encode( $this->id_base ) ) ); 439 438 wp_add_inline_script( 'text-widgets', 'wp.textWidgets.init();', 'after' ); 440 439 } -
trunk/tests/phpunit/tests/widgets/wpWidgetCustomHtml.php
r54088 r55553 68 68 $this->assertSame( 10, has_action( 'admin_footer-widgets.php', array( 'WP_Widget_Custom_HTML', 'render_control_template_scripts' ) ) ); 69 69 $this->assertSame( 10, has_action( 'admin_head-widgets.php', array( 'WP_Widget_Custom_HTML', 'add_help_text' ) ) ); 70 $this->assertContains( 'wp.customHtmlWidgets.idBases.push( "custom_html" );', wp_scripts()->registered['custom-html-widgets']->extra['after'] );71 70 } 72 71 -
trunk/tests/phpunit/tests/widgets/wpWidgetText.php
r54088 r55553 68 68 $this->assertSame( 10, has_action( 'admin_print_scripts-widgets.php', array( $widget, 'enqueue_admin_scripts' ) ) ); 69 69 $this->assertSame( 10, has_action( 'admin_footer-widgets.php', array( 'WP_Widget_Text', 'render_control_template_scripts' ) ) ); 70 $this->assertContains( 'wp.textWidgets.idBases.push( "text" );', wp_scripts()->registered['text-widgets']->extra['after'] );71 70 $this->assertFalse( has_action( 'wp_enqueue_scripts', array( $widget, 'enqueue_preview_scripts' ) ) ); 72 71 }
Note: See TracChangeset
for help on using the changeset viewer.