mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Improve some docs for @param
. Remove an unneeded $wpdb
global import.
See #30799. Built from https://develop.svn.wordpress.org/trunk@30979 git-svn-id: http://core.svn.wordpress.org/trunk@30965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
574fabf2bc
commit
42f5acd869
@ -368,7 +368,7 @@ final class WP_Screen {
|
||||
* @since 3.3.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen.
|
||||
* @param string|WP_Screen $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen.
|
||||
* Defaults to the current $hook_suffix global.
|
||||
* @return WP_Screen Screen object.
|
||||
*/
|
||||
|
@ -550,7 +550,7 @@ class WP_User {
|
||||
*
|
||||
* @param string $field The field to query against: 'id', 'slug', 'email' or 'login'
|
||||
* @param string|int $value The field value
|
||||
* @return object Raw user object
|
||||
* @return object|false Raw user object
|
||||
*/
|
||||
public static function get_data_by( $field, $value ) {
|
||||
global $wpdb;
|
||||
|
@ -126,7 +126,8 @@ class WP_Embed {
|
||||
* @type int $height Height of the embed in pixels.
|
||||
* }
|
||||
* @param string $url The URL attempting to be embedded.
|
||||
* @return string The embed HTML on success, otherwise the original URL.
|
||||
* @return string|false The embed HTML on success, otherwise the original URL.
|
||||
* `->maybe_make_link()` can return false on failure.
|
||||
*/
|
||||
public function shortcode( $attr, $url = '' ) {
|
||||
$post = get_post();
|
||||
|
@ -190,6 +190,8 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
*
|
||||
* @param int $width
|
||||
* @param int $height
|
||||
*
|
||||
* @return true|WP_Error
|
||||
*/
|
||||
protected function update_size( $width = null, $height = null ) {
|
||||
$size = null;
|
||||
|
@ -194,6 +194,7 @@ abstract class WP_Image_Editor {
|
||||
*
|
||||
* @param int $width
|
||||
* @param int $height
|
||||
* @return true
|
||||
*/
|
||||
protected function update_size( $width = null, $height = null ) {
|
||||
$this->size = array(
|
||||
@ -388,7 +389,7 @@ abstract class WP_Image_Editor {
|
||||
* @since 3.5.0
|
||||
* @access public
|
||||
*
|
||||
* @return string suffix
|
||||
* @return false|string suffix
|
||||
*/
|
||||
public function get_suffix() {
|
||||
if ( ! $this->get_size() )
|
||||
|
@ -1146,8 +1146,6 @@ class WP_Meta_Query {
|
||||
* }
|
||||
*/
|
||||
public function get_sql( $type, $primary_table, $primary_id_column, $context = null ) {
|
||||
global $wpdb;
|
||||
|
||||
if ( ! $meta_table = _get_meta_table( $type ) ) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user