Skip to content

Commit

Permalink
Coding Standards: Remove superfluous blank lines at the end of variou…
Browse files Browse the repository at this point in the history
…s functions.

Note: This is enforced by WPCS 3.0.0.

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

Props jrf.
See #59161, #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56548 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Sep 8, 2023
1 parent d790be1 commit 1118e37
Show file tree
Hide file tree
Showing 123 changed files with 0 additions and 263 deletions.
1 change: 0 additions & 1 deletion src/wp-admin/includes/class-wp-filesystem-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ public function search_for_folder( $folder, $base = '.', $loop = false ) {
* This comes into effect when the CWD is /home/user/ but WP is at /var/www/....
*/
return $this->search_for_folder( $folder, '/', true );

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/includes/class-wp-terms-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public function __construct( $args = array() ) {
if ( empty( $post_type ) || ! in_array( $post_type, get_post_types( array( 'show_ui' => true ) ), true ) ) {
$post_type = 'post';
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

}

//
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/includes/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/includes/nav-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,6 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) {
} elseif ( is_wp_error( $menu ) ) {
return $menu;
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/includes/revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/includes/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,6 @@ function do_meta_boxes( $screen, $context, $data_object ) {
echo '</div>';

return $i;

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/includes/theme-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ function display_themes() {
}
$wp_list_table->prepare_items();
$wp_list_table->display();

}

/**
Expand Down
3 changes: 0 additions & 3 deletions src/wp-admin/includes/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)" );
}

}

/**
Expand Down Expand Up @@ -1545,7 +1544,6 @@ function upgrade_250() {
if ( $wp_current_db_version < 6689 ) {
populate_roles_250();
}

}

/**
Expand Down Expand Up @@ -1704,7 +1702,6 @@ function upgrade_300() {
)
);
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/update-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ function list_core_update( $update ) {
}

echo '</form>';

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-content/themes/twentyeleven/inc/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ public function widget( $args, $instance ) {
if ( ! is_customize_preview() ) {
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-content/themes/twentynineteen/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ function twentynineteen_widgets_init() {
'after_title' => '</h2>',
)
);

}
add_action( 'widgets_init', 'twentynineteen_widgets_init' );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public static function get_non_latin_css( $type = 'front-end' ) {

// Return the specified styles.
return twentytwenty_generate_css( implode( ',', $elements[ $type ] ), 'font-family', implode( ',', $font_family[ $locale ] ), null, null, false );

}
}
}
9 changes: 0 additions & 9 deletions src/wp-content/themes/twentytwenty/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down Expand Up @@ -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' );
Expand All @@ -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' );
Expand Down Expand Up @@ -330,7 +327,6 @@ function twentytwenty_get_custom_logo( $html ) {
}

return $html;

}

add_filter( 'get_custom_logo', 'twentytwenty_get_custom_logo' );
Expand Down Expand Up @@ -402,7 +398,6 @@ function twentytwenty_sidebar_registration() {
)
)
);

}

add_action( 'widgets_init', 'twentytwenty_sidebar_registration' );
Expand Down Expand Up @@ -448,7 +443,6 @@ function twentytwenty_classic_editor_styles() {
);

add_editor_style( $classic_editor_styles );

}

add_action( 'init', 'twentytwenty_classic_editor_styles' );
Expand Down Expand Up @@ -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' );
Expand Down Expand Up @@ -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' );
Expand Down Expand Up @@ -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' );
Expand Down
2 changes: 0 additions & 2 deletions src/wp-content/themes/twentytwenty/inc/custom-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function twentytwenty_generate_css( $selector, $style, $value, $prefix = '', $su
}

return $return;

}
}

Expand Down Expand Up @@ -190,6 +189,5 @@ function twentytwenty_get_customizer_css( $type = 'front-end' ) {

// Return the results.
return ob_get_clean();

}
}
1 change: 0 additions & 1 deletion src/wp-content/themes/twentytwenty/inc/starter-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

}
11 changes: 0 additions & 11 deletions src/wp-content/themes/twentytwenty/inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function twentytwenty_site_logo( $args = array(), $display = true ) {
}

echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped

}

/**
Expand Down Expand Up @@ -154,7 +153,6 @@ function twentytwenty_is_comment_by_post_author( $comment = null ) {
}
}
return false;

}

/**
Expand All @@ -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' );
Expand All @@ -194,7 +191,6 @@ function twentytwenty_filter_comment_reply_link( $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().

}

/**
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -523,7 +518,6 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )

}
}

}

/**
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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' );
Expand Down Expand Up @@ -762,7 +753,6 @@ function twentytwenty_body_classes( $classes ) {
}

return $classes;

}

add_filter( 'body_class', 'twentytwenty_body_classes' );
Expand Down Expand Up @@ -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' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ function twenty_twenty_one_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( '[email protected]', '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' );
}
2 changes: 0 additions & 2 deletions src/wp-content/themes/twentytwentytwo/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function twentytwentytwo_support() {

// Enqueue editor styles.
add_editor_style( 'style.css' );

}

endif;
Expand Down Expand Up @@ -56,7 +55,6 @@ function twentytwentytwo_styles() {

// Enqueue theme stylesheet.
wp_enqueue_style( 'twentytwentytwo-style' );

}

endif;
Expand Down
1 change: 0 additions & 1 deletion src/wp-includes/admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,6 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
)
);
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-includes/class-walker-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public function display_element( $element, &$children_elements, $max_depth, $dep

unset( $children_elements[ $id ] );
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-includes/class-wp-http.php
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,6 @@ public function block_request( $uri ) {
} else {
return ! in_array( $check['host'], $accessible_hosts, true ); // Inverse logic, if it's in the array, then don't block it.
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-includes/class-wp-text-diff-renderer-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ public function addedLine( $line ) {
/* translators: Hidden accessibility text. */
__( 'Added:' ) .
" </span>{$line}</td>";

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-includes/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function __construct( $manager ) {
'get_url' => 'get_header_image',
)
);

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ public function __construct( WP_Customize_Manager $manager, $id, array $args = a
throw new Exception( "Supplied nav_menu_item value missing property: $missing" );
}
}

}

/**
Expand Down Expand Up @@ -878,7 +877,6 @@ protected function update( $value ) {
}
}
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion src/wp-includes/default-constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,5 +429,4 @@ function wp_templating_constants() {
if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
define( 'WP_DEFAULT_THEME', 'twentytwentythree' );
}

}
Loading

0 comments on commit 1118e37

Please sign in to comment.