mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-06 13:44:30 +00:00
Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards. See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments. Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192], [56193]. Props costdev, audrasjb. See #58459. git-svn-id: https://develop.svn.wordpress.org/trunk@56194 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -57,8 +57,10 @@ function wp_register_tinymce_scripts( $scripts, $force_uncompressed = false ) {
|
||||
$compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] )
|
||||
&& false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $force_uncompressed;
|
||||
|
||||
// Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production)
|
||||
// or tinymce.min.js (when SCRIPT_DEBUG is true).
|
||||
/*
|
||||
* Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production)
|
||||
* or tinymce.min.js (when SCRIPT_DEBUG is true).
|
||||
*/
|
||||
if ( $compressed ) {
|
||||
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.js', array(), $tinymce_version );
|
||||
} else {
|
||||
@@ -585,8 +587,10 @@ function wp_tinymce_inline_scripts() {
|
||||
/** This filter is documented in wp-includes/class-wp-editor.php */
|
||||
$tinymce_settings = apply_filters( 'tiny_mce_before_init', $tinymce_settings, 'classic-block' );
|
||||
|
||||
// Do "by hand" translation from PHP array to js object.
|
||||
// Prevents breakage in some custom settings.
|
||||
/*
|
||||
* Do "by hand" translation from PHP array to js object.
|
||||
* Prevents breakage in some custom settings.
|
||||
*/
|
||||
$init_obj = '';
|
||||
foreach ( $tinymce_settings as $key => $value ) {
|
||||
if ( is_bool( $value ) ) {
|
||||
@@ -825,17 +829,21 @@ function wp_default_scripts( $scripts ) {
|
||||
// Not used in core, replaced by Jcrop.js.
|
||||
$scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array( 'scriptaculous-dragdrop' ) );
|
||||
|
||||
// jQuery.
|
||||
// The unminified jquery.js and jquery-migrate.js are included to facilitate debugging.
|
||||
/*
|
||||
* jQuery.
|
||||
* The unminified jquery.js and jquery-migrate.js are included to facilitate debugging.
|
||||
*/
|
||||
$scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '3.7.0' );
|
||||
$scripts->add( 'jquery-core', "/wp-includes/js/jquery/jquery$suffix.js", array(), '3.7.0' );
|
||||
$scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '3.4.1' );
|
||||
|
||||
// Full jQuery UI.
|
||||
// The build process in 1.12.1 has changed significantly.
|
||||
// In order to keep backwards compatibility, and to keep the optimized loading,
|
||||
// the source files were flattened and included with some modifications for AMD loading.
|
||||
// A notable change is that 'jquery-ui-core' now contains 'jquery-ui-position' and 'jquery-ui-widget'.
|
||||
/*
|
||||
* Full jQuery UI.
|
||||
* The build process in 1.12.1 has changed significantly.
|
||||
* In order to keep backwards compatibility, and to keep the optimized loading,
|
||||
* the source files were flattened and included with some modifications for AMD loading.
|
||||
* A notable change is that 'jquery-ui-core' now contains 'jquery-ui-position' and 'jquery-ui-widget'.
|
||||
*/
|
||||
$scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$suffix.js", array( 'jquery' ), '1.13.2', 1 );
|
||||
$scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$suffix.js", array( 'jquery' ), '1.13.2', 1 );
|
||||
|
||||
@@ -881,8 +889,10 @@ function wp_default_scripts( $scripts ) {
|
||||
$scripts->add( 'jquery-ui-selectable', "/wp-includes/js/jquery/ui/selectable$suffix.js", array( 'jquery-ui-mouse' ), '1.13.2', 1 );
|
||||
$scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$suffix.js", array( 'jquery-ui-mouse' ), '1.13.2', 1 );
|
||||
|
||||
// As of 1.12.1 `jquery-ui-position` and `jquery-ui-widget` are part of `jquery-ui-core`.
|
||||
// Listed here for back-compat.
|
||||
/*
|
||||
* As of 1.12.1 `jquery-ui-position` and `jquery-ui-widget` are part of `jquery-ui-core`.
|
||||
* Listed here for back-compat.
|
||||
*/
|
||||
$scripts->add( 'jquery-ui-position', false, array( 'jquery-ui-core' ), '1.13.2', 1 );
|
||||
$scripts->add( 'jquery-ui-widget', false, array( 'jquery-ui-core' ), '1.13.2', 1 );
|
||||
|
||||
@@ -915,8 +925,10 @@ function wp_default_scripts( $scripts ) {
|
||||
// Not used any more, registered for backward compatibility.
|
||||
$scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array( 'jquery' ), '1.1-20110113', 1 );
|
||||
|
||||
// Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
|
||||
// It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
|
||||
/*
|
||||
* Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
|
||||
* It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
|
||||
*/
|
||||
$scripts->add( 'imagesloaded', '/wp-includes/js/imagesloaded.min.js', array(), '4.1.4', 1 );
|
||||
$scripts->add( 'masonry', '/wp-includes/js/masonry.min.js', array( 'imagesloaded' ), '4.2.2', 1 );
|
||||
$scripts->add( 'jquery-masonry', '/wp-includes/js/jquery/jquery.masonry.min.js', array( 'jquery', 'masonry' ), '3.1.2b', 1 );
|
||||
@@ -1338,8 +1350,10 @@ function wp_default_scripts( $scripts ) {
|
||||
|
||||
$scripts->add( 'wp-embed', "/wp-includes/js/wp-embed$suffix.js", array(), false, 1 );
|
||||
|
||||
// To enqueue media-views or media-editor, call wp_enqueue_media().
|
||||
// Both rely on numerous settings, styles, and templates to operate correctly.
|
||||
/*
|
||||
* To enqueue media-views or media-editor, call wp_enqueue_media().
|
||||
* Both rely on numerous settings, styles, and templates to operate correctly.
|
||||
*/
|
||||
$scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y', 'clipboard' ), false, 1 );
|
||||
$scripts->set_translations( 'media-views' );
|
||||
|
||||
@@ -1635,8 +1649,10 @@ function wp_default_styles( $styles ) {
|
||||
$wp_edit_blocks_dependencies = array(
|
||||
'wp-components',
|
||||
'wp-editor',
|
||||
// This need to be added before the block library styles,
|
||||
// The block library styles override the "reset" styles.
|
||||
/*
|
||||
* This needs to be added before the block library styles,
|
||||
* The block library styles override the "reset" styles.
|
||||
*/
|
||||
'wp-reset-editor-styles',
|
||||
'wp-block-library',
|
||||
'wp-reusable-blocks',
|
||||
@@ -2714,8 +2730,10 @@ function wp_sanitize_script_attributes( $attributes ) {
|
||||
$html5_script_support = ! is_admin() && ! current_theme_supports( 'html5', 'script' );
|
||||
$attributes_string = '';
|
||||
|
||||
// If HTML5 script tag is supported, only the attribute name is added
|
||||
// to $attributes_string for entries with a boolean value, and that are true.
|
||||
/*
|
||||
* If HTML5 script tag is supported, only the attribute name is added
|
||||
* to $attributes_string for entries with a boolean value, and that are true.
|
||||
*/
|
||||
foreach ( $attributes as $attribute_name => $attribute_value ) {
|
||||
if ( is_bool( $attribute_value ) ) {
|
||||
if ( $attribute_value ) {
|
||||
@@ -2896,8 +2914,10 @@ function wp_maybe_inline_styles() {
|
||||
// Get the styles if we don't already have them.
|
||||
$style['css'] = file_get_contents( $style['path'] );
|
||||
|
||||
// Check if the style contains relative URLs that need to be modified.
|
||||
// URLs relative to the stylesheet's path should be converted to relative to the site's root.
|
||||
/*
|
||||
* Check if the style contains relative URLs that need to be modified.
|
||||
* URLs relative to the stylesheet's path should be converted to relative to the site's root.
|
||||
*/
|
||||
$style['css'] = _wp_normalize_relative_css_links( $style['css'], $style['src'] );
|
||||
|
||||
// Set `src` to `false` and add styles inline.
|
||||
@@ -3710,9 +3730,11 @@ function wp_add_editor_classic_theme_styles( $editor_settings ) {
|
||||
$suffix = wp_scripts_get_suffix();
|
||||
$classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css";
|
||||
|
||||
// This follows the pattern of get_block_editor_theme_styles,
|
||||
// but we can't use get_block_editor_theme_styles directly as it
|
||||
// only handles external files or theme files.
|
||||
/*
|
||||
* This follows the pattern of get_block_editor_theme_styles,
|
||||
* but we can't use get_block_editor_theme_styles directly as it
|
||||
* only handles external files or theme files.
|
||||
*/
|
||||
$classic_theme_styles_settings = array(
|
||||
'css' => file_get_contents( $classic_theme_styles ),
|
||||
'__unstableType' => 'core',
|
||||
|
||||
Reference in New Issue
Block a user