Coding Standards: Remove superfluous blank lines at the end of various functions.

Note: This is enforced by WPCS 3.0.0.

Follow-up to [56536], [56547].

Props jrf.
See #59161, #58831.
Built from https://develop.svn.wordpress.org/trunk@56548


git-svn-id: http://core.svn.wordpress.org/trunk@56060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-09-08 10:03:21 +00:00
parent 9a49b70239
commit d8936a9fe7
38 changed files with 1 additions and 65 deletions

View File

@ -333,7 +333,6 @@ class WP_Filesystem_Base {
* This comes into effect when the CWD is /home/user/ but WP is at /var/www/....
*/
return $this->search_for_folder( $folder, '/', true );
}
/**

View File

@ -63,7 +63,6 @@ class WP_Terms_List_Table extends WP_List_Table {
if ( empty( $post_type ) || ! in_array( $post_type, get_post_types( array( 'show_ui' => true ) ), true ) ) {
$post_type = 'post';
}
}
/**

View File

@ -284,7 +284,6 @@ function wp_dashboard() {
<?php
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
}
//

View File

@ -953,7 +953,6 @@ function wp_read_image_metadata( $file ) {
* @param array $exif EXIF data.
*/
return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc, $exif );
}
/**

View File

@ -1320,7 +1320,6 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) {
} elseif ( is_wp_error( $menu ) ) {
return $menu;
}
}
/**

View File

@ -161,7 +161,6 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
* @param WP_Post $compare_to The revision post to compare to.
*/
return apply_filters( 'wp_get_revision_ui_diff', $return, $compare_from, $compare_to );
}
/**

View File

@ -1451,7 +1451,6 @@ function do_meta_boxes( $screen, $context, $data_object ) {
echo '</div>';
return $i;
}
/**

View File

@ -243,7 +243,6 @@ function display_themes() {
}
$wp_list_table->prepare_items();
$wp_list_table->display();
}
/**

View File

@ -995,7 +995,6 @@ function upgrade_110() {
$wpdb->query( "UPDATE $wpdb->comments SET comment_date_gmt = DATE_ADD(comment_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)" );
$wpdb->query( "UPDATE $wpdb->users SET user_registered = DATE_ADD(user_registered, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)" );
}
}
/**
@ -1545,7 +1544,6 @@ function upgrade_250() {
if ( $wp_current_db_version < 6689 ) {
populate_roles_250();
}
}
/**
@ -1704,7 +1702,6 @@ function upgrade_300() {
)
);
}
}
/**

View File

@ -191,7 +191,6 @@ function list_core_update( $update ) {
}
echo '</form>';
}
/**

View File

@ -147,7 +147,6 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
if ( ! is_customize_preview() ) {
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
}
}
/**

View File

@ -207,7 +207,6 @@ function twentynineteen_widgets_init() {
'after_title' => '</h2>',
)
);
}
add_action( 'widgets_init', 'twentynineteen_widgets_init' );

View File

@ -131,7 +131,6 @@ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) {
// Return the specified styles.
return twentytwenty_generate_css( implode( ',', $elements[ $type ] ), 'font-family', implode( ',', $font_family[ $locale ] ), null, null, false );
}
}
}

View File

@ -136,7 +136,6 @@ function twentytwenty_theme_support() {
*/
$loader = new TwentyTwenty_Script_Loader();
add_filter( 'script_loader_tag', array( $loader, 'filter_script_loader_tag' ), 10, 2 );
}
add_action( 'after_setup_theme', 'twentytwenty_theme_support' );
@ -195,7 +194,6 @@ function twentytwenty_register_styles() {
// Add print CSS.
wp_enqueue_style( 'twentytwenty-print-style', get_template_directory_uri() . '/print.css', null, $theme_version, 'print' );
}
add_action( 'wp_enqueue_scripts', 'twentytwenty_register_styles' );
@ -215,7 +213,6 @@ function twentytwenty_register_scripts() {
wp_enqueue_script( 'twentytwenty-js', get_template_directory_uri() . '/assets/js/index.js', array(), $theme_version );
wp_script_add_data( 'twentytwenty-js', 'async', true );
}
add_action( 'wp_enqueue_scripts', 'twentytwenty_register_scripts' );
@ -330,7 +327,6 @@ function twentytwenty_get_custom_logo( $html ) {
}
return $html;
}
add_filter( 'get_custom_logo', 'twentytwenty_get_custom_logo' );
@ -402,7 +398,6 @@ function twentytwenty_sidebar_registration() {
)
)
);
}
add_action( 'widgets_init', 'twentytwenty_sidebar_registration' );
@ -448,7 +443,6 @@ function twentytwenty_classic_editor_styles() {
);
add_editor_style( $classic_editor_styles );
}
add_action( 'init', 'twentytwenty_classic_editor_styles' );
@ -477,7 +471,6 @@ function twentytwenty_add_classic_editor_customizer_styles( $mce_init ) {
}
return $mce_init;
}
add_filter( 'tiny_mce_before_init', 'twentytwenty_add_classic_editor_customizer_styles' );
@ -505,7 +498,6 @@ function twentytwenty_add_classic_editor_non_latin_styles( $mce_init ) {
}
return $mce_init;
}
add_filter( 'tiny_mce_before_init', 'twentytwenty_add_classic_editor_non_latin_styles' );
@ -597,7 +589,6 @@ function twentytwenty_block_editor_settings() {
if ( '#ffffff' === strtolower( twentytwenty_get_color_for_area( 'content', 'text' ) ) ) {
add_theme_support( 'dark-editor-style' );
}
}
add_action( 'after_setup_theme', 'twentytwenty_block_editor_settings' );

