Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4d44c562e4
commit
5a20c05d27
|
@ -19,7 +19,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* constructor
|
* constructor
|
||||||
*
|
*
|
||||||
* @param $arg mixed ingored argument
|
* @param mixed $arg ingored argument
|
||||||
*/
|
*/
|
||||||
function WP_Filesystem_Direct($arg) {
|
function WP_Filesystem_Direct($arg) {
|
||||||
$this->method = 'direct';
|
$this->method = 'direct';
|
||||||
|
@ -36,7 +36,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* Reads entire file into a string
|
* Reads entire file into a string
|
||||||
*
|
*
|
||||||
* @param $file string Name of the file to read.
|
* @param string $file Name of the file to read.
|
||||||
* @return string|bool The function returns the read data or false on failure.
|
* @return string|bool The function returns the read data or false on failure.
|
||||||
*/
|
*/
|
||||||
function get_contents($file) {
|
function get_contents($file) {
|
||||||
|
@ -45,7 +45,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* Reads entire file into an array
|
* Reads entire file into an array
|
||||||
*
|
*
|
||||||
* @param $file string Path to the file.
|
* @param string $file Path to the file.
|
||||||
* @return array|bool the file contents in an array or false on failure.
|
* @return array|bool the file contents in an array or false on failure.
|
||||||
*/
|
*/
|
||||||
function get_contents_array($file) {
|
function get_contents_array($file) {
|
||||||
|
@ -54,9 +54,9 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* Write a string to a file
|
* Write a string to a file
|
||||||
*
|
*
|
||||||
* @param $file string Remote path to the file where to write the data.
|
* @param string $file Remote path to the file where to write the data.
|
||||||
* @param $contents string The data to write.
|
* @param string $contents The data to write.
|
||||||
* @param $mode int (optional) The file permissions as octal number, usually 0644.
|
* @param int $mode (optional) The file permissions as octal number, usually 0644.
|
||||||
* @return bool False upon failure.
|
* @return bool False upon failure.
|
||||||
*/
|
*/
|
||||||
function put_contents($file, $contents, $mode = false ) {
|
function put_contents($file, $contents, $mode = false ) {
|
||||||
|
@ -78,7 +78,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* Change directory
|
* Change directory
|
||||||
*
|
*
|
||||||
* @param $dir string The new current directory.
|
* @param string $dir The new current directory.
|
||||||
* @return bool Returns true on success or false on failure.
|
* @return bool Returns true on success or false on failure.
|
||||||
*/
|
*/
|
||||||
function chdir($dir) {
|
function chdir($dir) {
|
||||||
|
@ -87,9 +87,9 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* Changes file group
|
* Changes file group
|
||||||
*
|
*
|
||||||
* @param $file string Path to the file.
|
* @param string $file Path to the file.
|
||||||
* @param $group mixed A group name or number.
|
* @param mixed $group A group name or number.
|
||||||
* @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False.
|
* @param bool $recursive (optional) If set True changes file group recursivly. Defaults to False.
|
||||||
* @return bool Returns true on success or false on failure.
|
* @return bool Returns true on success or false on failure.
|
||||||
*/
|
*/
|
||||||
function chgrp($file, $group, $recursive = false) {
|
function chgrp($file, $group, $recursive = false) {
|
||||||
|
@ -110,9 +110,9 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* Changes filesystem permissions
|
* Changes filesystem permissions
|
||||||
*
|
*
|
||||||
* @param $file string Path to the file.
|
* @param string $file Path to the file.
|
||||||
* @param $mode int (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs.
|
* @param int $mode (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs.
|
||||||
* @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False.
|
* @param bool $recursive (optional) If set True changes file group recursivly. Defaults to False.
|
||||||
* @return bool Returns true on success or false on failure.
|
* @return bool Returns true on success or false on failure.
|
||||||
*/
|
*/
|
||||||
function chmod($file, $mode = false, $recursive = false) {
|
function chmod($file, $mode = false, $recursive = false) {
|
||||||
|
@ -138,9 +138,9 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* Changes file owner
|
* Changes file owner
|
||||||
*
|
*
|
||||||
* @param $file string Path to the file.
|
* @param string $file Path to the file.
|
||||||
* @param $owner mixed A user name or number.
|
* @param mixed $owner A user name or number.
|
||||||
* @param $recursive bool (optional) If set True changes file owner recursivly. Defaults to False.
|
* @param bool $recursive (optional) If set True changes file owner recursivly. Defaults to False.
|
||||||
* @return bool Returns true on success or false on failure.
|
* @return bool Returns true on success or false on failure.
|
||||||
*/
|
*/
|
||||||
function chown($file, $owner, $recursive = false) {
|
function chown($file, $owner, $recursive = false) {
|
||||||
|
@ -160,7 +160,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
/**
|
/**
|
||||||
* Gets file owner
|
* Gets file owner
|
||||||
*
|
*
|
||||||
* @param $file string Path to the file.
|
* @param string $file Path to the file.
|
||||||
* @return string Username of the user.
|
* @return string Username of the user.
|
||||||
*/
|
*/
|
||||||
function owner($file) {
|
function owner($file) {
|
||||||
|
@ -177,7 +177,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||||
*
|
*
|
||||||
* FIXME does not handle errors in fileperms()
|
* FIXME does not handle errors in fileperms()
|
||||||
*
|
*
|
||||||
* @param $file string Path to the file.
|
* @param string $file Path to the file.
|
||||||
* @return string Mode of the file (last 4 digits).
|
* @return string Mode of the file (last 4 digits).
|
||||||
*/
|
*/
|
||||||
function getchmod($file) {
|
function getchmod($file) {
|
||||||
|
|
|
@ -835,7 +835,7 @@ function image_align_input_fields( $post, $checked = '' ) {
|
||||||
* @since unknown
|
* @since unknown
|
||||||
*
|
*
|
||||||
* @param unknown_type $post
|
* @param unknown_type $post
|
||||||
* @param unknown_type $checked
|
* @param unknown_type $check
|
||||||
* @return unknown
|
* @return unknown
|
||||||
*/
|
*/
|
||||||
function image_size_input_fields( $post, $check = '' ) {
|
function image_size_input_fields( $post, $check = '' ) {
|
||||||
|
|
|
@ -433,8 +433,8 @@ function post_comment_status_meta_box($post) {
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param $result table header rows
|
* @param array $result table header rows
|
||||||
* @return
|
* @return array
|
||||||
*/
|
*/
|
||||||
function post_comment_meta_box_thead($result) {
|
function post_comment_meta_box_thead($result) {
|
||||||
unset($result['cb'], $result['response']);
|
unset($result['cb'], $result['response']);
|
||||||
|
|
|
@ -712,7 +712,7 @@ add_action( 'admin_notices', 'ms_deprecated_blogs_file' );
|
||||||
* Grants super admin privileges.
|
* Grants super admin privileges.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @param $user_id
|
* @param int $user_id
|
||||||
*/
|
*/
|
||||||
function grant_super_admin( $user_id ) {
|
function grant_super_admin( $user_id ) {
|
||||||
global $super_admins;
|
global $super_admins;
|
||||||
|
@ -740,7 +740,7 @@ function grant_super_admin( $user_id ) {
|
||||||
* Revokes super admin privileges.
|
* Revokes super admin privileges.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @param $user_id
|
* @param int $user_id
|
||||||
*/
|
*/
|
||||||
function revoke_super_admin( $user_id ) {
|
function revoke_super_admin( $user_id ) {
|
||||||
global $super_admins;
|
global $super_admins;
|
||||||
|
|
|
@ -428,8 +428,8 @@ function is_plugin_active_for_network( $plugin ) {
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param $file Plugin to check
|
* @param string $plugin Plugin to check
|
||||||
* $return bool True if plugin is network only, false otherwise.
|
* @return bool True if plugin is network only, false otherwise.
|
||||||
*/
|
*/
|
||||||
function is_network_only_plugin( $plugin ) {
|
function is_network_only_plugin( $plugin ) {
|
||||||
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
|
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* @since 2.6.0
|
* @since 2.6.0
|
||||||
*
|
*
|
||||||
* @param bool $update Are we updating a pre-existing post?
|
* @param bool $update Are we updating a pre-existing post?
|
||||||
* @param post_data array Array of post data. Defaults to the contents of $_POST.
|
* @param array $post_data Array of post data. Defaults to the contents of $_POST.
|
||||||
* @return object|bool WP_Error on failure, true on success.
|
* @return object|bool WP_Error on failure, true on success.
|
||||||
*/
|
*/
|
||||||
function _wp_translate_postdata( $update = false, $post_data = null ) {
|
function _wp_translate_postdata( $update = false, $post_data = null ) {
|
||||||
|
@ -353,7 +353,7 @@ function bulk_edit_posts( $post_data = null ) {
|
||||||
*
|
*
|
||||||
* @since unknown
|
* @since unknown
|
||||||
*
|
*
|
||||||
*@param string A post type string, defaults to 'post'.
|
* @param string $post_type A post type string, defaults to 'post'.
|
||||||
* @return object stdClass object containing all the default post data as attributes
|
* @return object stdClass object containing all the default post data as attributes
|
||||||
*/
|
*/
|
||||||
function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) {
|
function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) {
|
||||||
|
|
|
@ -712,14 +712,11 @@ function the_attachment_links( $id = false ) {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print out <option> html elements for role selectors based on $wp_roles
|
* Print out <option> html elements for role selectors
|
||||||
*
|
*
|
||||||
* @package WordPress
|
|
||||||
* @subpackage Administration
|
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
*
|
*
|
||||||
* @uses $wp_roles
|
* @param string $selected slug for the role that should be already selected
|
||||||
* @param string $default slug for the role that should be already selected
|
|
||||||
*/
|
*/
|
||||||
function wp_dropdown_roles( $selected = false ) {
|
function wp_dropdown_roles( $selected = false ) {
|
||||||
$p = '';
|
$p = '';
|
||||||
|
@ -729,7 +726,7 @@ function wp_dropdown_roles( $selected = false ) {
|
||||||
|
|
||||||
foreach ( $editable_roles as $role => $details ) {
|
foreach ( $editable_roles as $role => $details ) {
|
||||||
$name = translate_user_role($details['name'] );
|
$name = translate_user_role($details['name'] );
|
||||||
if ( $selected == $role ) // Make default first in list
|
if ( $selected == $role ) // preselect specified role
|
||||||
$p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>";
|
$p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>";
|
||||||
else
|
else
|
||||||
$r .= "\n\t<option value='" . esc_attr($role) . "'>$name</option>";
|
$r .= "\n\t<option value='" . esc_attr($role) . "'>$name</option>";
|
||||||
|
@ -1268,9 +1265,8 @@ function get_settings_errors( $setting = '', $sanitize = FALSE ) {
|
||||||
* @param string $setting Optional slug title of a specific setting who's errors you want.
|
* @param string $setting Optional slug title of a specific setting who's errors you want.
|
||||||
* @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
|
* @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
|
||||||
* @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
|
* @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
|
||||||
* @return <type>
|
|
||||||
*/
|
*/
|
||||||
function settings_errors ( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) {
|
function settings_errors( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) {
|
||||||
|
|
||||||
if ($hide_on_update AND $_GET['updated']) return;
|
if ($hide_on_update AND $_GET['updated']) return;
|
||||||
|
|
||||||
|
@ -1493,10 +1489,10 @@ function favorite_actions( $screen = null ) {
|
||||||
* returned.
|
* returned.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
* @param int $id The post id. If not supplied the global $post is used.
|
* @param int $post_id The post id. If not supplied the global $post is used.
|
||||||
*
|
* @return string The post title if set
|
||||||
*/
|
*/
|
||||||
function _draft_or_post_title($post_id = 0) {
|
function _draft_or_post_title( $post_id = 0 ) {
|
||||||
$title = get_the_title($post_id);
|
$title = get_the_title($post_id);
|
||||||
if ( empty($title) )
|
if ( empty($title) )
|
||||||
$title = __('(no title)');
|
$title = __('(no title)');
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve Bookmark data based on ID
|
* Retrieve Bookmark data
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @uses $wpdb Database Object
|
* @uses $wpdb Database Object
|
||||||
*
|
*
|
||||||
* @param int $bookmark_id
|
* @param mixed $bookmark
|
||||||
* @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
|
* @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
|
||||||
* @param string $filter Optional, default is 'raw'.
|
* @param string $filter Optional, default is 'raw'.
|
||||||
* @return array|object Type returned depends on $output value.
|
* @return array|object Type returned depends on $output value.
|
||||||
|
|
|
@ -110,7 +110,7 @@ function wp_cache_init() {
|
||||||
* @uses $wp_object_cache Object Cache Class
|
* @uses $wp_object_cache Object Cache Class
|
||||||
* @see WP_Object_Cache::replace()
|
* @see WP_Object_Cache::replace()
|
||||||
*
|
*
|
||||||
* @param int|string $id What to call the contents in the cache
|
* @param int|string $key What to call the contents in the cache
|
||||||
* @param mixed $data The contents to store in the cache
|
* @param mixed $data The contents to store in the cache
|
||||||
* @param string $flag Where to group the cache contents
|
* @param string $flag Where to group the cache contents
|
||||||
* @param int $expire When to expire the cache contents
|
* @param int $expire When to expire the cache contents
|
||||||
|
@ -129,7 +129,7 @@ function wp_cache_replace($key, $data, $flag = '', $expire = 0) {
|
||||||
* @uses $wp_object_cache Object Cache Class
|
* @uses $wp_object_cache Object Cache Class
|
||||||
* @see WP_Object_Cache::set()
|
* @see WP_Object_Cache::set()
|
||||||
*
|
*
|
||||||
* @param int|string $id What to call the contents in the cache
|
* @param int|string $key What to call the contents in the cache
|
||||||
* @param mixed $data The contents to store in the cache
|
* @param mixed $data The contents to store in the cache
|
||||||
* @param string $flag Where to group the cache contents
|
* @param string $flag Where to group the cache contents
|
||||||
* @param int $expire When to expire the cache contents
|
* @param int $expire When to expire the cache contents
|
||||||
|
|
|
@ -250,8 +250,8 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
|
||||||
*
|
*
|
||||||
* @uses is_object_in_term()
|
* @uses is_object_in_term()
|
||||||
*
|
*
|
||||||
* @param int|string|array $category. Category ID, name or slug, or array of said.
|
* @param int|string|array $category Category ID, name or slug, or array of said.
|
||||||
* @param int|post object Optional. Post to check instead of the current post. @since 2.7.0
|
* @param int|object $_post Optional. Post to check instead of the current post. (since 2.7.0)
|
||||||
* @return bool True if the current post is in any of the given categories.
|
* @return bool True if the current post is in any of the given categories.
|
||||||
*/
|
*/
|
||||||
function in_category( $category, $_post = null ) {
|
function in_category( $category, $_post = null ) {
|
||||||
|
@ -987,7 +987,7 @@ function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) {
|
||||||
* @uses is_object_in_term()
|
* @uses is_object_in_term()
|
||||||
*
|
*
|
||||||
* @param string|int|array $tag Optional. The tag name/term_id/slug or array of them to check for.
|
* @param string|int|array $tag Optional. The tag name/term_id/slug or array of them to check for.
|
||||||
* @param int|post object Optional. Post to check instead of the current post. @since 2.7.0
|
* @param int|object $_post Optional. Post to check instead of the current post. (since 2.7.0)
|
||||||
* @return bool True if the current post has any of the the given tags (or any tag, if no tag specified).
|
* @return bool True if the current post has any of the the given tags (or any tag, if no tag specified).
|
||||||
*/
|
*/
|
||||||
function has_tag( $tag = '', $_post = null ) {
|
function has_tag( $tag = '', $_post = null ) {
|
||||||
|
|
|
@ -980,8 +980,8 @@ class Walker {
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @since 2.7
|
* @since 2.7
|
||||||
* @param $max_depth = 0 means display all levels; $max_depth > 0 specifies the number of display levels.
|
* @param int $max_depth = 0 means display all levels; $max_depth > 0 specifies the number of display levels.
|
||||||
* @param $page_num the specific page number, beginning with 1.
|
* @param int $page_num the specific page number, beginning with 1.
|
||||||
* @return XHTML of the specified page of elements
|
* @return XHTML of the specified page of elements
|
||||||
*/
|
*/
|
||||||
function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
|
function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
|
||||||
|
|
|
@ -162,7 +162,7 @@ function get_comment_author_link( $comment_ID = 0 ) {
|
||||||
* @since 0.71
|
* @since 0.71
|
||||||
* @see get_comment_author_link() Echoes result
|
* @see get_comment_author_link() Echoes result
|
||||||
*
|
*
|
||||||
* @param int The ID of the comment for which to print the author's link. Optional.
|
* @param int $comment_ID The ID of the comment for which to print the author's link. Optional.
|
||||||
*/
|
*/
|
||||||
function comment_author_link( $comment_ID = 0 ) {
|
function comment_author_link( $comment_ID = 0 ) {
|
||||||
echo get_comment_author_link( $comment_ID );
|
echo get_comment_author_link( $comment_ID );
|
||||||
|
|
|
@ -439,8 +439,8 @@ function get_comment_count( $post_id = 0 ) {
|
||||||
* @link http://codex.wordpress.org/Function_Reference/add_comment_meta
|
* @link http://codex.wordpress.org/Function_Reference/add_comment_meta
|
||||||
*
|
*
|
||||||
* @param int $comment_id Comment ID.
|
* @param int $comment_id Comment ID.
|
||||||
* @param string $key Metadata name.
|
* @param string $meta_key Metadata name.
|
||||||
* @param mixed $value Metadata value.
|
* @param mixed $meta_value Metadata value.
|
||||||
* @param bool $unique Optional, default is false. Whether the same key should not be added.
|
* @param bool $unique Optional, default is false. Whether the same key should not be added.
|
||||||
* @return bool False for failure. True for success.
|
* @return bool False for failure. True for success.
|
||||||
*/
|
*/
|
||||||
|
@ -498,8 +498,8 @@ function get_comment_meta($comment_id, $key, $single = false) {
|
||||||
* @link http://codex.wordpress.org/Function_Reference/update_comment_meta
|
* @link http://codex.wordpress.org/Function_Reference/update_comment_meta
|
||||||
*
|
*
|
||||||
* @param int $comment_id Comment ID.
|
* @param int $comment_id Comment ID.
|
||||||
* @param string $key Metadata key.
|
* @param string $meta_key Metadata key.
|
||||||
* @param mixed $value Metadata value.
|
* @param mixed $meta_value Metadata value.
|
||||||
* @param mixed $prev_value Optional. Previous value to check before removing.
|
* @param mixed $prev_value Optional. Previous value to check before removing.
|
||||||
* @return bool False on failure, true if success.
|
* @return bool False on failure, true if success.
|
||||||
*/
|
*/
|
||||||
|
@ -1858,7 +1858,7 @@ function weblog_ping($server = '', $path = '') {
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Cache
|
* @subpackage Cache
|
||||||
*
|
*
|
||||||
* @param int|array $id Comment ID or array of comment IDs to remove from cache
|
* @param int|array $ids Comment ID or array of comment IDs to remove from cache
|
||||||
*/
|
*/
|
||||||
function clean_comment_cache($ids) {
|
function clean_comment_cache($ids) {
|
||||||
foreach ( (array) $ids as $id )
|
foreach ( (array) $ids as $id )
|
||||||
|
|
|
@ -164,10 +164,10 @@ function previous_post($format='%', $previous='previous post: ', $title='yes', $
|
||||||
* @see next_post_link()
|
* @see next_post_link()
|
||||||
*
|
*
|
||||||
* @param string $format
|
* @param string $format
|
||||||
* @param string $previous
|
* @param string $next
|
||||||
* @param string $title
|
* @param string $title
|
||||||
* @param string $in_same_cat
|
* @param string $in_same_cat
|
||||||
* @param int $limitprev
|
* @param int $limitnext
|
||||||
* @param string $excluded_categories
|
* @param string $excluded_categories
|
||||||
*/
|
*/
|
||||||
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
|
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
|
||||||
|
@ -872,7 +872,7 @@ function permalink_link() {
|
||||||
* @deprecated Use the_permalink_rss()
|
* @deprecated Use the_permalink_rss()
|
||||||
* @see the_permalink_rss()
|
* @see the_permalink_rss()
|
||||||
*
|
*
|
||||||
* @param string $file
|
* @param string $deprecated
|
||||||
*/
|
*/
|
||||||
function permalink_single_rss($deprecated = '') {
|
function permalink_single_rss($deprecated = '') {
|
||||||
_deprecated_function( __FUNCTION__, '2.3', 'the_permalink_rss()' );
|
_deprecated_function( __FUNCTION__, '2.3', 'the_permalink_rss()' );
|
||||||
|
|
|
@ -1474,7 +1474,7 @@ function convert_smilies($text) {
|
||||||
* @since 0.71
|
* @since 0.71
|
||||||
*
|
*
|
||||||
* @param string $email Email address to verify.
|
* @param string $email Email address to verify.
|
||||||
* @param boolean $deprecated. Deprecated.
|
* @param boolean $deprecated Deprecated.
|
||||||
* @return string|bool Either false or the valid email address.
|
* @return string|bool Either false or the valid email address.
|
||||||
*/
|
*/
|
||||||
function is_email( $email, $deprecated = false ) {
|
function is_email( $email, $deprecated = false ) {
|
||||||
|
|
|
@ -4177,7 +4177,7 @@ function wp_scheduled_delete() {
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
* @param string $file Path to the file
|
* @param string $file Path to the file
|
||||||
* @param bool $markup If the returned data should have HTML markup applied
|
* @param array $default_headers Default metadata headers
|
||||||
* @param string $context If specified adds filter hook "extra_<$context>_headers"
|
* @param string $context If specified adds filter hook "extra_<$context>_headers"
|
||||||
*/
|
*/
|
||||||
function get_file_data( $file, $default_headers, $context = '' ) {
|
function get_file_data( $file, $default_headers, $context = '' ) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ function wp_print_scripts( $handles = false ) {
|
||||||
* @param string $src Script url
|
* @param string $src Script url
|
||||||
* @param array $deps (optional) Array of script names on which this script depends
|
* @param array $deps (optional) Array of script names on which this script depends
|
||||||
* @param string|bool $ver (optional) Script version (used for cache busting), set to NULL to disable
|
* @param string|bool $ver (optional) Script version (used for cache busting), set to NULL to disable
|
||||||
* @param bool (optional) Wether to enqueue the script before </head> or before </body>
|
* @param bool $in_footer (optional) Whether to enqueue the script before </head> or before </body>
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
|
function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
|
||||||
|
|
|
@ -2037,7 +2037,7 @@ function paginate_links( $args = '' ) {
|
||||||
* @param string $key The unique key for this theme.
|
* @param string $key The unique key for this theme.
|
||||||
* @param string $name The name of the theme.
|
* @param string $name The name of the theme.
|
||||||
* @param string $url The url of the css file containing the colour scheme.
|
* @param string $url The url of the css file containing the colour scheme.
|
||||||
* @param array @colors Optional An array of CSS color definitions which are used to give the user a feel for the theme.
|
* @param array $colors Optional An array of CSS color definitions which are used to give the user a feel for the theme.
|
||||||
*/
|
*/
|
||||||
function wp_admin_css_color($key, $name, $url, $colors = array()) {
|
function wp_admin_css_color($key, $name, $url, $colors = array()) {
|
||||||
global $_wp_admin_css_colors;
|
global $_wp_admin_css_colors;
|
||||||
|
@ -2246,7 +2246,7 @@ function checked( $checked, $current = true, $echo = true ) {
|
||||||
*
|
*
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*
|
*
|
||||||
* @param mixed selected One of the values to compare
|
* @param mixed $selected One of the values to compare
|
||||||
* @param mixed $current (true) The other value to compare if not just true
|
* @param mixed $current (true) The other value to compare if not just true
|
||||||
* @param bool $echo Whether to echo or just return the string
|
* @param bool $echo Whether to echo or just return the string
|
||||||
* @return string html attribute or empty string
|
* @return string html attribute or empty string
|
||||||
|
|
|
@ -270,8 +270,8 @@ function _nx($single, $plural, $number, $context, $domain = 'default') {
|
||||||
* $usable_text = sprintf(_n($message[0], $message[1], $count), $count);
|
* $usable_text = sprintf(_n($message[0], $message[1], $count), $count);
|
||||||
*
|
*
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
* @param $single Single form to be i18ned
|
* @param string $single Single form to be i18ned
|
||||||
* @param $plural Plural form to be i18ned
|
* @param string $plural Plural form to be i18ned
|
||||||
* @return array array($single, $plural)
|
* @return array array($single, $plural)
|
||||||
*/
|
*/
|
||||||
function _n_noop( $single, $plural ) {
|
function _n_noop( $single, $plural ) {
|
||||||
|
|
|
@ -27,8 +27,8 @@ function the_permalink() {
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
* @uses $wp_rewrite
|
* @uses $wp_rewrite
|
||||||
*
|
*
|
||||||
* @param $string String a URL with or without a trailing slash.
|
* @param string $string URL with or without a trailing slash.
|
||||||
* @param $type_of_url String the type of URL being considered (e.g. single, category, etc) for use in the filter.
|
* @param string $type_of_url The type of URL being considered (e.g. single, category, etc) for use in the filter.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function user_trailingslashit($string, $type_of_url = '') {
|
function user_trailingslashit($string, $type_of_url = '') {
|
||||||
|
@ -1154,7 +1154,7 @@ function prev_post_rel_link($title = '%title', $in_same_cat = false, $excluded_c
|
||||||
*
|
*
|
||||||
* @param bool $in_same_cat Optional. Whether returned post should be in same category.
|
* @param bool $in_same_cat Optional. Whether returned post should be in same category.
|
||||||
* @param string $excluded_categories Optional. Excluded categories IDs.
|
* @param string $excluded_categories Optional. Excluded categories IDs.
|
||||||
* @param bool $previous Optional. Whether to retrieve first post.
|
* @param bool $start Optional. Whether to retrieve first or last post.
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
function get_boundary_post($in_same_cat = false, $excluded_categories = '', $start = true) {
|
function get_boundary_post($in_same_cat = false, $excluded_categories = '', $start = true) {
|
||||||
|
@ -1200,7 +1200,7 @@ function get_boundary_post($in_same_cat = false, $excluded_categories = '', $sta
|
||||||
* @param string $title Optional. Link title format.
|
* @param string $title Optional. Link title format.
|
||||||
* @param bool $in_same_cat Optional. Whether link should be in same category.
|
* @param bool $in_same_cat Optional. Whether link should be in same category.
|
||||||
* @param string $excluded_categories Optional. Excluded categories IDs.
|
* @param string $excluded_categories Optional. Excluded categories IDs.
|
||||||
* @param bool $start Optional, default is true. Whether display link to first post.
|
* @param bool $start Optional, default is true. Whether display link to first or last post.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
|
function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
|
||||||
|
@ -2186,7 +2186,7 @@ function rel_canonical() {
|
||||||
* @since 3.0.0.
|
* @since 3.0.0.
|
||||||
*
|
*
|
||||||
* @param int $id A post or blog id. Default is 0, which means the current post or blog.
|
* @param int $id A post or blog id. Default is 0, which means the current post or blog.
|
||||||
* @param string $contex Whether the id is a 'blog' id, 'post' id, or 'media' id. If 'post', the post_type of the post is consulted. If 'query', the current query is consulted to determine the id and context. Default is 'post'.
|
* @param string $context Whether the id is a 'blog' id, 'post' id, or 'media' id. If 'post', the post_type of the post is consulted. If 'query', the current query is consulted to determine the id and context. Default is 'post'.
|
||||||
* @param bool $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this.
|
* @param bool $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this.
|
||||||
* @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks are not enabled.
|
* @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks are not enabled.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -960,7 +960,7 @@ function get_attachment_taxonomies($attachment) {
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
* @param $mime_type string
|
* @param string $mime_type
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function gd_edit_image_support($mime_type) {
|
function gd_edit_image_support($mime_type) {
|
||||||
|
@ -991,8 +991,8 @@ function gd_edit_image_support($mime_type) {
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
* @param $width
|
* @param int $width Image width
|
||||||
* @param $height
|
* @param int $height Image height
|
||||||
* @return image resource
|
* @return image resource
|
||||||
*/
|
*/
|
||||||
function wp_imagecreatetruecolor($width, $height) {
|
function wp_imagecreatetruecolor($width, $height) {
|
||||||
|
|
|
@ -328,7 +328,7 @@ function update_meta_cache($meta_type, $object_ids) {
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
* @uses $wpdb WordPress database object for queries.
|
* @uses $wpdb WordPress database object for queries.
|
||||||
*
|
*
|
||||||
* @param string $meta_type Type of object to get metadata table for (e.g., comment, post, or user)
|
* @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
|
||||||
* @return mixed Metadata table name, or false if no metadata table exists
|
* @return mixed Metadata table name, or false if no metadata table exists
|
||||||
*/
|
*/
|
||||||
function _get_meta_table($type) {
|
function _get_meta_table($type) {
|
||||||
|
|
|
@ -403,7 +403,7 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param $args array Array of arguments passed on to get_terms().
|
* @param array $args Array of arguments passed on to get_terms().
|
||||||
* @return array menu objects
|
* @return array menu objects
|
||||||
*/
|
*/
|
||||||
function wp_get_nav_menus( $args = array() ) {
|
function wp_get_nav_menus( $args = array() ) {
|
||||||
|
|
|
@ -727,7 +727,6 @@ function _wp_call_all_hook($args) {
|
||||||
* @param string $tag Used in counting how many hooks were applied
|
* @param string $tag Used in counting how many hooks were applied
|
||||||
* @param callback $function Used for creating unique id
|
* @param callback $function Used for creating unique id
|
||||||
* @param int|bool $priority Used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise.
|
* @param int|bool $priority Used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise.
|
||||||
* @param string $type filter or action
|
|
||||||
* @return string|bool Unique ID for usage as array key or false if $priority === false and $function is an object reference, and it does not already have a uniqe id.
|
* @return string|bool Unique ID for usage as array key or false if $priority === false and $function is an object reference, and it does not already have a uniqe id.
|
||||||
*/
|
*/
|
||||||
function _wp_filter_build_unique_id($tag, $function, $priority) {
|
function _wp_filter_build_unique_id($tag, $function, $priority) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ class POMO_Reader {
|
||||||
/**
|
/**
|
||||||
* Sets the endianness of the file.
|
* Sets the endianness of the file.
|
||||||
*
|
*
|
||||||
* @param $endian string 'big' or 'little'
|
* @param string $endian 'big' or 'little'
|
||||||
*/
|
*/
|
||||||
function setEndian($endian) {
|
function setEndian($endian) {
|
||||||
$this->endian = $endian;
|
$this->endian = $endian;
|
||||||
|
|
|
@ -625,7 +625,7 @@ function register_post_status($post_status, $args = array()) {
|
||||||
* @see register_post_status
|
* @see register_post_status
|
||||||
* @see get_post_statuses
|
* @see get_post_statuses
|
||||||
*
|
*
|
||||||
* @param string $post_type The name of a registered post status
|
* @param string $post_status The name of a registered post status
|
||||||
* @return object A post status object
|
* @return object A post status object
|
||||||
*/
|
*/
|
||||||
function get_post_status_object( $post_status ) {
|
function get_post_status_object( $post_status ) {
|
||||||
|
@ -669,7 +669,7 @@ function get_post_stati( $args = array(), $output = 'names', $operator = 'and' )
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @see get_post_type_object
|
* @see get_post_type_object
|
||||||
*
|
*
|
||||||
* @param string $post Post type name
|
* @param string $post_type Post type name
|
||||||
* @return bool Whether post type is hierarchical.
|
* @return bool Whether post type is hierarchical.
|
||||||
*/
|
*/
|
||||||
function is_post_type_hierarchical( $post_type ) {
|
function is_post_type_hierarchical( $post_type ) {
|
||||||
|
@ -686,7 +686,7 @@ function is_post_type_hierarchical( $post_type ) {
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @uses get_post_type_object()
|
* @uses get_post_type_object()
|
||||||
*
|
*
|
||||||
* @param string Post type name
|
* @param string $post_type Post type name
|
||||||
* @return bool Whether post type is registered.
|
* @return bool Whether post type is registered.
|
||||||
*/
|
*/
|
||||||
function post_type_exists( $post_type ) {
|
function post_type_exists( $post_type ) {
|
||||||
|
@ -1144,8 +1144,8 @@ function get_posts($args = null) {
|
||||||
* @link http://codex.wordpress.org/Function_Reference/add_post_meta
|
* @link http://codex.wordpress.org/Function_Reference/add_post_meta
|
||||||
*
|
*
|
||||||
* @param int $post_id Post ID.
|
* @param int $post_id Post ID.
|
||||||
* @param string $key Metadata name.
|
* @param string $meta_key Metadata name.
|
||||||
* @param mixed $value Metadata value.
|
* @param mixed $meta_value Metadata value.
|
||||||
* @param bool $unique Optional, default is false. Whether the same key should not be added.
|
* @param bool $unique Optional, default is false. Whether the same key should not be added.
|
||||||
* @return bool False for failure. True for success.
|
* @return bool False for failure. True for success.
|
||||||
*/
|
*/
|
||||||
|
@ -1211,8 +1211,8 @@ function get_post_meta($post_id, $key, $single = false) {
|
||||||
* @link http://codex.wordpress.org/Function_Reference/update_post_meta
|
* @link http://codex.wordpress.org/Function_Reference/update_post_meta
|
||||||
*
|
*
|
||||||
* @param int $post_id Post ID.
|
* @param int $post_id Post ID.
|
||||||
* @param string $key Metadata key.
|
* @param string $meta_key Metadata key.
|
||||||
* @param mixed $value Metadata value.
|
* @param mixed $meta_value Metadata value.
|
||||||
* @param mixed $prev_value Optional. Previous value to check before removing.
|
* @param mixed $prev_value Optional. Previous value to check before removing.
|
||||||
* @return bool False on failure, true if success.
|
* @return bool False on failure, true if success.
|
||||||
*/
|
*/
|
||||||
|
@ -1650,7 +1650,7 @@ function wp_match_mime_types($wildcard_mime_types, $real_mime_types) {
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*
|
*
|
||||||
* @param string|array $mime_types List of mime types or comma separated string of mime types.
|
* @param string|array $post_mime_types List of mime types or comma separated string of mime types.
|
||||||
* @param string $table_alias Optional. Specify a table alias, if needed.
|
* @param string $table_alias Optional. Specify a table alias, if needed.
|
||||||
* @return string The SQL AND clause for mime searching.
|
* @return string The SQL AND clause for mime searching.
|
||||||
*/
|
*/
|
||||||
|
@ -1809,7 +1809,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) {
|
||||||
* @uses do_action() on 'trashed_post' after trashing
|
* @uses do_action() on 'trashed_post' after trashing
|
||||||
* @uses wp_delete_post() if trash is disabled
|
* @uses wp_delete_post() if trash is disabled
|
||||||
*
|
*
|
||||||
* @param int $postid Post ID.
|
* @param int $post_id Post ID.
|
||||||
* @return mixed False on failure
|
* @return mixed False on failure
|
||||||
*/
|
*/
|
||||||
function wp_trash_post($post_id = 0) {
|
function wp_trash_post($post_id = 0) {
|
||||||
|
@ -1844,7 +1844,7 @@ function wp_trash_post($post_id = 0) {
|
||||||
* @uses do_action() on 'untrash_post' before undeletion
|
* @uses do_action() on 'untrash_post' before undeletion
|
||||||
* @uses do_action() on 'untrashed_post' after undeletion
|
* @uses do_action() on 'untrashed_post' after undeletion
|
||||||
*
|
*
|
||||||
* @param int $postid Post ID.
|
* @param int $post_id Post ID.
|
||||||
* @return mixed False on failure
|
* @return mixed False on failure
|
||||||
*/
|
*/
|
||||||
function wp_untrash_post($post_id = 0) {
|
function wp_untrash_post($post_id = 0) {
|
||||||
|
@ -2964,12 +2964,11 @@ function &get_page_children($page_id, $pages) {
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*
|
*
|
||||||
* @param array $posts Posts array.
|
* @param array $pages Posts array.
|
||||||
* @param int $parent Parent page ID.
|
* @param int $page_id Parent page ID.
|
||||||
* @return array A list arranged by hierarchy. Children immediately follow their parents.
|
* @return array A list arranged by hierarchy. Children immediately follow their parents.
|
||||||
*/
|
*/
|
||||||
function &get_page_hierarchy( &$pages, $page_id = 0 ) {
|
function &get_page_hierarchy( &$pages, $page_id = 0 ) {
|
||||||
|
|
||||||
if ( empty( $pages ) ) {
|
if ( empty( $pages ) ) {
|
||||||
$result = array();
|
$result = array();
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -2977,13 +2976,12 @@ function &get_page_hierarchy( &$pages, $page_id = 0 ) {
|
||||||
|
|
||||||
$children = array();
|
$children = array();
|
||||||
foreach ( (array) $pages as $p ) {
|
foreach ( (array) $pages as $p ) {
|
||||||
|
|
||||||
$parent_id = intval( $p->post_parent );
|
$parent_id = intval( $p->post_parent );
|
||||||
$children[ $parent_id ][] = $p;
|
$children[ $parent_id ][] = $p;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
_page_traverse_name( $page_id, $children, $result );
|
_page_traverse_name( $page_id, $children, $result );
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
@ -2994,11 +2992,8 @@ function &get_page_hierarchy( &$pages, $page_id = 0 ) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function _page_traverse_name( $page_id, &$children, &$result ){
|
function _page_traverse_name( $page_id, &$children, &$result ){
|
||||||
|
|
||||||
if ( isset( $children[ $page_id ] ) ){
|
if ( isset( $children[ $page_id ] ) ){
|
||||||
|
|
||||||
foreach( (array)$children[ $page_id ] as $child ) {
|
foreach( (array)$children[ $page_id ] as $child ) {
|
||||||
|
|
||||||
$result[ $child->ID ] = $child->post_name;
|
$result[ $child->ID ] = $child->post_name;
|
||||||
_page_traverse_name( $child->ID, $children, $result );
|
_page_traverse_name( $child->ID, $children, $result );
|
||||||
}
|
}
|
||||||
|
@ -3277,7 +3272,7 @@ function is_local_attachment($url) {
|
||||||
*
|
*
|
||||||
* @param string|array $object Arguments to override defaults.
|
* @param string|array $object Arguments to override defaults.
|
||||||
* @param string $file Optional filename.
|
* @param string $file Optional filename.
|
||||||
* @param int $post_parent Parent post ID.
|
* @param int $parent Parent post ID.
|
||||||
* @return int Attachment ID.
|
* @return int Attachment ID.
|
||||||
*/
|
*/
|
||||||
function wp_insert_attachment($object, $file = false, $parent = 0) {
|
function wp_insert_attachment($object, $file = false, $parent = 0) {
|
||||||
|
@ -3427,7 +3422,7 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {
|
||||||
* @uses $wpdb
|
* @uses $wpdb
|
||||||
* @uses do_action() Calls 'delete_attachment' hook on Attachment ID.
|
* @uses do_action() Calls 'delete_attachment' hook on Attachment ID.
|
||||||
*
|
*
|
||||||
* @param int $postid Attachment ID.
|
* @param int $post_id Attachment ID.
|
||||||
* @param bool $force_delete Whether to bypass trash and force deletion. Defaults to false.
|
* @param bool $force_delete Whether to bypass trash and force deletion. Defaults to false.
|
||||||
* @return mixed False on failure. Post data on success.
|
* @return mixed False on failure. Post data on success.
|
||||||
*/
|
*/
|
||||||
|
@ -4645,8 +4640,7 @@ function wp_restore_post_revision( $revision_id, $fields = null ) {
|
||||||
* @uses wp_delete_post()
|
* @uses wp_delete_post()
|
||||||
*
|
*
|
||||||
* @param int|object $revision_id Revision ID or revision object.
|
* @param int|object $revision_id Revision ID or revision object.
|
||||||
* @param array $fields Optional. What fields to restore from. Defaults to all.
|
* @return mixed Null or WP_Error if error, deleted post if success.
|
||||||
* @return mixed Null if error, false if no fields to restore, (int) post ID if success.
|
|
||||||
*/
|
*/
|
||||||
function wp_delete_post_revision( $revision_id ) {
|
function wp_delete_post_revision( $revision_id ) {
|
||||||
if ( !$revision = wp_get_post_revision( $revision_id ) )
|
if ( !$revision = wp_get_post_revision( $revision_id ) )
|
||||||
|
|
|
@ -201,7 +201,7 @@ function is_tag( $slug = '' ) {
|
||||||
* @uses $wp_query
|
* @uses $wp_query
|
||||||
*
|
*
|
||||||
* @param mixed $taxonomy Optional. Taxonomy slug or slugs.
|
* @param mixed $taxonomy Optional. Taxonomy slug or slugs.
|
||||||
* @param mixed $term. Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
|
* @param mixed $term Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function is_tax( $taxonomy = '', $term = '' ) {
|
function is_tax( $taxonomy = '', $term = '' ) {
|
||||||
|
|
|
@ -1950,7 +1950,7 @@ class WP_Rewrite {
|
||||||
*
|
*
|
||||||
* @since 2.0.1
|
* @since 2.0.1
|
||||||
* @access public
|
* @access public
|
||||||
* @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
|
* @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
|
||||||
*/
|
*/
|
||||||
function flush_rules($hard = true) {
|
function flush_rules($hard = true) {
|
||||||
delete_option('rewrite_rules');
|
delete_option('rewrite_rules');
|
||||||
|
|
|
@ -640,7 +640,7 @@ function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw
|
||||||
* @uses _get_term_hierarchy()
|
* @uses _get_term_hierarchy()
|
||||||
* @uses get_term_children() Used to get the children of both $taxonomy and the parent $term
|
* @uses get_term_children() Used to get the children of both $taxonomy and the parent $term
|
||||||
*
|
*
|
||||||
* @param string $term ID of Term to get children
|
* @param string $term_id ID of Term to get children
|
||||||
* @param string $taxonomy Taxonomy Name
|
* @param string $taxonomy Taxonomy Name
|
||||||
* @return array|WP_Error List of Term Objects. WP_Error returned if $taxonomy does not exist
|
* @return array|WP_Error List of Term Objects. WP_Error returned if $taxonomy does not exist
|
||||||
*/
|
*/
|
||||||
|
@ -815,7 +815,7 @@ function get_term_to_edit( $id, $taxonomy ) {
|
||||||
* @uses $wpdb
|
* @uses $wpdb
|
||||||
* @uses wp_parse_args() Merges the defaults with those defined by $args and allows for strings.
|
* @uses wp_parse_args() Merges the defaults with those defined by $args and allows for strings.
|
||||||
*
|
*
|
||||||
* @param string|array Taxonomy name or list of Taxonomy names
|
* @param string|array $taxonomies Taxonomy name or list of Taxonomy names
|
||||||
* @param string|array $args The values of what to search for when returning terms
|
* @param string|array $args The values of what to search for when returning terms
|
||||||
* @return array|WP_Error List of Term Objects and their children. Will return WP_Error, if any of $taxonomies do not exist.
|
* @return array|WP_Error List of Term Objects and their children. Will return WP_Error, if any of $taxonomies do not exist.
|
||||||
*/
|
*/
|
||||||
|
@ -1306,7 +1306,7 @@ function wp_count_terms( $taxonomy, $args = array() ) {
|
||||||
* @uses $wpdb
|
* @uses $wpdb
|
||||||
*
|
*
|
||||||
* @param int $object_id The term Object Id that refers to the term
|
* @param int $object_id The term Object Id that refers to the term
|
||||||
* @param string|array $taxonomy List of Taxonomy Names or single Taxonomy name.
|
* @param string|array $taxonomies List of Taxonomy Names or single Taxonomy name.
|
||||||
*/
|
*/
|
||||||
function wp_delete_object_term_relationships( $object_id, $taxonomies ) {
|
function wp_delete_object_term_relationships( $object_id, $taxonomies ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
@ -1444,7 +1444,7 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
* @uses $wpdb
|
* @uses $wpdb
|
||||||
*
|
*
|
||||||
* @param int|array $object_id The id of the object(s) to retrieve.
|
* @param int|array $object_ids The ID(s) of the object(s) to retrieve.
|
||||||
* @param string|array $taxonomies The taxonomies to retrieve terms from.
|
* @param string|array $taxonomies The taxonomies to retrieve terms from.
|
||||||
* @param array|string $args Change what is returned
|
* @param array|string $args Change what is returned
|
||||||
* @return array|WP_Error The requested term data or empty array if no terms found. WP_Error if $taxonomy does not exist.
|
* @return array|WP_Error The requested term data or empty array if no terms found. WP_Error if $taxonomy does not exist.
|
||||||
|
@ -1714,7 +1714,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
|
||||||
* @uses $wpdb
|
* @uses $wpdb
|
||||||
*
|
*
|
||||||
* @param int $object_id The object to relate to.
|
* @param int $object_id The object to relate to.
|
||||||
* @param array|int|string $term The slug or id of the term, will replace all existing
|
* @param array|int|string $terms The slug or id of the term, will replace all existing
|
||||||
* related terms in this taxonomy.
|
* related terms in this taxonomy.
|
||||||
* @param array|string $taxonomy The context in which to relate the term to the object.
|
* @param array|string $taxonomy The context in which to relate the term to the object.
|
||||||
* @param bool $append If false will delete difference of terms.
|
* @param bool $append If false will delete difference of terms.
|
||||||
|
@ -2633,8 +2633,8 @@ function get_post_taxonomies($post = 0) {
|
||||||
* @uses get_object_term_cache()
|
* @uses get_object_term_cache()
|
||||||
* @uses wp_get_object_terms()
|
* @uses wp_get_object_terms()
|
||||||
*
|
*
|
||||||
* @param int $object_id. ID of the object (post ID, link ID, ...)
|
* @param int $object_id ID of the object (post ID, link ID, ...)
|
||||||
* @param string $taxonomy. Single taxonomy name
|
* @param string $taxonomy Single taxonomy name
|
||||||
* @param int|string|array $terms Optional. Term term_id, name, slug or array of said
|
* @param int|string|array $terms Optional. Term term_id, name, slug or array of said
|
||||||
* @return bool|WP_Error. WP_Error on input error.
|
* @return bool|WP_Error. WP_Error on input error.
|
||||||
*/
|
*/
|
||||||
|
@ -2679,7 +2679,7 @@ function is_object_in_term( $object_id, $taxonomy, $terms = null ) {
|
||||||
* @uses get_object_taxonomies()
|
* @uses get_object_taxonomies()
|
||||||
*
|
*
|
||||||
* @param string $object_type Object type string
|
* @param string $object_type Object type string
|
||||||
* @param string $taxonomy. Single taxonomy name
|
* @param string $taxonomy Single taxonomy name
|
||||||
* @return bool True if object is associated with the taxonomy, otherwise false.
|
* @return bool True if object is associated with the taxonomy, otherwise false.
|
||||||
*/
|
*/
|
||||||
function is_object_in_taxonomy($object_type, $taxonomy) {
|
function is_object_in_taxonomy($object_type, $taxonomy) {
|
||||||
|
|
|
@ -645,9 +645,9 @@ function search_theme_directories() {
|
||||||
* Does not have trailing slash.
|
* Does not have trailing slash.
|
||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
* @param $stylesheet_or_template The stylesheet or template name of the theme
|
|
||||||
* @uses apply_filters() Calls 'theme_root' filter on path.
|
* @uses apply_filters() Calls 'theme_root' filter on path.
|
||||||
*
|
*
|
||||||
|
* @param string $stylesheet_or_template The stylesheet or template name of the theme
|
||||||
* @return string Theme path.
|
* @return string Theme path.
|
||||||
*/
|
*/
|
||||||
function get_theme_root( $stylesheet_or_template = false ) {
|
function get_theme_root( $stylesheet_or_template = false ) {
|
||||||
|
@ -671,8 +671,8 @@ function get_theme_root( $stylesheet_or_template = false ) {
|
||||||
* Does not have trailing slash.
|
* Does not have trailing slash.
|
||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
* @param $stylesheet_or_template The stylesheet or template name of the theme
|
|
||||||
*
|
*
|
||||||
|
* @param string $stylesheet_or_template The stylesheet or template name of the theme
|
||||||
* @return string Themes URI.
|
* @return string Themes URI.
|
||||||
*/
|
*/
|
||||||
function get_theme_root_uri( $stylesheet_or_template = false ) {
|
function get_theme_root_uri( $stylesheet_or_template = false ) {
|
||||||
|
@ -1432,7 +1432,7 @@ function register_default_headers( $headers ) {
|
||||||
* @see register_default_headers()
|
* @see register_default_headers()
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param string|array The header string id (key of array) to remove, or an array thereof.
|
* @param string|array $header The header string id (key of array) to remove, or an array thereof.
|
||||||
* @return True on success, false on failure.
|
* @return True on success, false on failure.
|
||||||
*/
|
*/
|
||||||
function unregister_default_headers( $header ) {
|
function unregister_default_headers( $header ) {
|
||||||
|
|
|
@ -162,7 +162,7 @@ function count_user_posts($userid) {
|
||||||
* Number of posts written by a list of users.
|
* Number of posts written by a list of users.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @param array $userid User ID number list.
|
* @param array $users User ID number list.
|
||||||
* @return array Amount of posts each user has written.
|
* @return array Amount of posts each user has written.
|
||||||
*/
|
*/
|
||||||
function count_many_users_posts($users) {
|
function count_many_users_posts($users) {
|
||||||
|
@ -584,8 +584,8 @@ function get_users_of_blog( $id = '' ) {
|
||||||
* @link http://codex.wordpress.org/Function_Reference/add_user_meta
|
* @link http://codex.wordpress.org/Function_Reference/add_user_meta
|
||||||
*
|
*
|
||||||
* @param int $user_id Post ID.
|
* @param int $user_id Post ID.
|
||||||
* @param string $key Metadata name.
|
* @param string $meta_key Metadata name.
|
||||||
* @param mixed $value Metadata value.
|
* @param mixed $meta_value Metadata value.
|
||||||
* @param bool $unique Optional, default is false. Whether the same key should not be added.
|
* @param bool $unique Optional, default is false. Whether the same key should not be added.
|
||||||
* @return bool False for failure. True for success.
|
* @return bool False for failure. True for success.
|
||||||
*/
|
*/
|
||||||
|
@ -643,8 +643,8 @@ function get_user_meta($user_id, $key, $single = false) {
|
||||||
* @link http://codex.wordpress.org/Function_Reference/update_user_meta
|
* @link http://codex.wordpress.org/Function_Reference/update_user_meta
|
||||||
*
|
*
|
||||||
* @param int $user_id Post ID.
|
* @param int $user_id Post ID.
|
||||||
* @param string $key Metadata key.
|
* @param string $meta_key Metadata key.
|
||||||
* @param mixed $value Metadata value.
|
* @param mixed $meta_value Metadata value.
|
||||||
* @param mixed $prev_value Optional. Previous value to check before removing.
|
* @param mixed $prev_value Optional. Previous value to check before removing.
|
||||||
* @return bool False on failure, true if success.
|
* @return bool False on failure, true if success.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -596,7 +596,7 @@ function unregister_sidebar( $name ) {
|
||||||
* @param int|string $id Widget ID.
|
* @param int|string $id Widget ID.
|
||||||
* @param string $name Widget display title.
|
* @param string $name Widget display title.
|
||||||
* @param callback $output_callback Run when widget is called.
|
* @param callback $output_callback Run when widget is called.
|
||||||
* @param array|string Optional. $options Widget Options.
|
* @param array|string $options Optional. Widget Options.
|
||||||
* @param mixed $params,... Widget parameters to add to widget.
|
* @param mixed $params,... Widget parameters to add to widget.
|
||||||
* @return null Will return if $output_callback is empty after removing widget.
|
* @return null Will return if $output_callback is empty after removing widget.
|
||||||
*/
|
*/
|
||||||
|
@ -911,7 +911,7 @@ function dynamic_sidebar($index = 1) {
|
||||||
*
|
*
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*
|
*
|
||||||
* @param callback Optional, Widget callback to check.
|
* @param string $callback Optional, Widget callback to check.
|
||||||
* @param int $widget_id Optional, but needed for checking. Widget ID.
|
* @param int $widget_id Optional, but needed for checking. Widget ID.
|
||||||
* @param string $id_base Optional, the base ID of a widget created by extending WP_Widget.
|
* @param string $id_base Optional, the base ID of a widget created by extending WP_Widget.
|
||||||
* @param bool $skip_inactive Optional, whether to check in 'wp_inactive_widgets'.
|
* @param bool $skip_inactive Optional, whether to check in 'wp_inactive_widgets'.
|
||||||
|
@ -965,7 +965,7 @@ function is_dynamic_sidebar() {
|
||||||
*
|
*
|
||||||
* @since 2.8
|
* @since 2.8
|
||||||
*
|
*
|
||||||
* @param mixed $index, sidebar name, id or number to check.
|
* @param mixed $index Sidebar name, id or number to check.
|
||||||
* @return bool true if the sidebar is in use, false otherwise.
|
* @return bool true if the sidebar is in use, false otherwise.
|
||||||
*/
|
*/
|
||||||
function is_active_sidebar( $index ) {
|
function is_active_sidebar( $index ) {
|
||||||
|
@ -988,7 +988,7 @@ function is_active_sidebar( $index ) {
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
* @param bool $deprecated. Not used.
|
* @param bool $deprecated Not used (deprecated).
|
||||||
* @return array Upgraded list of widgets to version 3 array format when called from the admin.
|
* @return array Upgraded list of widgets to version 3 array format when called from the admin.
|
||||||
*/
|
*/
|
||||||
function wp_get_sidebars_widgets($deprecated = true) {
|
function wp_get_sidebars_widgets($deprecated = true) {
|
||||||
|
|
Loading…
Reference in New Issue