Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/wp-admin/includes/class-wp-posts-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ public function display_rows( $posts = array(), $level = 0 ) {
* @param array $posts
* @param int $level
*/
private function _display_rows( $posts, $level = 0 ) {
private function _display_rows( $posts, $level = 0 ): void {
$post_type = $this->screen->post_type;

// Create array of post IDs.
Expand All @@ -846,7 +846,7 @@ private function _display_rows( $posts, $level = 0 ) {
* @param int $pagenum
* @param int $per_page
*/
private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ): void {
global $wpdb;

$level = 0;
Expand Down Expand Up @@ -956,7 +956,7 @@ private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 2
* @param int $per_page
* @param array $to_display List of pages to be displayed. Passed by reference.
*/
private function _page_rows( &$children_pages, &$count, $parent_page, $level, $pagenum, $per_page, &$to_display ) {
private function _page_rows( &$children_pages, &$count, $parent_page, $level, $pagenum, $per_page, &$to_display ): void {
if ( ! isset( $children_pages[ $parent_page ] ) ) {
return;
}
Expand Down
40 changes: 20 additions & 20 deletions src/wp-admin/includes/class-wp-screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public static function get( $hook_name = '' ) {
* @global string $typenow The post type of the current screen.
* @global string $taxnow The taxonomy of the current screen.
*/
public function set_current_screen() {
public function set_current_screen(): void {
global $current_screen, $taxnow, $typenow;

$current_screen = $this;
Expand Down Expand Up @@ -474,7 +474,7 @@ public function is_block_editor( $set = null ) {
* @param WP_Screen $screen A screen object.
* @param string $help Help text.
*/
public static function add_old_compat_help( $screen, $help ) {
public static function add_old_compat_help( $screen, $help ): void {
self::$_old_compat_help[ $screen->id ] = $help;
}

Expand All @@ -487,7 +487,7 @@ public static function add_old_compat_help( $screen, $help ) {
*
* @param string $parent_file The parent file of the screen. Typically the $parent_file global.
*/
public function set_parentage( $parent_file ) {
public function set_parentage( $parent_file ): void {
$this->parent_file = $parent_file;
list( $this->parent_base ) = explode( '?', $parent_file );
$this->parent_base = str_replace( '.php', '', $this->parent_base );
Expand All @@ -504,7 +504,7 @@ public function set_parentage( $parent_file ) {
* @param string $option Option ID.
* @param mixed $args Option-dependent arguments.
*/
public function add_option( $option, $args = array() ) {
public function add_option( $option, $args = array() ): void {
$this->_options[ $option ] = $args;
}

Expand All @@ -515,7 +515,7 @@ public function add_option( $option, $args = array() ) {
*
* @param string $option Option ID.
*/
public function remove_option( $option ) {
public function remove_option( $option ): void {
unset( $this->_options[ $option ] );
}

Expand All @@ -524,7 +524,7 @@ public function remove_option( $option ) {
*
* @since 3.8.0
*/
public function remove_options() {
public function remove_options(): void {
$this->_options = array();
}

Expand Down Expand Up @@ -630,7 +630,7 @@ public function get_help_tab( $id ) {
* @type int $priority Optional. The priority of the tab, used for ordering. Default 10.
* }
*/
public function add_help_tab( $args ) {
public function add_help_tab( $args ): void {
$defaults = array(
'title' => false,
'id' => false,
Expand Down Expand Up @@ -658,7 +658,7 @@ public function add_help_tab( $args ) {
*
* @param string $id The help tab ID.
*/
public function remove_help_tab( $id ) {
public function remove_help_tab( $id ): void {
unset( $this->_help_tabs[ $id ] );
}

Expand All @@ -667,7 +667,7 @@ public function remove_help_tab( $id ) {
*
* @since 3.3.0
*/
public function remove_help_tabs() {
public function remove_help_tabs(): void {
$this->_help_tabs = array();
}

Expand All @@ -692,7 +692,7 @@ public function get_help_sidebar() {
*
* @param string $content Sidebar content in plain text or HTML.
*/
public function set_help_sidebar( $content ) {
public function set_help_sidebar( $content ): void {
$this->_help_sidebar = $content;
}

Expand Down Expand Up @@ -757,7 +757,7 @@ public function get_screen_reader_text( $key ) {
* Default 'Items list'.
* }
*/
public function set_screen_reader_content( $content = array() ) {
public function set_screen_reader_content( $content = array() ): void {
$defaults = array(
'heading_views' => __( 'Filter items list' ),
'heading_pagination' => __( 'Items list navigation' ),
Expand All @@ -773,7 +773,7 @@ public function set_screen_reader_content( $content = array() ) {
*
* @since 4.4.0
*/
public function remove_screen_reader_content() {
public function remove_screen_reader_content(): void {
$this->_screen_reader_content = array();
}

Expand All @@ -786,7 +786,7 @@ public function remove_screen_reader_content() {
*
* @global string $screen_layout_columns
*/
public function render_screen_meta() {
public function render_screen_meta(): void {

/**
* Filters the legacy contextual help list.
Expand Down Expand Up @@ -1048,7 +1048,7 @@ public function show_screen_options() {
* @type bool $wrap Whether the screen-options-wrap div will be included. Defaults to true.
* }
*/
public function render_screen_options( $options = array() ) {
public function render_screen_options( $options = array() ): void {
$options = wp_parse_args(
$options,
array(
Expand Down Expand Up @@ -1107,7 +1107,7 @@ public function render_screen_options( $options = array() ) {
*
* @global array $wp_meta_boxes Global meta box state.
*/
public function render_meta_boxes_preferences() {
public function render_meta_boxes_preferences(): void {
global $wp_meta_boxes;

if ( ! isset( $wp_meta_boxes[ $this->id ] ) ) {
Expand Down Expand Up @@ -1150,7 +1150,7 @@ public function render_meta_boxes_preferences() {
*
* @since 4.4.0
*/
public function render_list_table_columns_preferences() {
public function render_list_table_columns_preferences(): void {

$columns = get_column_headers( $this );
$hidden = get_hidden_columns( $this );
Expand Down Expand Up @@ -1198,7 +1198,7 @@ public function render_list_table_columns_preferences() {
*
* @since 3.3.0
*/
public function render_screen_layout() {
public function render_screen_layout(): void {
if ( ! $this->get_option( 'layout_columns' ) ) {
return;
}
Expand Down Expand Up @@ -1230,7 +1230,7 @@ public function render_screen_layout() {
*
* @since 3.3.0
*/
public function render_per_page_options() {
public function render_per_page_options(): void {
if ( null === $this->get_option( 'per_page' ) ) {
return;
}
Expand Down Expand Up @@ -1296,7 +1296,7 @@ public function render_per_page_options() {
*
* @global string $mode List table view mode.
*/
public function render_view_mode() {
public function render_view_mode(): void {
global $mode;

$screen = get_current_screen();
Expand Down Expand Up @@ -1351,7 +1351,7 @@ public function render_view_mode() {
* @param string $key The screen reader text array named key.
* @param string $tag Optional. The HTML tag to wrap the screen reader text. Default h2.
*/
public function render_screen_reader_content( $key = '', $tag = 'h2' ) {
public function render_screen_reader_content( $key = '', $tag = 'h2' ): void {

if ( ! isset( $this->_screen_reader_content[ $key ] ) ) {
return;
Expand Down
20 changes: 10 additions & 10 deletions src/wp-signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @since MU (3.0.0)
*/
function do_signup_header() {
function do_signup_header(): void {
/**
* Fires within the head section of the site sign-up screen.
*
Expand Down Expand Up @@ -61,7 +61,7 @@ function do_signup_header() {
*
* @since MU (3.0.0)
*/
function wpmu_signup_stylesheet() {
function wpmu_signup_stylesheet(): void {
?>
<style>
.mu_register { width: 90%; margin: 0 auto; text-align: start; padding: 24px; box-sizing: border-box; }
Expand Down Expand Up @@ -117,7 +117,7 @@ function wpmu_signup_stylesheet() {
* @param string $blog_title The new site title.
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string.
*/
function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ): void {
if ( ! is_wp_error( $errors ) ) {
$errors = new WP_Error();
}
Expand Down Expand Up @@ -272,7 +272,7 @@ function validate_blog_form() {
* @param string $user_email The entered email address.
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string.
*/
function show_user_form( $user_name = '', $user_email = '', $errors = '' ) {
function show_user_form( $user_name = '', $user_email = '', $errors = '' ): void {
if ( ! is_wp_error( $errors ) ) {
$errors = new WP_Error();
}
Expand Down Expand Up @@ -339,7 +339,7 @@ function validate_user_form() {
* @param string $blog_title The new site title.
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string.
*/
function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ): void {
$current_user = wp_get_current_user();

if ( ! is_wp_error( $errors ) ) {
Expand Down Expand Up @@ -530,7 +530,7 @@ function validate_another_blog_signup() {
* @param array $meta Any additional meta from the {@see 'add_signup_meta'} filter in validate_blog_signup().
* @param int $blog_id The site ID.
*/
function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = array(), $blog_id = 0 ) {
function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = array(), $blog_id = 0 ): void {

if ( $blog_id ) {
switch_to_blog( $blog_id );
Expand Down Expand Up @@ -591,7 +591,7 @@ function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $
* @param string $user_email The user's email.
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string.
*/
function signup_user( $user_name = '', $user_email = '', $errors = '' ) {
function signup_user( $user_name = '', $user_email = '', $errors = '' ): void {
global $active_signup;

if ( ! is_wp_error( $errors ) ) {
Expand Down Expand Up @@ -703,7 +703,7 @@ function validate_user_signup() {
* @param string $user_name The username.
* @param string $user_email The user's email address.
*/
function confirm_user_signup( $user_name, $user_email ) {
function confirm_user_signup( $user_name, $user_email ): void {
?>
<h2>
<?php
Expand Down Expand Up @@ -735,7 +735,7 @@ function confirm_user_signup( $user_name, $user_email ) {
* @param string $blog_title The site title.
* @param WP_Error|string $errors A WP_Error object containing existing errors. Defaults to empty string.
*/
function signup_blog( $user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '' ) {
function signup_blog( $user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '' ): void {
if ( ! is_wp_error( $errors ) ) {
$errors = new WP_Error();
}
Expand Down Expand Up @@ -860,7 +860,7 @@ function validate_blog_signup() {
* @param string $user_email The user's email address.
* @param array $meta Any additional meta from the {@see 'add_signup_meta'} filter in validate_blog_signup().
*/
function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ) {
function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ): void {
?>
<h2>
<?php
Expand Down
Loading