Skip to content

Docs: Improve inline docblocks for WP_Widget_Text methods #9390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
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
3 changes: 2 additions & 1 deletion src/wp-includes/ms-default-filters.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
/**

Check warning on line 1 in src/wp-includes/ms-default-filters.php

View workflow job for this annotation

GitHub Actions / Check PHP compatibility / Run compatibility checks

No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
* Sets up the default filters and actions for Multisite.
*
* If you need to remove a default hook, this file will give you the priority
Expand All @@ -7,12 +6,14 @@
*
* Not all of the Multisite default hooks are found in ms-default-filters.php
*
* @title Actions and Filters
* @package WordPress
* @subpackage Multisite
* @see default-filters.php
* @since 3.0.0
*/


add_action( 'init', 'ms_subdomain_constants' );

// Functions.
Expand Down
37 changes: 19 additions & 18 deletions src/wp-includes/widgets/class-wp-widget-text.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,25 @@
*/
protected $registered = false;

/**
* Sets up a new Text widget instance.
*
* @since 2.8.0
*/
public function __construct() {
$widget_ops = array(
'classname' => 'widget_text',
'description' => __( 'Arbitrary text.' ),
'customize_selective_refresh' => true,
'show_instance_in_rest' => true,
);
$control_ops = array(
'width' => 400,
'height' => 350,
);
parent::__construct( 'text', __( 'Text' ), $widget_ops, $control_ops );
}
/**

Check failure on line 27 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Line indented incorrectly; expected at least 1 tabs, found 0
* Sets up a new Text widget instance.
*
* @since 4.8.0
*/
public function __construct() {

Check failure on line 32 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Line indented incorrectly; expected 1 tabs, found 0
$widget_ops = array(

Check failure on line 33 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Line indented incorrectly; expected at least 2 tabs, found 1

Check failure on line 33 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Tabs must be used to indent lines; spaces are not allowed
'classname' => 'widget_text',

Check failure on line 34 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Tabs must be used to indent lines; spaces are not allowed
'description' => __( 'Arbitrary text.' ),

Check failure on line 35 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Tabs must be used to indent lines; spaces are not allowed
'customize_selective_refresh' => true,

Check failure on line 36 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Tabs must be used to indent lines; spaces are not allowed
'show_instance_in_rest' => true,

Check failure on line 37 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Tabs must be used to indent lines; spaces are not allowed
);

Check failure on line 38 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Line indented incorrectly; expected at least 2 tabs, found 1

Check failure on line 38 in src/wp-includes/widgets/class-wp-widget-text.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Tabs must be used to indent lines; spaces are not allowed
$control_ops = array(
'width' => 400,
'height' => 350,
);
parent::__construct( 'text', __( 'Text' ), $widget_ops, $control_ops );
}


/**
* Adds hooks for enqueueing assets when registering all widget instances of this widget class.
Expand Down
Loading