View File

@ -42,7 +42,6 @@ if ( ! function_exists( 'twentytwenty_generate_css' ) ) {
}
return $return;
}
}
@ -190,6 +189,5 @@ if ( ! function_exists( 'twentytwenty_get_customizer_css' ) ) {
// Return the results.
return ob_get_clean();
}
}

View File

@ -214,5 +214,4 @@ function twentytwenty_get_starter_content() {
* @param array $starter_content Array of starter content.
*/
return apply_filters( 'twentytwenty_starter_content', $starter_content );
}

View File

@ -88,7 +88,6 @@ function twentytwenty_site_logo( $args = array(), $display = true ) {
}
echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
/**
@ -154,7 +153,6 @@ function twentytwenty_is_comment_by_post_author( $comment = null ) {
}
}
return false;
}
/**
@ -172,7 +170,6 @@ function twentytwenty_filter_comment_reply_link( $link ) {
$link = str_replace( 'class=\'', 'class=\'do-not-scroll ', $link );
return $link;
}
add_filter( 'comment_reply_link', 'twentytwenty_filter_comment_reply_link' );
@ -194,7 +191,6 @@ add_filter( 'comment_reply_link', 'twentytwenty_filter_comment_reply_link' );
function twentytwenty_the_post_meta( $post_id = null, $location = 'single-top' ) {
echo twentytwenty_get_post_meta( $post_id, $location ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in twentytwenty_get_post_meta().
}
/**
@ -231,7 +227,6 @@ function twentytwenty_edit_post_link( $link, $post_id, $text ) {
);
return '<div class="post-meta-wrapper post-meta-edit-link-wrapper"><ul class="post-meta"><li class="post-edit meta-wrapper"><span class="meta-icon">' . twentytwenty_get_theme_svg( 'edit' ) . '</span><span class="meta-text"><a href="' . esc_url( $edit_url ) . '">' . $text . '</a></span></li></ul><!-- .post-meta --></div><!-- .post-meta-wrapper -->';
}
add_filter( 'edit_post_link', 'twentytwenty_edit_post_link', 10, 3 );
@ -523,7 +518,6 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
}
}
}
/**
@ -564,7 +558,6 @@ function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $page, $dep
}
return $css_class;
}
add_filter( 'page_css_class', 'twentytwenty_filter_wp_list_pages_item_classes', 10, 4 );
@ -614,7 +607,6 @@ function twentytwenty_add_sub_toggles_to_main_menu( $args, $item ) {
}
return $args;
}
add_filter( 'nav_menu_item_args', 'twentytwenty_add_sub_toggles_to_main_menu', 10, 2 );
@ -661,7 +653,6 @@ function twentytwenty_no_js_class() {
?>
<script>document.documentElement.className = document.documentElement.className.replace( 'no-js', 'js' );</script>
<?php
}
add_action( 'wp_head', 'twentytwenty_no_js_class' );
@ -762,7 +753,6 @@ function twentytwenty_body_classes( $classes ) {
}
return $classes;
}
add_filter( 'body_class', 'twentytwenty_body_classes' );
@ -803,7 +793,6 @@ function twentytwenty_get_the_archive_title( $title ) {
}
return preg_replace( $regex['pattern'], $regex['replacement'], $title );
}
add_filter( 'get_the_archive_title', 'twentytwenty_get_the_archive_title' );

View File

@ -136,7 +136,6 @@ if ( function_exists( 'register_block_pattern' ) ) {
'content' => '<!-- wp:columns {"align":"wide"} --><div class="wp-block-columns alignwide"><!-- wp:column --><div class="wp-block-column"><!-- wp:paragraph --><p><a href="mailto:#">' . esc_html_x( 'example@example.com', 'Block pattern sample content', 'twentytwentyone' ) . '<br></a>' . esc_html_x( '123-456-7890', 'Block pattern sample content', 'twentytwentyone' ) . '</p><!-- /wp:paragraph --></div><!-- /wp:column --><!-- wp:column --><div class="wp-block-column"><!-- wp:paragraph {"align":"center"} --><p class="has-text-align-center">' . esc_html_x( '123 Main Street', 'Block pattern sample content', 'twentytwentyone' ) . '<br>' . esc_html_x( 'Cambridge, MA, 02139', 'Block pattern sample content', 'twentytwentyone' ) . '</p><!-- /wp:paragraph --></div><!-- /wp:column --><!-- wp:column {"verticalAlignment":"center"} --><div class="wp-block-column is-vertically-aligned-center"><!-- wp:social-links {"align":"right","className":"is-style-twentytwentyone-social-icons-color"} --><ul class="wp-block-social-links alignright is-style-twentytwentyone-social-icons-color"><!-- wp:social-link {"url":"https://wordpress.org","service":"wordpress"} /--><!-- wp:social-link {"url":"https://www.facebook.com/WordPress/","service":"facebook"} /--><!-- wp:social-link {"url":"https://twitter.com/WordPress","service":"twitter"} /--><!-- wp:social-link {"url":"https://www.youtube.com/wordpress","service":"youtube"} /--></ul><!-- /wp:social-links --></div><!-- /wp:column --></div><!-- /wp:columns -->',
)
);
}
add_action( 'init', 'twenty_twenty_one_register_block_pattern' );
}

View File

@ -26,7 +26,6 @@ if ( ! function_exists( 'twentytwentytwo_support' ) ) :
// Enqueue editor styles.
add_editor_style( 'style.css' );
}
endif;
@ -56,7 +55,6 @@ if ( ! function_exists( 'twentytwentytwo_styles' ) ) :
// Enqueue theme stylesheet.
wp_enqueue_style( 'twentytwentytwo-style' );
}
endif;

View File

@ -1100,7 +1100,6 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
)
);
}
}
/**

View File

@ -150,7 +150,6 @@ class Walker_Comment extends Walker {
unset( $children_elements[ $id ] );
}
}
/**

View File

@ -919,7 +919,6 @@ class WP_Http {
} else {
return ! in_array( $check['host'], $accessible_hosts, true ); // Inverse logic, if it's in the array, then don't block it.
}
}
/**

View File

@ -118,7 +118,6 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
/* translators: Hidden accessibility text. */
__( 'Added:' ) .
" </span>{$line}</td>";
}
/**

View File

@ -2700,7 +2700,6 @@ function wp_update_comment_count( $post_id, $do_deferred = false ) {
} elseif ( $post_id ) {
return wp_update_comment_count_now( $post_id );
}
}
/**

View File

@ -62,7 +62,6 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
'get_url' => 'get_header_image',
)
);
}
/**

View File

@ -183,7 +183,6 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
throw new Exception( "Supplied nav_menu_item value missing property: $missing" );
}
}
}
/**
@ -878,7 +877,6 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
}
}
}
}
/**

View File

@ -429,5 +429,4 @@ function wp_templating_constants() {
if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
define( 'WP_DEFAULT_THEME', 'twentytwentythree' );
}
}

View File

@ -4829,7 +4829,6 @@ function smilies_init() {
}
$wp_smiliessearch .= ')(?=' . $spaces . '|$)/m';
}
/**
@ -5609,7 +5608,6 @@ function _deprecated_constructor( $class_name, $version, $parent_class = '' ) {
}
}
}
}
/**

View File

@ -2622,7 +2622,6 @@ function the_modified_date( $format = '', $before = '', $after = '', $display =
} else {
return $the_modified_date;
}
}
/**
@ -4810,7 +4809,6 @@ function register_admin_color_schemes() {
'current' => '#fff',
)
);
}
/**

View File

@ -2718,7 +2718,6 @@ function get_posts_nav_link( $args = array() ) {
}
}
return $return;
}
/**

View File

@ -1865,7 +1865,6 @@ function wp_is_jsonp_request() {
$jsonp_enabled = apply_filters( 'rest_jsonp_enabled', true );
return $jsonp_enabled;
}
/**

View File

@ -111,7 +111,6 @@ if ( ! class_exists( 'Translation_Entry', false ) ) :
if ( $this->extracted_comments !== $other->extracted_comments ) {
$this->extracted_comments .= $other->extracted_comments;
}
}
}
endif;

View File

@ -2439,7 +2439,6 @@ function get_posts( $args = null ) {
$get_posts = new WP_Query();
return $get_posts->query( $parsed_args );
}
//
@ -3998,7 +3997,6 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
}
return $results ? $results : false;
}
/**

View File

@ -131,7 +131,6 @@ class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller {
'schema' => array( $this, 'get_public_item_schema' ),
)
);
}
/**

View File

@ -1397,7 +1397,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
* @param WP_REST_Request $request Request object.
*/
return apply_filters( "rest_pre_insert_{$this->post_type}", $prepared_post, $request );
}
/**
@ -1496,7 +1495,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
} else {
return delete_post_thumbnail( $post_id );
}
}
/**

View File

@ -128,7 +128,6 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
'schema' => array( $this, 'get_public_item_schema' ),
)
);
}
/**

View File

@ -54,7 +54,6 @@ class WP_REST_Settings_Controller extends WP_REST_Controller {
'schema' => array( $this, 'get_public_item_schema' ),
)
);
}
/**

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56547';
$wp_version = '6.4-alpha-56548';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.