diff --git a/phpstan.neon.dist b/phpstan.neon.dist index f9aea2b..3b1fa80 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,6 +2,7 @@ parameters: level: 8 paths: - finder.php + - functionMap.php - visitor.php - tests/ excludePaths: diff --git a/visitor.php b/visitor.php index 425bd8c..0839aaf 100644 --- a/visitor.php +++ b/visitor.php @@ -9,6 +9,7 @@ use phpDocumentor\Reflection\DocBlock\Tags\Var_; use phpDocumentor\Reflection\Type; use phpDocumentor\Reflection\Types\Never_; +use phpDocumentor\Reflection\Types\Void_; use PhpParser\Comment\Doc; use PhpParser\Node; use PhpParser\NodeFinder; @@ -18,7 +19,6 @@ use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\Exit_; use PhpParser\Node\Expr\FuncCall; -use PhpParser\Node\Expr\Variable; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; @@ -282,14 +282,18 @@ public function format(int $level = 1): array */ private $additionalTagStrings = []; + /** @var \PhpParser\NodeFinder */ + private $nodeFinder; + public function __construct() { $this->docBlockFactory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); + $this->nodeFinder = new NodeFinder(); } public function enterNode(Node $node) { - $neverReturn = self::isNeverReturn($node); + $voidOrNever = $this->voidOrNever($node); parent::enterNode($node); @@ -317,28 +321,31 @@ public function enterNode(Node $node) ); } } - - $additions = $this->generateAdditionalTagsFromDoc($docComment); $node->setAttribute('fullSymbolName', $symbolName); + $additions = $this->generateAdditionalTagsFromDoc($docComment); if (count($additions) > 0) { $this->additionalTags[ $symbolName ] = $additions; } $additions = $this->getAdditionalTagsFromMap($symbolName); - if (count($additions) > 0) { $this->additionalTagStrings[ $symbolName ] = $additions; } - if ($neverReturn) { - $never = new Never_(); - $this->additionalTagStrings[ $symbolName ] = [ - sprintf( - '@phpstan-return %s', - $never->__toString() - ) - ]; + if ($voidOrNever !== '') { + $addition = sprintf( + '@phpstan-return %s', + $voidOrNever === 'never' + ? (new Never_())->__toString() + : (new Void_())->__toString() + ); + if ( + !isset($this->additionalTagStrings[$symbolName]) + || !in_array($addition, $this->additionalTagStrings[$symbolName], true) + ) { + $this->additionalTagStrings[$symbolName][] = $addition; + } } return null; @@ -1000,66 +1007,87 @@ private static function isOptional(string $description): bool return (stripos($description, 'Optional') !== false) || (stripos($description, 'Default ') !== false) || (stripos($description, 'Default: ') !== false) - || (stripos($description, 'Defaults to ') !== false) - ; + || (stripos($description, 'Defaults to ') !== false); } - private static function isNeverReturn(Node $node): bool + private function voidOrNever(Node $node): string { - if (! $node instanceof Function_ && ! $node instanceof ClassMethod) { - return false; - } - if (empty($node->stmts) ) { - return false; + if (!($node instanceof Function_) && !($node instanceof ClassMethod)) { + return ''; } - $nodeFinder = new NodeFinder(); - if ($nodeFinder->findFirstInstanceOf($node, Stmt_Return::class) instanceof Stmt_Return) { - // If there is a return statement, it's not return type never. - return false; - }; - - $lastStmt = end($node->stmts); - if (! $lastStmt instanceof Expression) { - return false; - } - // If the last statement is exit, it's return type never. - if ($lastStmt->expr instanceof Exit_) { - return true; - } - if (! $lastStmt->expr instanceof FuncCall || ! $lastStmt->expr->name instanceof Name) { - return false; - } - - // If the last statement is a call to wp_send_json(_success/error), - // it's return type never. - if (strpos($lastStmt->expr->name->toString(), 'wp_send_json') === 0) { - return true; + if (!isset($node->stmts) || count($node->stmts) === 0) { + // Interfaces and abstract methods. + return ''; } - // Skip all functions but wp_die(). - if (strpos($lastStmt->expr->name->toString(), 'wp_die') !== 0) { - return false; - } + $return = $this->nodeFinder->findInstanceOf($node, Stmt_Return::class); - // If wp_die is called without 3rd parameter, it's return type never. - $args = $lastStmt->expr->getArgs(); - if (count($args) < 3) { - return true; + // If there is a return statement, it's not return type never. + if (count($return) !== 0) { + // If there is at least one return statement that is not void, + // it's not return type void. + if ( + $this->nodeFinder->findFirst( + $return, + static function (Node $node): bool { + return isset($node->expr); + } + ) !== null + ) { + return ''; + } + // If there is no return statement that is not void, + // it's return type void. + return 'void'; } - // If wp_die is called with 3rd parameter, we need additional checks. - $argValue = $args[2]->value; - if ($argValue instanceof Variable) { - return false; - } - if ($argValue instanceof Array_) { - foreach ($argValue->items as $item ) { - if ($item instanceof ArrayItem && $item->key instanceof String_ && $item->key->value === 'exit') { - return false; + // Check for never return type. + foreach ($node->stmts as $stmt) { + if (!($stmt instanceof Expression)) { + continue; + } + // If a first level statement is exit/die, it's return type never. + if ($stmt->expr instanceof Exit_) { + return 'never'; + } + if (!($stmt->expr instanceof FuncCall) || !($stmt->expr->name instanceof Name)) { + continue; + } + $name = $stmt->expr->name; + // If a first level statement is a call to wp_send_json(_success/error), + // it's return type never. + if (strpos($name->toString(), 'wp_send_json') === 0) { + return 'never'; + } + // Skip all functions but wp_die(). + if (strpos($name->toString(), 'wp_die') !== 0) { + continue; + } + $args = $stmt->expr->getArgs(); + // If wp_die is called without 3rd parameter, it's return type never. + if (count($args) < 3) { + return 'never'; + } + // If wp_die is called with 3rd parameter, we need additional checks. + $argValue = $args[2]->value; + if (!($argValue instanceof Array_)) { + continue; + } + foreach ($argValue->items as $item) { + if (!($item instanceof ArrayItem && $item->key instanceof String_ && $item->key->value === 'exit')) { + continue; + } + if ( + ($item->value instanceof Node\Expr\ConstFetch && strtolower($item->value->name->toString()) === 'true') + || ($item->value instanceof Node\Scalar\LNumber && $item->value->value === 1) + || ($item->value instanceof Node\Scalar\String_ && $item->value->value !== '' && $item->value->value !== '0') + ) { + return 'never'; } + return ''; } } - return true; + return ''; } }; diff --git a/wordpress-stubs.php b/wordpress-stubs.php index 000b516..7dba24e 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -120,12 +120,14 @@ public function request_filesystem_credentials($error = \false, $context = '', $ } /** * @since 2.8.0 + * @phpstan-return void */ public function header() { } /** * @since 2.8.0 + * @phpstan-return void */ public function footer() { @@ -144,6 +146,7 @@ public function error($errors) * * @param string $feedback Message data. * @param mixed ...$args Optional text replacements. + * @phpstan-return void */ public function feedback($feedback, ...$args) { @@ -171,6 +174,7 @@ public function after() * * @param string $type Type of update count to decrement. Likely values include 'plugin', * 'theme', 'translation', etc. + * @phpstan-return void */ protected function decrement_update_count($type) { @@ -257,6 +261,7 @@ public function get_upgrade_messages() * * @param string|array|WP_Error $feedback Message data. * @param mixed ...$args Optional text replacements. + * @phpstan-return void */ public function feedback($feedback, ...$args) { @@ -316,6 +321,7 @@ public function add_strings() * * @param string $feedback Message data. * @param mixed ...$args Optional text replacements. + * @phpstan-return void */ public function feedback($feedback, ...$args) { @@ -958,6 +964,7 @@ public function __construct($admin_header_callback = '', $admin_image_div_callba * Sets up the hooks for the Custom Background admin page. * * @since 3.0.0 + * @phpstan-return void */ public function init() { @@ -974,6 +981,7 @@ public function admin_load() * Executes custom background modification. * * @since 3.0.0 + * @phpstan-return void */ public function take_action() { @@ -990,6 +998,7 @@ public function admin_page() * Handles an Image upload for the background image. * * @since 3.0.0 + * @phpstan-return void */ public function handle_upload() { @@ -1084,6 +1093,7 @@ public function __construct($admin_header_callback, $admin_image_div_callback = * Sets up the hooks for the Custom Header admin page. * * @since 2.1.0 + * @phpstan-return void */ public function init() { @@ -1126,6 +1136,7 @@ public function css_includes() * Executes custom header modification. * * @since 2.6.0 + * @phpstan-return void */ public function take_action() { @@ -1136,6 +1147,7 @@ public function take_action() * @since 3.0.0 * * @global array $_wp_default_headers + * @phpstan-return void */ public function process_default_headers() { @@ -1262,6 +1274,7 @@ public function filter_upload_tabs($tabs) * registered for that theme; and the key of an image uploaded for that theme * (the attachment ID of the image). Or an array of arguments: attachment_id, * url, width, height. All are required. + * @phpstan-return void */ public final function set_header_image($choice) { @@ -1280,6 +1293,7 @@ public final function remove_header_image() * This method does not do anything if the theme does not have a default header image. * * @since 3.4.0 + * @phpstan-return void */ public final function reset_header_image() { @@ -1361,6 +1375,7 @@ public function ajax_header_remove() * @since 3.9.0 * * @param WP_Customize_Manager $wp_customize Customize manager. + * @phpstan-return void */ public function customize_set_last_used($wp_customize) { @@ -1883,6 +1898,7 @@ class Language_Pack_Upgrader extends \WP_Upgrader * @param false|WP_Upgrader $upgrader Optional. WP_Upgrader instance or false. If `$upgrader` is * a Language_Pack_Upgrader instance, the method will bail to * avoid recursion. Otherwise unused. Default false. + * @phpstan-return void */ public static function async_upgrade($upgrader = \false) { @@ -2824,6 +2840,7 @@ public function hide_process_failed($wp_error) * Performs an action following a plugin install. * * @since 2.8.0 + * @phpstan-return void */ public function after() { @@ -3159,6 +3176,7 @@ public function hide_process_failed($wp_error) * Performs an action following a single theme install. * * @since 2.8.0 + * @phpstan-return void */ public function after() { @@ -3576,6 +3594,7 @@ public function end_el(&$output, $data_object, $depth = 0, $args = array()) * @param int $depth Depth of current element. * @param array $args An array of arguments. * @param string $output Used to append additional content (passed by reference). + * @phpstan-return void */ public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) { @@ -3643,6 +3662,7 @@ public function get_number_of_root_elements($elements) * * @param object $element The top level element. * @param array $children_elements The children elements. + * @phpstan-return void */ public function unset_children($element, &$children_elements) { @@ -4353,6 +4373,7 @@ public function no_items() * * @param string $text The 'submit' button label. * @param string $input_id ID attribute value for the search input field. + * @phpstan-return void */ public function search_box($text, $input_id) { @@ -4396,6 +4417,7 @@ protected function get_views() * Displays the list of views available on this table. * * @since 3.1.0 + * @phpstan-return void */ public function views() { @@ -4438,6 +4460,7 @@ protected function get_bulk_actions() * @param string $which The location of the bulk actions: 'top' or 'bottom'. * This is designated as optional for backward compatibility. * @phpstan-param 'top'|'bottom' $which + * @phpstan-return void */ protected function bulk_actions($which = '') { @@ -4473,6 +4496,7 @@ protected function row_actions($actions, $always_visible = \false) * @global WP_Locale $wp_locale WordPress date and time locale object. * * @param string $post_type The post type. + * @phpstan-return void */ protected function months_dropdown($post_type) { @@ -4639,6 +4663,7 @@ public function print_column_headers($with_id = \true) * * @since 6.3.0 * @access public + * @phpstan-return void */ public function print_table_description() { @@ -5013,6 +5038,7 @@ public function update($type, $item) * Kicks off the background update process, looping through all pending updates. * * @since 3.7.0 + * @phpstan-return void */ public function run() { @@ -5024,6 +5050,7 @@ public function run() * @since 3.7.0 * * @param object $update_result The result of the core update. Includes the update offer and result. + * @phpstan-return void */ protected function after_core_update($update_result) { @@ -5036,6 +5063,7 @@ protected function after_core_update($update_result) * @param string $type The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'. * @param object $core_update The update offer that was attempted. * @param mixed $result Optional. The result for the core update. Can be WP_Error. + * @phpstan-return void */ protected function send_email($type, $core_update, $result = \null) { @@ -5046,6 +5074,7 @@ protected function send_email($type, $core_update, $result = \null) * @since 5.5.0 * * @param array $update_results The results of update tasks. + * @phpstan-return void */ protected function after_plugin_theme_update($update_results) { @@ -5058,6 +5087,7 @@ protected function after_plugin_theme_update($update_results) * @param string $type The type of email to send. Can be one of 'success', 'fail', 'mixed'. * @param array $successful_updates A list of updates that succeeded. * @param array $failed_updates A list of updates that failed. + * @phpstan-return void */ protected function send_plugin_theme_email($type, $successful_updates, $failed_updates) { @@ -5278,6 +5308,7 @@ public function column_date($comment) } /** * @param WP_Comment $comment The comment object. + * @phpstan-return void */ public function column_response($comment) { @@ -5526,6 +5557,7 @@ protected function trim_events(array $events) * @param string $message A description of what occurred. * @param array $details Details that provide more context for the * log entry. + * @phpstan-return void */ protected function maybe_log_events_response($message, $details) { @@ -6652,6 +6684,7 @@ class WP_Filesystem_FTPext extends \WP_Filesystem_Base * @since 2.5.0 * * @param array $opt + * @phpstan-return void */ public function __construct($opt = '') { @@ -7088,6 +7121,7 @@ class WP_Filesystem_ftpsockets extends \WP_Filesystem_Base * @since 2.5.0 * * @param array $opt + * @phpstan-return void */ public function __construct($opt = '') { @@ -7517,6 +7551,7 @@ class WP_Filesystem_SSH2 extends \WP_Filesystem_Base * @since 2.7.0 * * @param array $opt + * @phpstan-return void */ public function __construct($opt = '') { @@ -8089,6 +8124,7 @@ final class WP_Internal_Pointers * add_action( 'admin_enqueue_scripts', 'yourprefix_remove_pointers', 11 ); * * @param string $hook_suffix The current admin page. + * @phpstan-return void */ public static function enqueue_scripts($hook_suffix) { @@ -8194,6 +8230,7 @@ protected function get_bulk_actions() /** * @global int $cat_id * @param string $which + * @phpstan-return void */ protected function extra_tablenav($which) { @@ -8439,6 +8476,7 @@ protected function get_bulk_actions() } /** * @param string $which + * @phpstan-return void */ protected function extra_tablenav($which) { @@ -8560,6 +8598,7 @@ public function column_comments($post) * * @param WP_Post $item The current WP_Post object. * @param string $column_name Current column name. + * @phpstan-return void */ public function column_default($item, $column_name) { @@ -9122,6 +9161,7 @@ protected function get_sortable_columns() * @since 5.9.0 Renamed `$user` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_User $item The current WP_User object. + * @phpstan-return void */ public function column_cb($item) { @@ -9195,6 +9235,7 @@ protected function _column_blogs($user, $classes, $data, $primary) * @since 4.3.0 * * @param WP_User $user The current WP_User object. + * @phpstan-return void */ public function column_blogs($user) { @@ -9299,6 +9340,7 @@ protected function get_installed_plugin_slugs() * @global int $paged * @global string $type * @global string $term + * @phpstan-return void */ public function prepare_items() { @@ -9337,6 +9379,7 @@ public function display() * @global string $tab * * @param string $which + * @phpstan-return void */ protected function display_tablenav($which) { @@ -9452,6 +9495,7 @@ public function no_items() * * @param string $text The 'submit' button label. * @param string $input_id ID attribute value for the search input field. + * @phpstan-return void */ public function search_box($text, $input_id) { @@ -9488,6 +9532,7 @@ protected function get_bulk_actions() /** * @global string $status * @param string $which + * @phpstan-return void */ public function bulk_actions($which = '') { @@ -9495,6 +9540,7 @@ public function bulk_actions($which = '') /** * @global string $status * @param string $which + * @phpstan-return void */ protected function extra_tablenav($which) { @@ -9507,6 +9553,7 @@ public function current_action() } /** * @global string $status + * @phpstan-return void */ public function display_rows() { @@ -9708,6 +9755,7 @@ protected function get_bulk_actions() * @global int $cat Currently selected category. * * @param string $post_type Post type slug. + * @phpstan-return void */ protected function categories_dropdown($post_type) { @@ -9719,6 +9767,7 @@ protected function categories_dropdown($post_type) * @access protected * * @param string $post_type Post type slug. + * @phpstan-return void */ protected function formats_dropdown($post_type) { @@ -9838,6 +9887,7 @@ public function column_author($post) * * @param WP_Post $item The current WP_Post object. * @param string $column_name The current column name. + * @phpstan-return void */ public function column_default($item, $column_name) { @@ -9992,6 +10042,7 @@ protected function get_bulk_actions() * * @since 4.9.6 * @since 5.6.0 Added support for the `complete` action. + * @phpstan-return void */ public function process_bulk_action() { @@ -10214,6 +10265,7 @@ final class WP_Privacy_Policy_Content * * @param string $plugin_name The name of the plugin or theme that is suggesting content for the site's privacy policy. * @param string $policy_text The suggested content for inclusion in the policy. + * @phpstan-return void */ public static function add($plugin_name, $policy_text) { @@ -10232,6 +10284,7 @@ public static function text_change_check() * @since 4.9.6 * * @global WP_Post $post Global post object. + * @phpstan-return void */ public static function policy_text_changed_notice() { @@ -10243,6 +10296,7 @@ public static function policy_text_changed_notice() * @access private * * @param int $post_id The ID of the updated post. + * @phpstan-return void */ public static function _policy_page_updated($post_id) { @@ -10268,6 +10322,7 @@ public static function get_suggested_policy_text() * @global WP_Post $post Global post object. * * @param WP_Post|null $post The currently edited post. Default null. + * @phpstan-return void */ public static function notice($post = \null) { @@ -10589,6 +10644,7 @@ public function get_help_tab($id) * callback?: callable, * priority?: int, * } $args + * @phpstan-return void */ public function add_help_tab($args) { @@ -10713,6 +10769,7 @@ public function remove_screen_reader_content() * @since 3.3.0 * * @global string $screen_layout_columns + * @phpstan-return void */ public function render_screen_meta() { @@ -10748,6 +10805,7 @@ public function render_screen_options($options = array()) * @since 4.4.0 * * @global array $wp_meta_boxes + * @phpstan-return void */ public function render_meta_boxes_preferences() { @@ -10756,6 +10814,7 @@ public function render_meta_boxes_preferences() * Renders the list table columns preferences. * * @since 4.4.0 + * @phpstan-return void */ public function render_list_table_columns_preferences() { @@ -10764,6 +10823,7 @@ public function render_list_table_columns_preferences() * Renders the option for number of columns on the page. * * @since 3.3.0 + * @phpstan-return void */ public function render_screen_layout() { @@ -10772,6 +10832,7 @@ public function render_screen_layout() * Renders the items per page option. * * @since 3.3.0 + * @phpstan-return void */ public function render_per_page_options() { @@ -10782,6 +10843,7 @@ public function render_per_page_options() * @since 4.4.0 * * @global string $mode List table view mode. + * @phpstan-return void */ public function render_view_mode() { @@ -10793,6 +10855,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. + * @phpstan-return void */ public function render_screen_reader_content($key = '', $tag = 'h2') { @@ -10981,6 +11044,7 @@ public static function get_instance() * Enqueues the site health scripts. * * @since 5.2.0 + * @phpstan-return void */ public function enqueue_scripts() { @@ -10995,6 +11059,7 @@ public function enqueue_scripts() * with the right query argument to check for this. * * @since 5.2.0 + * @phpstan-return void */ public function check_wp_version_check_exists() { @@ -11642,6 +11707,7 @@ protected function get_sortable_columns() { } /** + * @phpstan-return void */ public function display_rows_or_placeholder() { @@ -11737,6 +11803,7 @@ public function column_default($item, $column_name) * Outputs the hidden row displayed when inline editing * * @since 3.1.0 + * @phpstan-return void */ public function inline_edit() { @@ -11784,12 +11851,14 @@ public function prepare_items() { } /** + * @phpstan-return void */ public function no_items() { } /** * @param string $which + * @phpstan-return void */ public function tablenav($which = 'top') { @@ -11867,6 +11936,7 @@ public function ajax_user_can() * @global int $paged * @global string $type * @global array $theme_field_defaults + * @phpstan-return void */ public function prepare_items() { @@ -11934,6 +12004,7 @@ public function display_rows() * description?: string, * download_link?: string, * } $theme + * @phpstan-return void */ public function single_row($theme) { @@ -11959,6 +12030,7 @@ public function theme_installer_single($theme) * @global array $themes_allowedtags * * @param stdClass $theme A WordPress.org Theme API object. + * @phpstan-return void */ public function install_theme_info($theme) { @@ -13372,6 +13444,7 @@ class getID3 const ATTACHMENTS_INLINE = \true; /** * @throws getid3_exception + * @phpstan-return void */ public function __construct() { @@ -13463,6 +13536,7 @@ public function GetFileFormat(&$filedata, $filename = '') * * @param array $array * @param string $encoding + * @phpstan-return void */ public function CharConvert(&$array, $encoding) { @@ -16599,6 +16673,7 @@ public function __destruct() * @see PHPMailer::$SMTPDebug * * @param string $str + * @phpstan-return void */ protected function edebug($str) { @@ -17061,6 +17136,7 @@ public function utf8CharBoundary($encodedText, $maxLength) * Wraps the message body to the number of chars set in the WordWrap property. * You should only do this to plain-text bodies as wrapping HTML tags may break them. * This is called automatically by createBody(), so you don't need to call it yourself. + * @phpstan-return void */ public function setWordWrap() { @@ -18082,6 +18158,7 @@ class SMTP * * @see SMTP::$Debugoutput * @see SMTP::$do_debug + * @phpstan-return void */ protected function edebug($str, $level = 0) { @@ -18571,6 +18648,7 @@ class Basic implements \WpOrg\Requests\Auth * * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not an array or null. * @throws \WpOrg\Requests\Exception\ArgumentCount On incorrect number of array elements (`authbasicbadargs`). + * @phpstan-return void */ public function __construct($args = null) { @@ -22541,6 +22619,7 @@ class SimplePie_Cache_MySQL extends \SimplePie_Cache_DB * @param string $location Location string (from SimplePie::$cache_location) * @param string $name Unique ID for the cache * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + * @phpstan-return void */ public function __construct($location, $name, $type) { @@ -25640,6 +25719,7 @@ protected function body() } /** * Parsed a "Transfer-Encoding: chunked" body + * @phpstan-return void */ protected function chunked() { @@ -29770,6 +29850,7 @@ class Walker_Category extends \Walker * use_desc_for_title?: bool|int, * walker?: Walker, * } $args See wp_list_categories() + * @phpstan-return void */ public function start_lvl(&$output, $depth = 0, $args = array()) { @@ -29805,6 +29886,7 @@ public function start_lvl(&$output, $depth = 0, $args = array()) * use_desc_for_title?: bool|int, * walker?: Walker, * } $args See wp_list_categories() + * @phpstan-return void */ public function end_lvl(&$output, $depth = 0, $args = array()) { @@ -29844,6 +29926,7 @@ public function end_lvl(&$output, $depth = 0, $args = array()) * use_desc_for_title?: bool|int, * walker?: Walker, * } $args See wp_list_categories() + * @phpstan-return void */ public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) { @@ -29881,6 +29964,7 @@ public function start_el(&$output, $data_object, $depth = 0, $args = array(), $c * use_desc_for_title?: bool|int, * walker?: Walker, * } $args See wp_list_categories() + * @phpstan-return void */ public function end_el(&$output, $data_object, $depth = 0, $args = array()) { @@ -29982,6 +30066,7 @@ public function end_lvl(&$output, $depth = 0, $args = array()) * @param int $depth Depth of the current element. * @param array $args An array of arguments. * @param string $output Used to append additional content. Passed by reference. + * @phpstan-return void */ public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) { @@ -30003,6 +30088,7 @@ public function display_element($element, &$children_elements, $max_depth, $dept * @param int $depth Optional. Depth of the current comment in reference to parents. Default 0. * @param array $args Optional. An array of arguments. Default empty array. * @param int $current_object_id Optional. ID of the current comment. Default 0. + * @phpstan-return void */ public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) { @@ -30020,6 +30106,7 @@ public function start_el(&$output, $data_object, $depth = 0, $args = array(), $c * @param WP_Comment $data_object Comment data object. * @param int $depth Optional. Depth of the current comment. Default 0. * @param array $args Optional. An array of arguments. Default empty array. + * @phpstan-return void */ public function end_el(&$output, $data_object, $depth = 0, $args = array()) { @@ -30330,6 +30417,7 @@ public function remove_menu($id) * group?: bool, * meta?: array, * } $args + * @phpstan-return void */ public function add_node($args) { @@ -30446,6 +30534,7 @@ protected final function _render($root) * @since 3.3.0 * * @param object $node + * @phpstan-return void */ protected final function _render_container($node) { @@ -30454,6 +30543,7 @@ protected final function _render_container($node) * @since 3.3.0 * * @param object $node + * @phpstan-return void */ protected final function _render_group($node) { @@ -30462,6 +30552,7 @@ protected final function _render_group($node) * @since 3.3.0 * * @param object $node + * @phpstan-return void */ protected final function _render_item($node) { @@ -31310,6 +31401,7 @@ public function freeform($inner_html) * @internal * @since 5.0.0 * @param null $length how many bytes of document text to output. + * @phpstan-return void */ public function add_freeform($length = \null) { @@ -32326,6 +32418,7 @@ public function __isset($name) * * @param string $name Property name. * @param mixed $value Property value. + * @phpstan-return void */ public function __set($name, $value) { @@ -33617,6 +33710,7 @@ public final function get_content() * * @since 3.4.0 * @uses WP_Customize_Control::render() + * @phpstan-return void */ public final function maybe_render() { @@ -33672,6 +33766,7 @@ public function input_attrs() * Control content can alternately be rendered in JS. See WP_Customize_Control::print_template(). * * @since 3.4.0 + * @phpstan-return void */ protected function render_content() { @@ -33812,6 +33907,7 @@ public function wp_die_handler() * @since 3.4.0 * * @global string $pagenow The filename of the current screen. + * @phpstan-return void */ public function setup_theme() { @@ -33845,6 +33941,7 @@ public function after_setup_theme() * to swap it out at runtime. * * @since 3.4.0 + * @phpstan-return void */ public function start_previewing_theme() { @@ -33855,6 +33952,7 @@ public function start_previewing_theme() * Removes filters to change the active theme. * * @since 3.4.0 + * @phpstan-return void */ public function stop_previewing_theme() { @@ -34038,6 +34136,7 @@ public function changeset_data() * @since 4.7.0 * * @param array $starter_content Starter content. Defaults to `get_theme_starter_content()`. + * @phpstan-return void */ public function import_theme_starter_content($starter_content = array()) { @@ -34046,6 +34145,7 @@ public function import_theme_starter_content($starter_content = array()) * Saves starter content changeset. * * @since 4.7.0 + * @phpstan-return void */ public function _save_starter_content_changeset() { @@ -34125,6 +34225,7 @@ public function set_post_value($setting_id, $value) * Prints JavaScript settings. * * @since 3.4.0 + * @phpstan-return void */ public function customize_preview_init() { @@ -34197,6 +34298,7 @@ public function customize_preview_loading_style() * work as expected since the parent frame is not being sent the URL to navigate to. * * @since 4.7.0 + * @phpstan-return void */ public function remove_frameless_preview_messenger_channel() { @@ -34432,6 +34534,7 @@ public function trash_changeset_post($post) * Handles request to trash a changeset. * * @since 4.9.0 + * @phpstan-return void */ public function handle_changeset_trash_request() { @@ -34478,6 +34581,7 @@ public function set_changeset_lock($changeset_post_id, $take_over = \false) * @since 4.9.0 * * @param int $changeset_post_id Changeset post ID. + * @phpstan-return void */ public function refresh_changeset_lock($changeset_post_id) { @@ -35227,6 +35331,7 @@ final class WP_Customize_Nav_Menus * @since 4.3.0 * * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @phpstan-return void */ public function __construct($manager) { @@ -35764,6 +35869,7 @@ public final function get_content() * Check capabilities and render the panel. * * @since 4.0.0 + * @phpstan-return void */ public final function maybe_render() { @@ -36056,6 +36162,7 @@ public final function get_content() * Check capabilities and render the section. * * @since 3.4.0 + * @phpstan-return void */ public final function maybe_render() { @@ -36622,6 +36729,7 @@ final class WP_Customize_Widgets * @since 3.9.0 * * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @phpstan-return void */ public function __construct($manager) { @@ -36687,6 +36795,7 @@ public function filter_customize_dynamic_setting_args($args, $setting_id) * * @global array $sidebars_widgets * @global array $_wp_sidebars_widgets + * @phpstan-return void */ public function override_sidebars_widgets_for_theme_switch() { @@ -37184,6 +37293,7 @@ public function customize_dynamic_partial_args($partial_args, $partial_id) * Adds hooks for selective refresh. * * @since 4.5.0 + * @phpstan-return void */ public function selective_refresh_init() { @@ -37491,6 +37601,7 @@ class WP_Date_Query * @param string $default_column Optional. Default column to query against. See WP_Date_Query::validate_column() * and the {@see 'date_query_valid_columns'} filter for the list of accepted values. * Default 'post_date'. + * @phpstan-return void */ public function __construct($date_query, $default_column = 'post_date') { @@ -38411,6 +38522,7 @@ public static function enqueue_scripts($default_scripts = \false) * For use when the editor is going to be initialized after page load. * * @since 4.8.0 + * @phpstan-return void */ public static function enqueue_default_editor() { @@ -38466,6 +38578,7 @@ public static function wp_mce_translation($mce_locale = '', $json_only = \false) * Even if the website is running on a production environment. * * @since 5.0.0 + * @phpstan-return void */ public static function force_uncompressed_tinymce() { @@ -38476,6 +38589,7 @@ public static function force_uncompressed_tinymce() * @since 4.8.0 * * @global bool $concatenate_scripts + * @phpstan-return void */ public static function print_tinymce_scripts() { @@ -38539,6 +38653,7 @@ public static function wp_link_query($args = array()) * Dialog for internal linking. * * @since 3.1.0 + * @phpstan-return void */ public static function wp_link_dialog() { @@ -38593,6 +38708,7 @@ public function run_shortcode($content) /** * If a post/page was saved, then output JavaScript to make * an Ajax request that will call WP_Embed::cache_oembed(). + * @phpstan-return void */ public function maybe_run_ajax_cache() { @@ -38677,6 +38793,7 @@ public function shortcode($attr, $url = '') * Deletes all oEmbed caches. Unused by core as of 4.0.0. * * @param int $post_id Post ID to delete the caches for. + * @phpstan-return void */ public function delete_oembed_caches($post_id) { @@ -38685,6 +38802,7 @@ public function delete_oembed_caches($post_id) * Triggers a caching of all oEmbed results. * * @param int $post_id Post ID to do the caching for. + * @phpstan-return void */ public function cache_oembed($post_id) { @@ -38785,6 +38903,7 @@ class WP_Error * @param string|int $code Error code. * @param string $message Error message. * @param mixed $data Optional. Error data. Default empty string. + * @phpstan-return void */ public function __construct($code = '', $message = '', $data = '') { @@ -38962,6 +39081,7 @@ class WP_Fatal_Error_Handler * This method is registered via `register_shutdown_function()`. * * @since 5.2.0 + * @phpstan-return void */ public function handle() { @@ -39004,6 +39124,7 @@ protected function should_handle_error($error) * * @param array $error Error information retrieved from `error_get_last()`. * @param true|WP_Error $handled Whether Recovery Mode handled the fatal error. + * @phpstan-return void */ protected function display_error_template($error, $handled) { @@ -39245,6 +39366,7 @@ public function has_filters() * @since 4.7.0 * * @param int|false $priority Optional. The priority number to remove. Default false. + * @phpstan-return void */ public function remove_all_filters($priority = \false) { @@ -39552,6 +39674,7 @@ class WP_Http_Cookie * port?: int|string, * host_only?: bool, * } $data + * @phpstan-return void */ public function __construct($data, $requested_url = '') { @@ -42495,6 +42618,7 @@ class WP_Meta_Query * Default is 'CHAR'. * } * } + * @phpstan-return void */ public function __construct($meta_query = \false) { @@ -46498,6 +46622,7 @@ public function generate_url() * @global string $pagenow The filename of the current screen. * * @param int $ttl Number of seconds the link should be valid for. + * @phpstan-return void */ public function handle_begin_link($ttl) { @@ -46530,6 +46655,7 @@ public function __construct() * Initialize recovery mode for the current request. * * @since 5.2.0 + * @phpstan-return void */ public function initialize() { @@ -46597,6 +46723,7 @@ public function exit_recovery_mode() * Handles a request to exit Recovery Mode. * * @since 5.2.0 + * @phpstan-return void */ public function handle_exit_recovery_mode() { @@ -47534,6 +47661,7 @@ public function remove_permastruct($name) * @since 2.0.1 * * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). + * @phpstan-return void */ public function flush_rules($hard = \true) { @@ -47826,6 +47954,7 @@ public function add_role($role, $display_name, $capabilities = array()) * @since 2.0.0 * * @param string $role Role name. + * @phpstan-return void */ public function remove_role($role) { @@ -47839,6 +47968,7 @@ public function remove_role($role) * @param string $cap Capability name. * @param bool $grant Optional. Whether role is capable of performing capability. * Default true. + * @phpstan-return void */ public function add_cap($role, $cap, $grant = \true) { @@ -47850,6 +47980,7 @@ public function add_cap($role, $cap, $grant = \true) * * @param string $role Role name. * @param string $cap Capability name. + * @phpstan-return void */ public function remove_cap($role, $cap) { @@ -47890,6 +48021,7 @@ public function is_role($role) * Initializes all of the available roles. * * @since 4.9.0 + * @phpstan-return void */ public function init_roles() { @@ -47902,6 +48034,7 @@ public function init_roles() * @global wpdb $wpdb WordPress database abstraction object. * * @param int $site_id Site ID to initialize roles for. Default is the current site. + * @phpstan-return void */ public function for_site($site_id = \null) { @@ -49629,6 +49762,7 @@ protected function find_compatible_table_alias($clause, $parent_query) * @param string $resulting_field The resulting field. Accepts 'slug', 'name', 'term_taxonomy_id', * or 'term_id'. Default 'term_id'. * @phpstan-param 'slug'|'name'|'term_taxonomy_id'|'term_id' $resulting_field + * @phpstan-return void */ public function transform_query(&$query, $resulting_field) { @@ -52590,6 +52724,7 @@ final class WP_Theme implements \ArrayAccess * @param string $theme_dir Directory of the theme within the theme_root. * @param string $theme_root Theme root. * @param WP_Theme|null $_child If this theme is a parent theme, the child may be passed for validation purposes. + * @phpstan-return void */ public function __construct($theme_dir, $theme_root, $_child = \null) { @@ -53030,6 +53165,7 @@ public static function get_allowed_on_site($blog_id = \null) * @since 4.6.0 * * @param string|string[] $stylesheets Stylesheet name or array of stylesheet names. + * @phpstan-return void */ public static function network_enable_theme($stylesheets) { @@ -53040,6 +53176,7 @@ public static function network_enable_theme($stylesheets) * @since 4.6.0 * * @param string|string[] $stylesheets Stylesheet name or array of stylesheet names. + * @phpstan-return void */ public static function network_disable_theme($stylesheets) { @@ -53430,6 +53567,7 @@ public function prepare_query($query = array()) * @since 3.1.0 * * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ public function query() { @@ -53785,6 +53923,7 @@ class WP_User * @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB. * @param string $name Optional. User's username * @param int $site_id Optional Site ID, defaults to current site. + * @phpstan-return void */ public function __construct($id = 0, $name = '', $site_id = '') { @@ -53848,6 +53987,7 @@ public function __get($key) * * @param string $key User meta key. * @param mixed $value User meta value. + * @phpstan-return void */ public function __set($key, $value) { @@ -53962,6 +54102,7 @@ public function get_role_caps() * @since 2.0.0 * * @param string $role Role name. + * @phpstan-return void */ public function add_role($role) { @@ -53972,6 +54113,7 @@ public function add_role($role) * @since 2.0.0 * * @param string $role Role name. + * @phpstan-return void */ public function remove_role($role) { @@ -53986,6 +54128,7 @@ public function remove_role($role) * @since 2.0.0 * * @param string $role Role name. + * @phpstan-return void */ public function set_role($role) { @@ -54042,6 +54185,7 @@ public function add_cap($cap, $grant = \true) * @since 2.0.0 * * @param string $cap Capability name. + * @phpstan-return void */ public function remove_cap($cap) { @@ -54534,6 +54678,7 @@ public function is_preview() * @phpstan-param int|array{ * number?: int, * } $widget_args + * @phpstan-return void */ public function display_callback($args, $widget_args = 1) { @@ -54546,6 +54691,7 @@ public function display_callback($args, $widget_args = 1) * @global array $wp_registered_widgets * * @param int $deprecated Not used. + * @phpstan-return void */ public function update_callback($deprecated = 1) { @@ -57182,6 +57328,7 @@ public function query_posts() * @since 2.0.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ public function handle_404() { @@ -57766,6 +57913,7 @@ class wpdb * @param string $dbpassword Database password. * @param string $dbname Database name. * @param string $dbhost Database host. + * @phpstan-return void */ public function __construct($dbuser, $dbpassword, $dbname, $dbhost) { @@ -57788,6 +57936,7 @@ public function __get($name) * * @param string $name The private member to set. * @param mixed $value The value to set. + * @phpstan-return void */ public function __set($name, $value) { @@ -57864,6 +58013,7 @@ public function set_charset($dbh, $charset = \null, $collate = \null) * @since 3.9.0 * * @param array $modes Optional. A list of SQL modes to set. Default empty array. + * @phpstan-return void */ public function set_sql_mode($modes = array()) { @@ -58185,6 +58335,7 @@ public function suppress_errors($suppress = \true) * Kills cached query results. * * @since 0.71 + * @phpstan-return void */ public function flush() { @@ -58724,6 +58875,7 @@ protected function get_table_from_query($query) * Loads the column metadata from the last query. * * @since 3.5.0 + * @phpstan-return void */ protected function load_col_info() { @@ -59838,6 +59990,7 @@ public function enqueue() } /** * @global Custom_Image_Header $custom_image_header + * @phpstan-return void */ public function prepare_control() { @@ -60286,6 +60439,7 @@ protected function get_type_label($item) * @since 4.3.0 * * @see WP_Customize_Nav_Menu_Item_Setting::value() + * @phpstan-return void */ protected function populate_value() { @@ -60376,6 +60530,7 @@ public function sanitize($value) * entirely. See WP_Customize_Nav_Menu_Item_Setting::$default for what the value * should consist of. * @return null|void + * @phpstan-return void */ protected function update($value) { @@ -60441,6 +60596,7 @@ public function to_json() * * @since 4.3.0 * @since 4.9.0 Added a button to create menus. + * @phpstan-return void */ public function render_content() { @@ -60828,6 +60984,7 @@ public function sanitize($value) * parent?: int, * auto_add?: bool, * } $value + * @phpstan-return void */ protected function update($value) { @@ -61431,6 +61588,7 @@ public function handle_error($errno, $errstr, $errfile = \null, $errline = \null * Handles the Ajax request to return the rendered partials for the requested placements. * * @since 4.5.0 + * @phpstan-return void */ public function handle_render_partials_request() { @@ -62844,6 +63002,7 @@ class Translation_Entry * references?: array, * flags?: array, * } $args + * @phpstan-return void */ public function __construct($args = array()) { @@ -64208,6 +64367,7 @@ protected function parse_json_params() * natively by PHP. In PHP 5.x, only POST has these parsed automatically. * * @since 4.4.0 + * @phpstan-return void */ protected function parse_body_params() { @@ -64411,6 +64571,7 @@ public function add_link($rel, $href, $attributes = array()) * @param string $rel Link relation. Either an IANA registered type, or an absolute URL. * @param string $href Optional. Only remove links for the relation matching the given href. * Default null. + * @phpstan-return void */ public function remove_link($rel, $href = \null) { @@ -72895,6 +73056,7 @@ public function __construct() * by this method, in order to properly send 404s. * * @since 5.5.0 + * @phpstan-return void */ public function init() { @@ -72931,6 +73093,7 @@ public function register_rewrites() * @since 5.5.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ public function render_sitemaps() { @@ -73675,6 +73838,7 @@ final class WP_Style_Engine * otherwise a concatenated string of properties and values. * @param string[] $css_declarations An associative array of CSS definitions, * e.g. `array( "$property" => "$value", "$property" => "$value" )`. + * @phpstan-return void */ public static function store_css_rule($store_name, $css_selector, $css_declarations) { @@ -73803,6 +73967,7 @@ public function __construct() * @param array $args Display arguments including 'before_title', 'after_title', * 'before_widget', and 'after_widget'. * @param array $instance Settings for the current Navigation Menu widget instance. + * @phpstan-return void */ public function widget($args, $instance) { @@ -74139,6 +74304,7 @@ public function __construct() * * @param int $number Optional. The unique order number of this widget instance * compared to other instances of the same class. Default -1. + * @phpstan-return void */ public function _register_one($number = -1) { @@ -74358,6 +74524,7 @@ public function __construct($id_base, $name, $widget_options = array(), $control * * @param int $number Optional. The unique order number of this widget instance * compared to other instances of the same class. Default -1. + * @phpstan-return void */ public function _register_one($number = -1) { @@ -74410,6 +74577,7 @@ public function sanitize_token_list($tokens) * * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget. * @param array $instance Saved setting from the database. + * @phpstan-return void */ public function widget($args, $instance) { @@ -74737,6 +74905,7 @@ public function get_instance_schema() * @since 4.8.0 * * @param array $instance Widget instance props. + * @phpstan-return void */ public function render_media($instance) { @@ -74803,6 +74972,7 @@ public function get_instance_schema() * @since 4.8.0 * * @param array $instance Widget instance props. + * @phpstan-return void */ public function render_media($instance) { @@ -74998,6 +75168,7 @@ public function __construct() * Outputs the default styles for the Recent Comments widget. * * @since 2.8.0 + * @phpstan-return void */ public function recent_comments_style() { @@ -75082,6 +75253,7 @@ public function __construct() * @param array $args Display arguments including 'before_title', 'after_title', * 'before_widget', and 'after_widget'. * @param array $instance Settings for the current Recent Posts widget instance. + * @phpstan-return void */ public function widget($args, $instance) { @@ -75142,6 +75314,7 @@ public function __construct() * @param array $args Display arguments including 'before_title', 'after_title', * 'before_widget', and 'after_widget'. * @param array $instance Settings for the current RSS widget instance. + * @phpstan-return void */ public function widget($args, $instance) { @@ -75262,6 +75435,7 @@ public function __construct() * @param array $args Display arguments including 'before_title', 'after_title', * 'before_widget', and 'after_widget'. * @param array $instance Settings for the current Tag Cloud widget instance. + * @phpstan-return void */ public function widget($args, $instance) { @@ -75337,6 +75511,7 @@ public function __construct() * * @param int $number Optional. The unique order number of this widget instance * compared to other instances of the same class. Default -1. + * @phpstan-return void */ public function _register_one($number = -1) { @@ -75499,6 +75674,7 @@ function export_add_js() * @since 3.1.0 * * @param string $post_type The post type. Default 'post'. + * @phpstan-return void */ function export_date_options($post_type = 'post') { @@ -76631,6 +76807,7 @@ function wp_update_link($linkdata) * @access private * * @global string $pagenow The filename of the current screen. + * @phpstan-return void */ function wp_link_manager_disabled_message() { @@ -76876,6 +77053,7 @@ function _wp_credits_build_object_link(&$data) * @since 5.3.0 * * @param array $group_data The current contributor group. + * @phpstan-return void */ function wp_credits_section_title($group_data = array()) { @@ -76887,6 +77065,7 @@ function wp_credits_section_title($group_data = array()) * * @param array $credits The credits groups returned from the API. * @param string $slug The current group to display. + * @phpstan-return void */ function wp_credits_section_list($credits = array(), $slug = '') { @@ -76983,6 +77162,7 @@ function wp_network_dashboard_right_now() * @global int $post_ID * * @param string|false $error_msg Optional. Error message. Default false. + * @phpstan-return void */ function wp_dashboard_quick_press($error_msg = \false) { @@ -76993,6 +77173,7 @@ function wp_dashboard_quick_press($error_msg = \false) * @since 2.7.0 * * @param WP_Post[]|false $drafts Optional. Array of posts to display. Default false. + * @phpstan-return void */ function wp_dashboard_recent_drafts($drafts = \false) { @@ -77210,6 +77391,7 @@ function wp_check_browser_version() * Displays the PHP update nag. * * @since 5.1.0 + * @phpstan-return void */ function wp_dashboard_php_nag() { @@ -78680,6 +78862,7 @@ function request_filesystem_credentials($form_post, $type = '', $error = \false, * Prints the filesystem credentials modal when needed. * * @since 4.2.0 + * @phpstan-return void */ function wp_print_request_filesystem_credentials_modal() { @@ -78716,6 +78899,7 @@ function wp_opcache_invalidate($filepath, $force = \false) * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. * * @param string $dir The path to the directory for which the opcode cache is to be cleared. + * @phpstan-return void */ function wp_opcache_invalidate_directory($dir) { @@ -79645,6 +79829,7 @@ function media_upload_header() * @global bool $is_opera * * @param array $errors + * @phpstan-return void */ function media_upload_form($errors = \null) { @@ -79836,6 +80021,7 @@ function wp_get_media_creation_timestamp($metadata) * @param string $action Optional. Attach/detach action. Accepts 'attach' or 'detach'. * Default 'attach'. * @phpstan-param 'attach'|'detach' $action + * @phpstan-return void */ function wp_media_attach_action($parent_id, $action = 'attach') { @@ -80377,6 +80563,7 @@ function wp_print_plugin_file_tree($tree, $label = '', $level = 2, $size = 1, $i * * @param string $old_value * @param string $value + * @phpstan-return void */ function update_home_siteurl($old_value, $value) { @@ -80418,6 +80605,7 @@ function wp_doc_link_parse($content) * Saves option for number of rows when listing posts, pages, comments, etc. * * @since 2.8.0 + * @phpstan-return void */ function set_screen_options() { @@ -80490,6 +80678,7 @@ function wp_color_scheme_settings() * Displays the viewport meta in the admin. * * @since 5.5.0 + * @phpstan-return void */ function wp_admin_viewport_meta() { @@ -80601,6 +80790,7 @@ function heartbeat_autosave($response, $data) * put it in the admin header, and change the current URL to match. * * @since 4.2.0 + * @phpstan-return void */ function wp_admin_canonical_url() { @@ -80634,6 +80824,7 @@ function wp_page_reload_on_back_button_js() * * @param string $old_value The old site admin email address. * @param string $value The proposed new site admin email address. + * @phpstan-return void */ function update_option_new_admin_email($old_value, $value) { @@ -80913,6 +81104,7 @@ function format_code_lang($code = '') * * @since 3.2.0 * @access private + * @phpstan-return void */ function _access_denied_splash() { @@ -81067,6 +81259,7 @@ function get_site_screen_help_sidebar_content() * @since 3.0.0 * * @param array $request The unsanitized request values. + * @phpstan-return void */ function _wp_ajax_menu_quick_search($request = array()) { @@ -81085,6 +81278,7 @@ function wp_nav_menu_setup() * @since 3.0.0 * * @global array $wp_meta_boxes + * @phpstan-return void */ function wp_initial_nav_menu_meta_boxes() { @@ -81093,6 +81287,7 @@ function wp_initial_nav_menu_meta_boxes() * Creates meta boxes for any post type menu item.. * * @since 3.0.0 + * @phpstan-return void */ function wp_nav_menu_post_type_meta_boxes() { @@ -81101,6 +81296,7 @@ function wp_nav_menu_post_type_meta_boxes() * Creates meta boxes for any taxonomy menu item. * * @since 3.0.0 + * @phpstan-return void */ function wp_nav_menu_taxonomy_meta_boxes() { @@ -81154,6 +81350,7 @@ function wp_nav_menu_item_link_meta_box() * callback?: callable, * args?: WP_Post_Type, * } $box + * @phpstan-return void */ function wp_nav_menu_item_post_type_meta_box($data_object, $box) { @@ -81180,6 +81377,7 @@ function wp_nav_menu_item_post_type_meta_box($data_object, $box) * callback?: callable, * args?: object, * } $box + * @phpstan-return void */ function wp_nav_menu_item_taxonomy_meta_box($data_object, $box) { @@ -81260,6 +81458,7 @@ function wp_nav_menu_update_menu_items($nav_menu_selected_id, $nav_menu_selected * @ignore * @since 4.5.3 * @access private + * @phpstan-return void */ function _wp_expand_nav_menu_post_data() { @@ -81575,6 +81774,7 @@ function install_plugins_favorites_form() * @since 2.7.0 * * @global WP_List_Table $wp_list_table + * @phpstan-return void */ function display_plugins_table() { @@ -81610,6 +81810,7 @@ function install_plugin_install_status($api, $loop = \false) * @since 2.7.0 * * @global string $tab + * @phpstan-return void */ function install_plugin_information() { @@ -82598,6 +82799,7 @@ function plugin_sandbox_scrape($plugin) * @param string $plugin_name The name of the plugin or theme that is suggesting content * for the site's privacy policy. * @param string $policy_text The suggested content for inclusion in the policy. + * @phpstan-return void */ function wp_add_privacy_policy_content($plugin_name, $policy_text) { @@ -82656,6 +82858,7 @@ function resume_plugin($plugin, $redirect = '') * @since 5.2.0 * * @global string $pagenow The filename of the current screen. + * @phpstan-return void */ function paused_plugins_notice() { @@ -82671,6 +82874,7 @@ function paused_plugins_notice() * * @global string $pagenow The filename of the current screen. * @global string $wp_version The WordPress version string. + * @phpstan-return void */ function deactivated_plugins_notice() { @@ -83049,6 +83253,7 @@ function wp_set_post_lock($post) * Outputs the HTML for the notice to say that someone else is editing or has taken over editing of this post. * * @since 2.8.5 + * @phpstan-return void */ function _admin_notice_post_locked() { @@ -83183,6 +83388,7 @@ function _disable_block_editor_for_navigation_post_type($value, $post_type) * @access private * * @param WP_Post $post An instance of WP_Post class. + * @phpstan-return void */ function _disable_content_editor_for_navigation_post_type($post) { @@ -83198,6 +83404,7 @@ function _disable_content_editor_for_navigation_post_type($post) * @see _disable_content_editor_for_navigation_post_type * * @param WP_Post $post An instance of WP_Post class. + * @phpstan-return void */ function _enable_content_editor_for_navigation_post_type($post) { @@ -83550,6 +83757,7 @@ function populate_network_meta($network_id, array $meta = array()) * * @param int $site_id Site ID to populate meta for. * @param array $meta Optional. Custom meta $key => $value pairs to use. Default empty array. + * @phpstan-return void */ function populate_site_meta($site_id, array $meta = array()) { @@ -83590,6 +83798,7 @@ function get_hidden_columns($screen) * @global array $wp_meta_boxes * * @param WP_Screen $screen + * @phpstan-return void */ function meta_box_prefs($screen) { @@ -83612,6 +83821,7 @@ function get_hidden_meta_boxes($screen) * * @param string $option An option name. * @param mixed $args Option-dependent arguments. + * @phpstan-return void */ function add_screen_option($option, $args = array()) { @@ -83898,6 +84108,7 @@ function wp_popular_terms_checklist($taxonomy, $default_term = 0, $number = 10, * @since 2.5.1 * * @param int $link_id Optional. The link ID. Default 0. + * @phpstan-return void */ function wp_link_category_checklist($link_id = 0) { @@ -83908,6 +84119,7 @@ function wp_link_category_checklist($link_id = 0) * @since 2.7.0 * * @param WP_Post $post Post object. + * @phpstan-return void */ function get_inline_data($post) { @@ -83924,6 +84136,7 @@ function get_inline_data($post) * @param string $mode Optional. If set to 'single', will use WP_Post_Comments_List_Table, * otherwise WP_Comments_List_Table. Default 'single'. * @param bool $table_row Optional. Whether to use a table instead of a div element. Default true. + * @phpstan-return void */ function wp_comment_reply($position = 1, $checkbox = \false, $mode = 'single', $table_row = \true) { @@ -83942,6 +84155,7 @@ function wp_comment_trashnotice() * @since 1.2.0 * * @param array[] $meta An array of meta data arrays keyed on 'meta_key' and 'meta_value'. + * @phpstan-return void */ function list_meta($meta) { @@ -83983,6 +84197,7 @@ function meta_form($post = \null) * @param int $tab_index The tabindex attribute to add. Default 0. * @param int|bool $multi Optional. Whether the additional fields and buttons should be added. * Default 0|false. + * @phpstan-return void */ function touch_time($edit = 1, $for_post = 1, $tab_index = 0, $multi = 0) { @@ -84067,6 +84282,7 @@ function wp_import_upload_form($action) * of the box array (which is the second parameter passed * to your callback). Default null. * @phpstan-param 'high'|'core'|'default'|'low' $priority + * @phpstan-return void */ function add_meta_box($id, $title, $callback, $screen = \null, $context = 'advanced', $priority = 'default', $callback_args = \null) { @@ -84146,6 +84362,7 @@ function do_meta_boxes($screen, $context, $data_object) * include 'normal', 'side', and 'advanced'. Comments screen contexts * include 'normal' and 'side'. Menus meta boxes (accordion sections) * all use the 'side' context. + * @phpstan-return void */ function remove_meta_box($id, $screen, $context) { @@ -84262,6 +84479,7 @@ function add_settings_field($id, $title, $callback, $page, $section = 'default', * @since 2.7.0 * * @param string $page The slug name of the page whose settings sections you want to output. + * @phpstan-return void */ function do_settings_sections($page) { @@ -84279,6 +84497,7 @@ function do_settings_sections($page) * * @param string $page Slug title of the admin page whose settings fields you want to show. * @param string $section Slug title of the settings section whose fields you want to show. + * @phpstan-return void */ function do_settings_fields($page, $section) { @@ -84384,6 +84603,7 @@ function get_settings_errors($setting = '', $sanitize = \false) * @param bool $sanitize Whether to re-sanitize the setting value before returning errors. * @param bool $hide_on_update If set to true errors will not be shown if the settings page has * already been submitted. + * @phpstan-return void */ function settings_errors($setting = '', $sanitize = \false, $hide_on_update = \false) { @@ -85024,6 +85244,7 @@ function resume_theme($theme, $redirect = '') * @since 5.2.0 * * @global string $pagenow The filename of the current screen. + * @phpstan-return void */ function paused_themes_notice() { @@ -85173,6 +85394,7 @@ function update_core($from, $to) * @global string $wp_version The WordPress version string. * * @param string $to Path to old WordPress installation. + * @phpstan-return void */ function _preload_old_requests_classes_and_interfaces($to) { @@ -85189,6 +85411,7 @@ function _preload_old_requests_classes_and_interfaces($to) * @global string $action * * @param string $new_version + * @phpstan-return void */ function _redirect_to_about_wordpress($new_version) { @@ -85364,6 +85587,7 @@ function get_plugin_updates() * Adds a callback to display update information for plugins with updates available. * * @since 2.9.0 + * @phpstan-return void */ function wp_plugin_update_rows() { @@ -85394,6 +85618,7 @@ function get_theme_updates() * Adds a callback to display update information for themes with updates available. * * @since 3.1.0 + * @phpstan-return void */ function wp_theme_update_rows() { @@ -85475,6 +85700,7 @@ function wp_print_update_row_templates() * Displays a notice when the user is in recovery mode. * * @since 5.2.0 + * @phpstan-return void */ function wp_recovery_mode_nag() { @@ -85607,6 +85833,7 @@ function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) * @global int $wp_current_db_version The old (current) database version. * @global int $wp_db_version The new database version. * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ function wp_upgrade() { @@ -85622,6 +85849,7 @@ function wp_upgrade() * * @global int $wp_current_db_version The old (current) database version. * @global int $wp_db_version The new database version. + * @phpstan-return void */ function upgrade_all() { @@ -85829,6 +86057,7 @@ function upgrade_300() * @global wpdb $wpdb WordPress database abstraction object. * @global array $wp_registered_widgets * @global array $sidebars_widgets + * @phpstan-return void */ function upgrade_330() { @@ -85929,6 +86158,7 @@ function upgrade_430() * @since 4.3.0 * * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ function upgrade_430_fix_comments() { @@ -86460,6 +86690,7 @@ function wp_revoke_user($id) * @global int $user_ID * * @param false $errors Deprecated. + * @phpstan-return void */ function default_password_nag_handler($errors = \false) { @@ -86469,6 +86700,7 @@ function default_password_nag_handler($errors = \false) * * @param int $user_ID * @param WP_User $old_data + * @phpstan-return void */ function default_password_nag_edit_user($user_ID, $old_data) { @@ -86477,6 +86709,7 @@ function default_password_nag_edit_user($user_ID, $old_data) * @since 2.8.0 * * @global string $pagenow The filename of the current screen. + * @phpstan-return void */ function default_password_nag() { @@ -86731,6 +86964,7 @@ function _add_themes_utility_last() * * @access private * @since 5.9.0 + * @phpstan-return void */ function _add_plugin_file_editor_to_tools() { @@ -86812,6 +87046,7 @@ function core_auto_updates_settings() * Display the upgrade plugins form. * * @since 2.9.0 + * @phpstan-return void */ function list_plugin_updates() { @@ -86820,6 +87055,7 @@ function list_plugin_updates() * Display the upgrade themes form. * * @since 2.9.0 + * @phpstan-return void */ function list_theme_updates() { @@ -86828,6 +87064,7 @@ function list_theme_updates() * Display the update translations form. * * @since 3.7.0 + * @phpstan-return void */ function list_translation_updates() { @@ -86840,6 +87077,7 @@ function list_translation_updates() * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. * * @param bool $reinstall + * @phpstan-return void */ function do_core_upgrade($reinstall = \false) { @@ -86848,6 +87086,7 @@ function do_core_upgrade($reinstall = \false) * Dismiss a core update. * * @since 2.7.0 + * @phpstan-return void */ function do_dismiss_core_update() { @@ -86856,6 +87095,7 @@ function do_dismiss_core_update() * Undismiss a core update. * * @since 2.7.0 + * @phpstan-return void */ function do_undismiss_core_update() { @@ -86916,6 +87156,7 @@ function _wp_admin_bar_init() * @since 5.4.0 Called on 'wp_body_open' action first, with 'wp_footer' as a fallback. * * @global WP_Admin_Bar $wp_admin_bar + * @phpstan-return void */ function wp_admin_bar_render() { @@ -86946,6 +87187,7 @@ function wp_admin_bar_sidebar_toggle($wp_admin_bar) * @since 3.3.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_my_account_item($wp_admin_bar) { @@ -86956,6 +87198,7 @@ function wp_admin_bar_my_account_item($wp_admin_bar) * @since 3.1.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_my_account_menu($wp_admin_bar) { @@ -86966,6 +87209,7 @@ function wp_admin_bar_my_account_menu($wp_admin_bar) * @since 3.3.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_site_menu($wp_admin_bar) { @@ -86979,6 +87223,7 @@ function wp_admin_bar_site_menu($wp_admin_bar) * @since 6.3.0 Added `$_wp_current_template_id` global for editing of current template directly from the admin bar. * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_edit_site_menu($wp_admin_bar) { @@ -86990,6 +87235,7 @@ function wp_admin_bar_edit_site_menu($wp_admin_bar) * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. * @global WP_Customize_Manager $wp_customize + * @phpstan-return void */ function wp_admin_bar_customize_menu($wp_admin_bar) { @@ -87000,6 +87246,7 @@ function wp_admin_bar_customize_menu($wp_admin_bar) * @since 3.1.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_my_sites_menu($wp_admin_bar) { @@ -87010,6 +87257,7 @@ function wp_admin_bar_my_sites_menu($wp_admin_bar) * @since 3.1.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_shortlink_menu($wp_admin_bar) { @@ -87027,6 +87275,7 @@ function wp_admin_bar_shortlink_menu($wp_admin_bar) * @global int $post_id The ID of the post when editing comments for a single post. * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_edit_menu($wp_admin_bar) { @@ -87037,6 +87286,7 @@ function wp_admin_bar_edit_menu($wp_admin_bar) * @since 3.1.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_new_content_menu($wp_admin_bar) { @@ -87047,6 +87297,7 @@ function wp_admin_bar_new_content_menu($wp_admin_bar) * @since 3.1.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_comments_menu($wp_admin_bar) { @@ -87057,6 +87308,7 @@ function wp_admin_bar_comments_menu($wp_admin_bar) * @since 3.1.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_appearance_menu($wp_admin_bar) { @@ -87067,6 +87319,7 @@ function wp_admin_bar_appearance_menu($wp_admin_bar) * @since 3.1.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_updates_menu($wp_admin_bar) { @@ -87077,6 +87330,7 @@ function wp_admin_bar_updates_menu($wp_admin_bar) * @since 3.3.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_search_menu($wp_admin_bar) { @@ -87087,6 +87341,7 @@ function wp_admin_bar_search_menu($wp_admin_bar) * @since 5.2.0 * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. + * @phpstan-return void */ function wp_admin_bar_recovery_mode_menu($wp_admin_bar) { @@ -87598,6 +87853,7 @@ function get_block_editor_settings(array $custom_settings, $block_editor_context * * @param (string|string[])[] $preload_paths List of paths to preload. * @param WP_Block_Editor_Context $block_editor_context The current block editor context. + * @phpstan-return void */ function block_editor_rest_api_preload(array $preload_paths, $block_editor_context) { @@ -87658,6 +87914,7 @@ function wp_normalize_remote_block_pattern($pattern) * @since 6.3.0 Add 'pattern-directory/core' to the pattern's 'source'. * * @param WP_Screen $deprecated Unused. Formerly the screen that the current request was triggered from. + * @phpstan-return void */ function _load_remote_block_patterns($deprecated = \null) { @@ -87669,6 +87926,7 @@ function _load_remote_block_patterns($deprecated = \null) * @since 6.2.0 Normalized the pattern from the API (snake_case) to the * format expected by `register_block_pattern()` (camelCase). * @since 6.3.0 Add 'pattern-directory/featured' to the pattern's 'source'. + * @phpstan-return void */ function _load_remote_featured_patterns() { @@ -87682,6 +87940,7 @@ function _load_remote_featured_patterns() * format expected by `register_block_pattern()` (camelCase). * @since 6.3.0 Add 'pattern-directory/theme' to the pattern's 'source'. * @access private + * @phpstan-return void */ function _register_remote_theme_patterns() { @@ -87887,6 +88146,7 @@ function wp_apply_custom_classname_support($block_type, $block_attributes) * @access private * * @param WP_Block_Type $block_type Block Type. + * @phpstan-return void */ function wp_register_dimensions_support($block_type) { @@ -88181,6 +88441,7 @@ function _wp_add_block_level_preset_styles($pre_render, $block) * @access private * * @param WP_Block_Type $block_type Block Type. + * @phpstan-return void */ function wp_register_shadow_support($block_type) { @@ -88248,6 +88509,7 @@ function wp_apply_spacing_support($block_type, $block_attributes) * @access private * * @param WP_Block_Type $block_type Block Type. + * @phpstan-return void */ function wp_register_typography_support($block_type) { @@ -88710,6 +88972,7 @@ function get_block_file_template($id, $template_type = 'wp_template') * @since 5.9.0 * * @param string $part The block template part to print. Use "header" or "footer". + * @phpstan-return void */ function block_template_part($part) { @@ -88894,6 +89157,7 @@ function _block_template_render_without_post_block_context($context) * @since 5.9.0 * * @param WP_Query $wp_query Current WP_Query instance, passed by reference. + * @phpstan-return void */ function _resolve_template_for_new_post($wp_query) { @@ -89667,6 +89931,7 @@ function block_core_calendar_update_has_published_posts() * Handler for updating the has published posts flag when a post is deleted. * * @param int $post_id Deleted post ID. + * @phpstan-return void */ function block_core_calendar_update_has_published_post_on_delete($post_id) { @@ -89677,6 +89942,7 @@ function block_core_calendar_update_has_published_post_on_delete($post_id) * @param string $new_status The status the post is changing to. * @param string $old_status The status the post is changing from. * @param WP_Post $post Post object. + * @phpstan-return void */ function block_core_calendar_update_has_published_post_on_transition_post_status($new_status, $old_status, $post) { @@ -90150,6 +90416,7 @@ function wp_keep_footnotes_revision_id($revision_id) * @global int $wp_temporary_footnote_revision_id The footnote revision ID. * * @param WP_Post $post The post object. + * @phpstan-return void */ function wp_add_footnotes_revisions_to_post_meta($post) { @@ -90198,6 +90465,7 @@ function wp_get_footnotes_from_revision($revision_field, $field, $revision) * @since 6.3.0 * * @param int|array $autosave The autosave ID or array. + * @phpstan-return void */ function _wp_rest_api_autosave_meta($autosave) { @@ -90504,6 +90772,7 @@ function register_block_core_legacy_widget() * Intercepts any request with legacy-widget-preview in the query param and, if * set, renders a page containing a preview of the requested Legacy Widget * block. + * @phpstan-return void */ function handle_legacy_widget_preview_iframe() { @@ -91549,6 +91818,7 @@ function classnames_for_block_core_search($attributes) * @param array $input_styles Current collection of input styles. * * @return void + * @phpstan-return void */ function apply_block_core_search_border_style($attributes, $property, $side, &$wrapper_styles, &$button_styles, &$input_styles) { @@ -91703,12 +91973,14 @@ function _sync_custom_logo_to_site_logo($value) * * @param array $old_value Previous theme mod settings. * @param array $value Updated theme mod settings. + * @phpstan-return void */ function _delete_site_logo_on_remove_custom_logo($old_value, $value) { } /** * Deletes the site logo when all theme mods are being removed. + * @phpstan-return void */ function _delete_site_logo_on_remove_theme_mods() { @@ -92678,6 +92950,7 @@ function redirect_guess_404_permalink() * @since 3.4.0 * * @global WP_Rewrite $wp_rewrite WordPress rewrite component. + * @phpstan-return void */ function wp_redirect_admin_locations() { @@ -93949,6 +94222,7 @@ function _make_cat_compat(&$category) * @since 3.5.0 * * @param string $class Class name. + * @phpstan-return void */ function wp_simplepie_autoload($class) { @@ -94590,6 +94864,7 @@ function trackback_url($deprecated_echo = \true) * @since 0.71 * * @param int|string $deprecated Not used (Was $timezone = 0). + * @phpstan-return void */ function trackback_rdf($deprecated = '') { @@ -94674,6 +94949,7 @@ function wp_comment_form_unfiltered_html_nonce() * @param string $file Optional. The file to load. Default '/comments.php'. * @param bool $separate_comments Optional. Whether to separate the comments by comment type. * Default false. + * @phpstan-return void */ function comments_template($file = '/comments.php', $separate_comments = \false) { @@ -94688,6 +94964,7 @@ function comments_template($file = '/comments.php', $separate_comments = \false) * @param false|string $more Optional. String to display when there are more than one comment. Default false. * @param string $css_class Optional. CSS class to use for comments. Default empty. * @param false|string $none Optional. String to display when comments have been turned off. Default false. + * @phpstan-return void */ function comments_popup_link($zero = \false, $one = \false, $more = \false, $css_class = '', $none = \false) { @@ -94876,6 +95153,7 @@ function comment_id_fields($post = \null) * to their comment. Default true. * @param int|WP_Post|null $post Optional. The post that the comment form is being displayed for. * Defaults to the current global post. + * @phpstan-return void */ function comment_form_title($no_reply_text = \false, $reply_text = \false, $link_to_parent = \true, $post = \null) { @@ -95052,6 +95330,7 @@ function wp_list_comments($args = array(), $comments = \null) * submit_field?: string, * format?: string, * } $args + * @phpstan-return void */ function comment_form($args = array(), $post = \null) { @@ -95390,6 +95669,7 @@ function get_comment_meta($comment_id, $key = '', $single = \false) * @since 6.3.0 * * @param array $comment_ids List of comment IDs. + * @phpstan-return void */ function wp_lazyload_comment_meta(array $comment_ids) { @@ -95429,6 +95709,7 @@ function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = * @param WP_Comment $comment Comment object. * @param WP_User $user Comment author's user object. The user may not exist. * @param bool $cookies_consent Optional. Comment author's consent to store cookies. Default true. + * @phpstan-return void */ function wp_set_comment_cookies($comment, $user, $cookies_consent = \true) { @@ -96141,6 +96422,7 @@ function generic_ping($post_id = 0) * * @param string $content Post content to check for links. If empty will retrieve from post. * @param int|WP_Post $post Post ID or object. + * @phpstan-return void */ function pingback($content, $post) { @@ -96383,6 +96665,7 @@ function wp_cache_set_comments_last_changed() * @since 5.5.0 * * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ function _wp_batch_update_comment_type() { @@ -96943,6 +97226,7 @@ function the_category_head($before = '', $after = '') * @param string $in_same_cat * @param int $limitprev * @param string $excluded_categories + * @phpstan-return void */ function previous_post($format = '%', $previous = 'previous post: ', $title = 'yes', $in_same_cat = 'no', $limitprev = 1, $excluded_categories = '') { @@ -96960,6 +97244,7 @@ function previous_post($format = '%', $previous = 'previous post: ', $title = 'y * @param string $in_same_cat * @param int $limitnext * @param string $excluded_categories + * @phpstan-return void */ function next_post($format = '%', $next = 'next post: ', $title = 'yes', $in_same_cat = 'no', $limitnext = 1, $excluded_categories = '') { @@ -99597,6 +99882,7 @@ function noindex() * @since 3.3.0 * @since 5.3.0 Echo `noindex,nofollow` if search engine visibility is discouraged. * @deprecated 5.7.0 Use wp_robots_no_robots() instead on 'wp_robots' filter. + * @phpstan-return void */ function wp_no_robots() { @@ -100127,6 +100413,7 @@ function wp_get_global_styles_svg_filters() * * @since 5.9.1 * @deprecated 6.3.0 SVG generation is handled on a per-block basis in block supports. + * @phpstan-return void */ function wp_global_styles_render_svg_filters() { @@ -100290,6 +100577,7 @@ function wp_oembed_remove_provider($format) * @since 2.9.0 * * @see wp_embed_register_handler() + * @phpstan-return void */ function wp_maybe_load_embeds() { @@ -100627,6 +100915,7 @@ function _oembed_filter_feed_content($content) * Prints the necessary markup for the embed comments button. * * @since 4.4.0 + * @phpstan-return void */ function print_embed_comments_button() { @@ -100635,6 +100924,7 @@ function print_embed_comments_button() * Prints the necessary markup for the embed sharing button. * * @since 4.4.0 + * @phpstan-return void */ function print_embed_sharing_button() { @@ -100643,6 +100933,7 @@ function print_embed_sharing_button() * Prints the necessary markup for the embed sharing dialog. * * @since 4.4.0 + * @phpstan-return void */ function print_embed_sharing_dialog() { @@ -100711,6 +101002,7 @@ function wp_get_extension_error_description($error) * The handler will only be registered if {@see wp_is_fatal_error_handler_enabled()} returns true. * * @since 5.2.0 + * @phpstan-return void */ function wp_register_fatal_error_handler() { @@ -100990,6 +101282,7 @@ function html_type_rss() * attributes. * * @since 1.5.0 + * @phpstan-return void */ function rss_enclosure() { @@ -101006,6 +101299,7 @@ function rss_enclosure() * enclosure(s) consist of link HTML tag(s) with a URI and other attributes. * * @since 2.2.0 + * @phpstan-return void */ function atom_enclosure() { @@ -101175,6 +101469,7 @@ function wptexturize_primes($haystack, $needle, $prime, $open_quote, $close_quot * @param string $text Text to check. Must be a tag like `` or `[shortcode]`. * @param string[] $stack Array of open tag elements. * @param string[] $disabled_elements Array of tag names to match against. Spaces are not allowed in tag names. + * @phpstan-return void */ function _wptexturize_pushpop_element($text, &$stack, $disabled_elements) { @@ -103142,6 +103437,7 @@ function wp_spaces_regexp() * Prints the important emoji-related styles. * * @since 4.2.0 + * @phpstan-return void */ function print_emoji_styles() { @@ -103150,6 +103446,7 @@ function print_emoji_styles() * Prints the inline Emoji detection script if it is not already printed. * * @since 4.2.0 + * @phpstan-return void */ function print_emoji_detection_script() { @@ -103827,6 +104124,7 @@ function get_status_header_desc($code) * @param int $code HTTP status code. * @param string $description Optional. A custom description for the HTTP status. * Defaults to the result of get_status_header_desc() for the given code. + * @phpstan-return void */ function status_header($code, $description = '') { @@ -103856,6 +104154,7 @@ function wp_get_nocache_headers() * @since 2.0.0 * * @see wp_get_nocache_headers() + * @phpstan-return void */ function nocache_headers() { @@ -104968,6 +105267,7 @@ function _mce_set_direction($mce_init) * @global array $wp_smiliessearch * * @since 2.2.0 + * @phpstan-return void */ function smilies_init() { @@ -105108,6 +105408,7 @@ function _wp_array_get($input_array, $path, $default_value = \null) * @param array $input_array An array that we want to mutate to include a specific value in a path. * @param array $path An array of keys describing the path that we want to mutate. * @param mixed $value The value that will be set. + * @phpstan-return void */ function _wp_array_set(&$input_array, $path, $value = \null) { @@ -105257,6 +105558,7 @@ function wp_list_sort($input_list, $orderby = array(), $order = 'ASC', $preserve * If it hasn't, then it will load the widgets library and run an action hook. * * @since 2.2.0 + * @phpstan-return void */ function wp_maybe_load_widgets() { @@ -105268,6 +105570,7 @@ function wp_maybe_load_widgets() * @since 5.9.3 Don't specify menu order when the active theme is a block theme. * * @global array $submenu + * @phpstan-return void */ function wp_widgets_add_menu() { @@ -105987,6 +106290,7 @@ function wp_checkdate($month, $day, $year, $source_date) * for fine-grained control. * * @since 3.6.0 + * @phpstan-return void */ function wp_auth_check_load() { @@ -106071,6 +106375,7 @@ function _canonical_charset($charset) * * @param bool $reset Optional. Whether to reset the encoding back to a previously-set encoding. * Default false. + * @phpstan-return void */ function mbstring_binary_safe_encoding($reset = \false) { @@ -106128,6 +106433,7 @@ function wp_delete_file_from_directory($file, $directory) * @since 4.3.0 * * @global WP_Post $post Global post object. + * @phpstan-return void */ function wp_post_preview_js() { @@ -106234,6 +106540,7 @@ function wp_cache_set_last_changed($group) * @param string $old_email The old site admin email address. * @param string $new_email The new site admin email address. * @param string $option_name The relevant database option name. + * @phpstan-return void */ function wp_site_admin_email_change_notification($old_email, $new_email, $option_name) { @@ -106291,6 +106598,7 @@ function wp_privacy_exports_url() * Schedules a `WP_Cron` job to delete expired export files. * * @since 4.9.6 + * @phpstan-return void */ function wp_schedule_delete_old_privacy_export_files() { @@ -106305,6 +106613,7 @@ function wp_schedule_delete_old_privacy_export_files() * layer of protection. * * @since 4.9.6 + * @phpstan-return void */ function wp_privacy_delete_old_export_files() { @@ -106389,6 +106698,7 @@ function wp_get_direct_php_update_url() * The button is only displayed if a URL is returned by `wp_get_direct_php_update_url()`. * * @since 5.1.1 + * @phpstan-return void */ function wp_direct_php_update_button() { @@ -106488,6 +106798,7 @@ function recurse_dirsize($directory, $exclude = \null, $max_execution_time = \nu * @since 5.9.0 Added input validation with a notice for invalid input. * * @param string $path Full path of a directory or file. + * @phpstan-return void */ function clean_dirsize_cache($path) { @@ -106561,6 +106872,7 @@ function wp_scripts() * @param string $function_name Function name. * @param string $handle Optional. Name of the script or stylesheet that was * registered or enqueued too early. Default empty. + * @phpstan-return void */ function _wp_scripts_maybe_doing_it_wrong($function_name, $handle = '') { @@ -106699,6 +107011,7 @@ function wp_set_script_translations($handle, $domain = 'default', $path = '') * @global string $pagenow The filename of the current screen. * * @param string $handle Name of the script to be removed. + * @phpstan-return void */ function wp_deregister_script($handle) { @@ -107392,6 +107705,7 @@ function wp_get_document_title() * @since 4.1.0 * @since 4.4.0 Improved title output replaced `wp_title()`. * @access private + * @phpstan-return void */ function _wp_render_title_tag() { @@ -107960,6 +108274,7 @@ function get_post_modified_time($format = 'U', $gmt = \false, $post = \null, $tr * @since 0.71 * * @global WP_Locale $wp_locale WordPress date and time locale object. + * @phpstan-return void */ function the_weekday() { @@ -107978,6 +108293,7 @@ function the_weekday() * * @param string $before Optional. Output before the date. Default empty. * @param string $after Optional. Output after the date. Default empty. + * @phpstan-return void */ function the_weekday_date($before = '', $after = '') { @@ -108018,6 +108334,7 @@ function wp_body_open() * @since 2.8.0 * * @param array $args Optional arguments. + * @phpstan-return void */ function feed_links($args = array()) { @@ -108062,6 +108379,7 @@ function wp_strict_cross_origin_referrer() * @since 4.3.0 * * @link https://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#rel-icon HTML5 specification link icon. + * @phpstan-return void */ function wp_site_icon() { @@ -108096,6 +108414,7 @@ function wp_resource_hints() * @link https://web.dev/preload-responsive-images/ * * @since 6.1.0 + * @phpstan-return void */ function wp_preload_resources() { @@ -108504,6 +108823,7 @@ function wp_admin_css_uri($file = 'wp-admin') * @param string $file Optional. Style handle name or file name (without ".css" extension) relative * to wp-admin/. Defaults to 'wp-admin'. * @param bool $force_echo Optional. Force the stylesheet link to be printed rather than enqueued. + * @phpstan-return void */ function wp_admin_css($file = 'wp-admin', $force_echo = \false) { @@ -109511,6 +109831,7 @@ function wp_is_https_supported() * * @since 5.7.0 * @access private + * @phpstan-return void */ function wp_update_https_detection_errors() { @@ -109520,6 +109841,7 @@ function wp_update_https_detection_errors() * * @since 5.7.0 * @access private + * @phpstan-return void */ function wp_schedule_https_detection() { @@ -109613,6 +109935,7 @@ function wp_update_urls_to_https() * * @param mixed $old_url Previous value of the URL option. * @param mixed $new_url New value of the URL option. + * @phpstan-return void */ function wp_update_https_migration_required($old_url, $new_url) { @@ -111720,6 +112043,7 @@ function get_edit_post_link($post = 0, $context = 'display') * @param string $after Optional. Display after edit link. Default empty. * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`. * @param string $css_class Optional. Add custom class to link. Default 'post-edit-link'. + * @phpstan-return void */ function edit_post_link($text = \null, $before = '', $after = '', $post = 0, $css_class = 'post-edit-link') { @@ -111758,6 +112082,7 @@ function get_edit_comment_link($comment_id = 0) * @param string $text Optional. Anchor text. If null, default is 'Edit This'. Default null. * @param string $before Optional. Display before edit link. Default empty. * @param string $after Optional. Display after edit link. Default empty. + * @phpstan-return void */ function edit_comment_link($text = \null, $before = '', $after = '') { @@ -111782,6 +112107,7 @@ function get_edit_bookmark_link($link = 0) * @param string $before Optional. Display before edit link. Default empty. * @param string $after Optional. Display after edit link. Default empty. * @param int $bookmark Optional. Bookmark ID. Default is the current bookmark. + * @phpstan-return void */ function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = \null) { @@ -111899,6 +112225,7 @@ function adjacent_posts_rel_link($title = '%title', $in_same_term = \false, $exc * @since 5.6.0 No longer used in core. * * @see adjacent_posts_rel_link() + * @phpstan-return void */ function adjacent_posts_rel_link_wp_head() { @@ -112898,6 +113225,7 @@ function wp_get_canonical_url($post = \null) * * @since 2.9.0 * @since 4.6.0 Adjusted to use `wp_get_canonical_url()`. + * @phpstan-return void */ function rel_canonical() { @@ -112931,6 +113259,7 @@ function wp_get_shortlink($id = 0, $context = 'post', $allow_slugs = \true) * Attached to the {@see 'wp_head'} action. * * @since 3.0.0 + * @phpstan-return void */ function wp_shortlink_wp_head() { @@ -112941,6 +113270,7 @@ function wp_shortlink_wp_head() * Attached to the {@see 'wp'} action. * * @since 3.0.0 + * @phpstan-return void */ function wp_shortlink_header() { @@ -113218,6 +113548,7 @@ function wp_fix_server_vars() * fill in the proper $_SERVER variables instead. * * @since 5.6.0 + * @phpstan-return void */ function wp_populate_basic_auth_from_authorization_header() { @@ -113310,6 +113641,7 @@ function wp_favicon_request() * * @since 3.0.0 * @access private + * @phpstan-return void */ function wp_maintenance() { @@ -113406,6 +113738,7 @@ function timer_stop($display = 0, $precision = 3) * @since 3.0.0 * @since 5.1.0 `WP_DEBUG_LOG` can be a file path. * @access private + * @phpstan-return void */ function wp_debug_mode() { @@ -113432,6 +113765,7 @@ function wp_set_lang_dir() * @since 2.5.0 * * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ function require_wp_db() { @@ -113486,6 +113820,7 @@ function wp_start_object_cache() * * @since 3.0.0 * @access private + * @phpstan-return void */ function wp_not_installed() { @@ -113770,6 +114105,7 @@ function get_current_network_id() * * @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry. * @global WP_Locale $wp_locale WordPress date and time locale object. + * @phpstan-return void */ function wp_load_translations_early() { @@ -113888,6 +114224,7 @@ function wp_is_file_mod_allowed($context) * Starts scraping edited file errors. * * @since 4.9.0 + * @phpstan-return void */ function wp_start_scraping_edited_file_errors() { @@ -115308,6 +115645,7 @@ function _wp_image_editor_choose($args = array()) * Prints default Plupload arguments. * * @since 3.4.0 + * @phpstan-return void */ function wp_plupload_default_settings() { @@ -115418,6 +115756,7 @@ function wp_prepare_attachment_for_js($attachment) * @phpstan-param array{ * post?: int|WP_Post, * } $args + * @phpstan-return void */ function wp_enqueue_media($args = array()) { @@ -115504,6 +115843,7 @@ function get_post_gallery_images($post = 0) * @since 3.9.0 * * @param WP_Post $attachment Attachment object. + * @phpstan-return void */ function wp_maybe_generate_attachment_metadata($attachment) { @@ -116394,6 +116734,7 @@ function restore_current_blog() * * @param int $new_site_id New site ID. * @param int $old_site_id Old site ID. + * @phpstan-return void */ function wp_switch_roles_and_user($new_site_id, $old_site_id) { @@ -116489,6 +116830,7 @@ function get_last_updated($deprecated = '', $start = 0, $quantity = 40) * @param string $new_status The new post status. * @param string $old_status The old post status. * @param WP_Post $post Post object. + * @phpstan-return void */ function _update_blog_date_on_post_publish($new_status, $old_status, $post) { @@ -116500,6 +116842,7 @@ function _update_blog_date_on_post_publish($new_status, $old_status, $post) * @since 3.4.0 * * @param int $post_id Post ID + * @phpstan-return void */ function _update_blog_date_on_post_delete($post_id) { @@ -116512,6 +116855,7 @@ function _update_blog_date_on_post_delete($post_id) * * @param int $post_id Post ID. * @param WP_Post $post Post object. + * @phpstan-return void */ function _update_posts_count_on_delete($post_id, $post) { @@ -116525,6 +116869,7 @@ function _update_posts_count_on_delete($post_id, $post) * @param string $new_status The status the post is changing to. * @param string $old_status The status the post is changing from. * @param WP_Post $post Post object + * @phpstan-return void */ function _update_posts_count_on_transition_post_status($new_status, $old_status, $post = \null) { @@ -116571,6 +116916,7 @@ function wp_count_sites($network_id = \null) * wp-includes/ms-files.php (wp-content/blogs.php in MU). * * @since 3.0.0 + * @phpstan-return void */ function ms_upload_constants() { @@ -116603,6 +116949,7 @@ function ms_file_constants() * we will have translations loaded and can trigger warnings easily. * * @since 3.0.0 + * @phpstan-return void */ function ms_subdomain_constants() { @@ -117648,6 +117995,7 @@ function maybe_redirect_404() * added, as when a user is invited through the regular WP Add User interface. * * @since MU (3.0.0) + * @phpstan-return void */ function maybe_add_existing_user_to_blog() { @@ -117774,6 +118122,7 @@ function filter_SSL($url) * Schedules update of the network-wide counts for the current network. * * @since 3.1.0 + * @phpstan-return void */ function wp_schedule_update_network_counts() { @@ -117799,6 +118148,7 @@ function wp_update_network_counts($network_id = \null) * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. + * @phpstan-return void */ function wp_maybe_update_network_site_counts($network_id = \null) { @@ -117813,6 +118163,7 @@ function wp_maybe_update_network_site_counts($network_id = \null) * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. + * @phpstan-return void */ function wp_maybe_update_network_user_counts($network_id = \null) { @@ -117925,6 +118276,7 @@ function get_subdirectory_reserved_names() * * @param string $old_value The old network admin email address. * @param string $value The proposed new network admin email address. + * @phpstan-return void */ function update_network_option_new_admin_email($old_value, $value) { @@ -117938,6 +118290,7 @@ function update_network_option_new_admin_email($old_value, $value) * @param string $new_email The new network admin email address. * @param string $old_email The old network admin email address. * @param int $network_id ID of the network. + * @phpstan-return void */ function wp_network_admin_email_change_notification($option_name, $new_email, $old_email, $network_id) { @@ -118074,7 +118427,6 @@ function ms_load_current_site_and_network($domain, $path, $subdomain = \false) * * @param string $domain The requested domain for the error to reference. * @param string $path The requested path for the error to reference. - * @phpstan-return never */ function ms_not_installed($domain, $path) { @@ -118171,6 +118523,7 @@ function get_networks($args = array()) * @global bool $_wp_suspend_cache_invalidation * * @param int|array $ids Network ID or an array of network IDs to remove from cache. + * @phpstan-return void */ function clean_network_cache($ids) { @@ -118328,6 +118681,7 @@ function _prime_site_caches($ids, $update_meta_cache = \true) * @since 6.3.0 * * @param array $site_ids List of site IDs. + * @phpstan-return void */ function wp_lazyload_site_meta(array $site_ids) { @@ -118340,6 +118694,7 @@ function wp_lazyload_site_meta(array $site_ids) * * @param array $sites Array of site objects. * @param bool $update_meta_cache Whether to update site meta cache. Default true. + * @phpstan-return void */ function update_site_cache($sites, $update_meta_cache = \true) { @@ -118454,6 +118809,7 @@ function wp_normalize_site_data($data) * for the included data. * @param WP_Site|null $old_site The old site object if the data belongs to a site being updated, * or null if it is a new site being inserted. + * @phpstan-return void */ function wp_validate_site_data($errors, $data, $old_site = \null) { @@ -118530,6 +118886,7 @@ function wp_is_site_initialized($site_id) * @global bool $_wp_suspend_cache_invalidation * * @param WP_Site|int $blog The site object or ID to be cleared from cache. + * @phpstan-return void */ function clean_blog_cache($blog) { @@ -118629,6 +118986,7 @@ function delete_site_meta_by_key($meta_key) * @param WP_Site $new_site The site object that has been inserted, updated or deleted. * @param WP_Site|null $old_site Optional. If $new_site has been updated, this must be the previous * state of that site. Default null. + * @phpstan-return void */ function wp_maybe_update_network_site_counts_on_update($new_site, $old_site = \null) { @@ -118665,6 +119023,7 @@ function wp_maybe_clean_new_site_cache_on_update($new_site, $old_site) * @param string $is_public Whether the site is public. A numeric string, * for compatibility reasons. Accepts '1' or '0'. * @phpstan-param '1'|'0' $is_public + * @phpstan-return void */ function wp_update_blog_public_option_on_site_update($site_id, $is_public) { @@ -119160,6 +119519,7 @@ function _wp_delete_tax_menu_item($object_id, $tt_id, $taxonomy) * @param string $new_status The new status of the post object. * @param string $old_status The old status of the post object. * @param WP_Post $post The post object being transitioned from one status to another. + * @phpstan-return void */ function _wp_auto_add_pages_to_menu($new_status, $old_status, $post) { @@ -119171,6 +119531,7 @@ function _wp_auto_add_pages_to_menu($new_status, $old_status, $post) * @access private * * @param int $post_id Post ID for the customize_changeset. + * @phpstan-return void */ function _wp_delete_customize_changeset_dependent_auto_drafts($post_id) { @@ -119361,6 +119722,7 @@ function wp_load_alloptions($force_cache = \false) * @global wpdb $wpdb WordPress database abstraction object. * * @param int $network_id Optional. Network ID of network for which to prime network options cache. Defaults to current network. + * @phpstan-return void */ function wp_load_core_site_options($network_id = \null) { @@ -119488,6 +119850,7 @@ function set_transient($transient, $value, $expiration = 0) * @since 4.9.0 * * @param bool $force_db Optional. Force cleanup to run against the database even when an external object cache is used. + * @phpstan-return void */ function delete_expired_transients($force_db = \false) { @@ -119500,6 +119863,7 @@ function delete_expired_transients($force_db = \false) * the settings. * * @since 2.7.0 + * @phpstan-return void */ function wp_user_settings() { @@ -119580,6 +119944,7 @@ function wp_set_all_user_settings($user_settings) * Deletes the user settings of the current user. * * @since 2.7.0 + * @phpstan-return void */ function delete_all_user_settings() { @@ -120050,6 +120415,7 @@ function get_user_by($field, $value) * @global wpdb $wpdb WordPress database abstraction object. * * @param int[] $user_ids User ID numbers list + * @phpstan-return void */ function cache_users($user_ids) { @@ -120190,6 +120556,7 @@ function wp_parse_auth_cookie($cookie = '', $scheme = '') * @param bool|string $secure Whether the auth cookie should only be sent over HTTPS. Default is an empty * string which means the value of `is_ssl()` will be used. * @param string $token Optional. User's session token to use for this cookie. + * @phpstan-return void */ function wp_set_auth_cookie($user_id, $remember = \false, $secure = '', $token = '') { @@ -120198,6 +120565,7 @@ function wp_set_auth_cookie($user_id, $remember = \false, $secure = '', $token = * Removes all of the cookies associated with authentication. * * @since 2.5.0 + * @phpstan-return void */ function wp_clear_auth_cookie() { @@ -120225,6 +120593,7 @@ function is_user_logged_in() * trying to access. * * @since 1.5.0 + * @phpstan-return void */ function auth_redirect() { @@ -120430,6 +120799,7 @@ function wp_password_change_notification($user) * @param string $notify Optional. Type of notification that should happen. Accepts 'admin' or an empty * string (admin only), 'user', or 'both' (admin and user). Default empty. * @phpstan-param 'admin'|'user'|'both' $notify + * @phpstan-return void */ function wp_new_user_notification($user_id, $deprecated = \null, $notify = '') { @@ -121010,6 +121380,7 @@ function add_action($hook_name, $callback, $priority = 10, $accepted_args = 1) * @param string $hook_name The name of the action to be executed. * @param mixed ...$arg Optional. Additional arguments which are passed on to the * functions hooked to the action. Default empty. + * @phpstan-return void */ function do_action($hook_name, ...$arg) { @@ -121028,6 +121399,7 @@ function do_action($hook_name, ...$arg) * * @param string $hook_name The name of the action to be executed. * @param array $args The arguments supplied to the functions hooked to `$hook_name`. + * @phpstan-return void */ function do_action_ref_array($hook_name, $args) { @@ -121182,6 +121554,7 @@ function apply_filters_deprecated($hook_name, $args, $version, $replacement = '' * @param string $version The version of WordPress that deprecated the hook. * @param string $replacement Optional. The hook that should have been used. Default empty. * @param string $message Optional. A message regarding the change. Default empty. + * @phpstan-return void */ function do_action_deprecated($hook_name, $args, $version, $replacement = '', $message = '') { @@ -121310,6 +121683,7 @@ function register_deactivation_hook($file, $callback) * @param string $file Plugin file. * @param callable $callback The callback to run when the hook is called. Must be * a static method or function. + * @phpstan-return void */ function register_uninstall_hook($file, $callback) { @@ -122249,6 +122623,7 @@ function wp_post_revision_title_expanded($revision, $link = \true) * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. * @param string $type 'all' (default), 'revision' or 'autosave' + * @phpstan-return void */ function wp_list_post_revisions($post = 0, $type = 'all') { @@ -122344,6 +122719,7 @@ function the_post_thumbnail($size = 'post-thumbnail', $attr = '') * @global WP_Query $wp_query WordPress Query object. * * @param WP_Query $wp_query Optional. A WP_Query instance. Defaults to the $wp_query global. + * @phpstan-return void */ function update_post_thumbnail_cache($wp_query = \null) { @@ -123791,6 +124167,7 @@ function stick_post($post_id) * @since 2.7.0 * * @param int $post_id Post ID. + * @phpstan-return void */ function unstick_post($post_id) { @@ -124327,6 +124704,7 @@ function wp_update_post($postarr = array(), $wp_error = \false, $fire_after_hook * @global wpdb $wpdb WordPress database abstraction object. * * @param int|WP_Post $post Post ID or post object. + * @phpstan-return void */ function wp_publish_post($post) { @@ -124340,6 +124718,7 @@ function wp_publish_post($post) * @since 2.5.0 * * @param int|WP_Post $post Post ID or post object. + * @phpstan-return void */ function check_and_publish_future_post($post) { @@ -124497,6 +124876,7 @@ function wp_transition_post_status($new_status, $old_status, $post) * @param bool $update Whether this is an existing post being updated. * @param null|WP_Post $post_before Null for new posts, the WP_Post object prior * to the update for updated posts. + * @phpstan-return void */ function wp_after_insert_post($post, $update, $post_before) { @@ -124967,6 +125347,7 @@ function wp_mime_type_icon($mime = 0) * @param int $post_id Post ID. * @param WP_Post $post The post object. * @param WP_Post $post_before The previous post object. + * @phpstan-return void */ function wp_check_for_changed_slugs($post_id, $post, $post_before) { @@ -124989,6 +125370,7 @@ function wp_check_for_changed_slugs($post_id, $post, $post_before) * @param int $post_id Post ID. * @param WP_Post $post The post object. * @param WP_Post $post_before The previous post object. + * @phpstan-return void */ function wp_check_for_changed_dates($post_id, $post, $post_before) { @@ -125098,6 +125480,7 @@ function _get_last_post_time($timezone, $field, $post_type = 'any') * @since 1.5.1 * * @param WP_Post[] $posts Array of post objects (passed by reference). + * @phpstan-return void */ function update_post_cache(&$posts) { @@ -125116,6 +125499,7 @@ function update_post_cache(&$posts) * @global bool $_wp_suspend_cache_invalidation * * @param int|WP_Post $post Post ID or post object to remove from the cache. + * @phpstan-return void */ function clean_post_cache($post) { @@ -125129,6 +125513,7 @@ function clean_post_cache($post) * @param string $post_type Optional. Post type. Default 'post'. * @param bool $update_term_cache Optional. Whether to update the term cache. Default true. * @param bool $update_meta_cache Optional. Whether to update the meta cache. Default true. + * @phpstan-return void */ function update_post_caches(&$posts, $post_type = 'post', $update_term_cache = \true, $update_meta_cache = \true) { @@ -125139,6 +125524,7 @@ function update_post_caches(&$posts, $post_type = 'post', $update_term_cache = \ * @since 6.1.0 * * @param WP_Post[] $posts Array of post objects. + * @phpstan-return void */ function update_post_author_caches($posts) { @@ -125182,6 +125568,7 @@ function update_postmeta_cache($post_ids) * * @param int $id The attachment ID in the cache to clean. * @param bool $clean_terms Optional. Whether to clean terms cache. Default false. + * @phpstan-return void */ function clean_attachment_cache($id, $clean_terms = \false) { @@ -125230,6 +125617,7 @@ function _future_post_hook($deprecated, $post) * @access private * * @param int $post_id The ID of the post being published. + * @phpstan-return void */ function _publish_post_hook($post_id) { @@ -126182,6 +126570,7 @@ function in_the_loop() * @since 1.5.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ function rewind_posts() { @@ -126192,6 +126581,7 @@ function rewind_posts() * @since 1.5.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ function the_post() { @@ -126217,6 +126607,7 @@ function have_comments() * @since 2.2.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ function the_comment() { @@ -126227,6 +126618,7 @@ function the_comment() * Attempts to find the current slug from the past slugs. * * @since 2.1.0 + * @phpstan-return void */ function wp_old_slug_redirect() { @@ -126387,6 +126779,7 @@ function create_initial_rest_routes() * @since 4.4.0 * * @global WP $wp Current WordPress environment instance. + * @phpstan-return void */ function rest_api_loaded() { @@ -126497,6 +126890,7 @@ function rest_ensure_response($response) * @param string $function_name The function that was called. * @param string $replacement The function that should have been called. * @param string $version Version. + * @phpstan-return void */ function rest_handle_deprecated_function($function_name, $replacement, $version) { @@ -126509,6 +126903,7 @@ function rest_handle_deprecated_function($function_name, $replacement, $version) * @param string $function_name The function that was called. * @param string $message A message regarding the change. * @param string $version Version. + * @phpstan-return void */ function rest_handle_deprecated_argument($function_name, $message, $version) { @@ -126521,6 +126916,7 @@ function rest_handle_deprecated_argument($function_name, $message, $version) * @param string $function_name The function that was called. * @param string $message A message explaining what has been done incorrectly. * @param string|null $version The version of WordPress where the message was added. + * @phpstan-return void */ function rest_handle_doing_it_wrong($function_name, $message, $version) { @@ -126616,6 +127012,7 @@ function rest_is_field_included($field, $fields) * @since 4.4.0 * * @see get_rest_url() + * @phpstan-return void */ function rest_output_rsd() { @@ -126626,6 +127023,7 @@ function rest_output_rsd() * @since 4.4.0 * * @see get_rest_url() + * @phpstan-return void */ function rest_output_link_wp_head() { @@ -126634,6 +127032,7 @@ function rest_output_link_wp_head() * Sends a Link header for the REST API. * * @since 4.4.0 + * @phpstan-return void */ function rest_output_link_header() { @@ -126665,6 +127064,7 @@ function rest_cookie_check_errors($result) * * @see current_action() * @global mixed $wp_rest_auth_cookie + * @phpstan-return void */ function rest_cookie_collect_status() { @@ -127700,6 +128100,7 @@ function add_rewrite_rule($regex, $query, $after = 'bottom') * @param string $tag Name of the new rewrite tag. * @param string $regex Regular expression to substitute the tag for in rewrite rules. * @param string $query Optional. String to append to the rewritten query. Must end in '='. Default empty. + * @phpstan-return void */ function add_rewrite_tag($tag, $regex, $query = '') { @@ -127906,6 +128307,7 @@ function url_to_postid($url) * * @since 5.7.0 * @since 5.7.1 No longer prevents specific directives to occur together. + * @phpstan-return void */ function wp_robots() { @@ -128074,6 +128476,7 @@ function wp_get_script_polyfill($scripts, $tests) * @since 6.0.0 * * @param WP_Scripts $scripts WP_Scripts object. + * @phpstan-return void */ function wp_register_development_scripts($scripts) { @@ -128203,6 +128606,7 @@ function wp_just_in_time_script_localization() * @link https://api.jqueryui.com/datepicker/#options * * @global WP_Locale $wp_locale WordPress date and time locale object. + * @phpstan-return void */ function wp_localize_jquery_ui_datepicker() { @@ -128211,6 +128615,7 @@ function wp_localize_jquery_ui_datepicker() * Localizes community events data that needs to be passed to dashboard.js. * * @since 4.8.0 + * @phpstan-return void */ function wp_localize_community_events() { @@ -128376,6 +128781,7 @@ function script_concat_settings() * the editor and the front-end. * * @since 5.0.0 + * @phpstan-return void */ function wp_common_block_scripts_and_styles() { @@ -128401,6 +128807,7 @@ function wp_filter_out_block_nodes($nodes) * Enqueues the global styles defined via theme.json. * * @since 5.8.0 + * @phpstan-return void */ function wp_enqueue_global_styles() { @@ -128409,6 +128816,7 @@ function wp_enqueue_global_styles() * Enqueues the global styles custom css defined via theme.json. * * @since 6.2.0 + * @phpstan-return void */ function wp_enqueue_global_styles_custom_css() { @@ -128457,6 +128865,7 @@ function wp_should_load_separate_core_block_assets() * @since 5.0.0 * * @global WP_Screen $current_screen WordPress current screen object. + * @phpstan-return void */ function wp_enqueue_registered_block_scripts_and_styles() { @@ -128640,6 +129049,7 @@ function wp_enqueue_block_support_styles($style, $priority = 10) * optimize?: bool, * prettify?: bool, * } $options + * @phpstan-return void */ function wp_enqueue_stored_styles($options = array()) { @@ -128746,6 +129156,7 @@ function wp_add_editor_classic_theme_styles($editor_settings) * including an array of attributes (`$atts`), the shortcode content * or null if not set (`$content`), and finally the shortcode tag * itself (`$shortcode_tag`), in that order. + * @phpstan-return void */ function add_shortcode($tag, $callback) { @@ -130053,6 +130464,7 @@ function update_termmeta_cache($term_ids) * @since 6.3.0 * * @param array $term_ids List of term IDs. + * @phpstan-return void */ function wp_lazyload_term_meta(array $term_ids) { @@ -130613,6 +131025,7 @@ function wp_update_term_count_now($terms, $taxonomy) * * @param int|array $object_ids Single or list of term object ID(s). * @param array|string $object_type The taxonomy object type. + * @phpstan-return void */ function clean_object_term_cache($object_ids, $object_type) { @@ -130630,6 +131043,7 @@ function clean_object_term_cache($object_ids, $object_type) * term IDs will be used. Default empty. * @param bool $clean_taxonomy Optional. Whether to clean taxonomy wide caches (true), or just individual * term object caches (false). Default true. + * @phpstan-return void */ function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = \true) { @@ -130745,6 +131159,7 @@ function _get_term_children($term_id, $terms, $taxonomy, &$ancestors = array()) * * @param object[]|WP_Term[] $terms List of term objects (passed by reference). * @param string $taxonomy Term context. + * @phpstan-return void */ function _pad_term_counts(&$terms, $taxonomy) { @@ -130831,6 +131246,7 @@ function _split_shared_term($term_id, $term_taxonomy_id, $record = \true) * @since 4.3.0 * * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ function _wp_batch_split_terms() { @@ -130855,6 +131271,7 @@ function _wp_check_for_scheduled_split_terms() * @param int $new_term_id ID of the new term created for the $term_taxonomy_id. * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split. * @param string $taxonomy Taxonomy for the split term. + * @phpstan-return void */ function _wp_check_split_default_terms($term_id, $new_term_id, $term_taxonomy_id, $taxonomy) { @@ -130885,6 +131302,7 @@ function _wp_check_split_terms_in_menus($term_id, $new_term_id, $term_taxonomy_i * @param int $new_term_id ID of the new term created for the $term_taxonomy_id. * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split. * @param string $taxonomy Taxonomy for the split term. + * @phpstan-return void */ function _wp_check_split_nav_menu_terms($term_id, $new_term_id, $term_taxonomy_id, $taxonomy) { @@ -131612,6 +132030,7 @@ function wp_get_theme_preview_path($current_stylesheet = \null) * This adds a `wp_theme_preview` URL parameter to API requests from the Site Editor, so they also respond as if the theme is set to the value of the parameter. * * @since 6.3.0 + * @phpstan-return void */ function wp_attach_theme_preview_middleware() { @@ -131650,6 +132069,7 @@ function wp_initialize_theme_preview_hooks() * @since 5.9.0 * * @param int $post_id Post ID. + * @phpstan-return void */ function wp_set_unique_slug_on_create_template_part($post_id) { @@ -131677,6 +132097,7 @@ function wp_filter_wp_template_unique_post_slug($override_slug, $slug, $post_id, * @since 5.8.0 * * @global string $_wp_current_template_content + * @phpstan-return void */ function the_block_template_skip_link() { @@ -131962,6 +132383,7 @@ function get_raw_theme_root($stylesheet_or_template, $skip_cache = \false) * Displays localized stylesheet link element. * * @since 2.1.0 + * @phpstan-return void */ function locale_stylesheet() { @@ -132072,6 +132494,7 @@ function set_theme_mod($name, $value) * @since 2.1.0 * * @param string $name Theme modification name. + * @phpstan-return void */ function remove_theme_mod($name) { @@ -132337,6 +132760,7 @@ function get_custom_header_markup() * A container div will always be printed in the Customizer preview. * * @since 4.7.0 + * @phpstan-return void */ function the_custom_header_markup() { @@ -132381,6 +132805,7 @@ function background_color() * Default custom background callback. * * @since 3.0.0 + * @phpstan-return void */ function _custom_background_cb() { @@ -132803,6 +133228,7 @@ function check_theme_switched() * @since 3.4.0 * * @global WP_Customize_Manager $wp_customize + * @phpstan-return void */ function _wp_customize_include() { @@ -132819,6 +133245,7 @@ function _wp_customize_include() * @param string $new_status New post status. * @param string $old_status Old post status. * @param WP_Post $changeset_post Changeset post object. + * @phpstan-return void */ function _wp_customize_publish_changeset($new_status, $old_status, $changeset_post) { @@ -132920,6 +133347,7 @@ function is_customize_preview() * @param string $new_status Transition to this post status. * @param string $old_status Previous post status. * @param \WP_Post $post Post data. + * @phpstan-return void */ function _wp_keep_alive_customize_changeset_dependent_auto_drafts($new_status, $old_status, $post) { @@ -132993,6 +133421,7 @@ function _add_default_theme_supports() * @param array $extra_stats Extra statistics to report to the WordPress.org API. * @param bool $force_check Whether to bypass the transient cache and force a fresh update check. * Defaults to false, true if $extra_stats is set. + * @phpstan-return void */ function wp_version_check($extra_stats = array(), $force_check = \false) { @@ -133031,6 +133460,7 @@ function wp_update_plugins($extra_stats = array()) * @global string $wp_version The WordPress version string. * * @param array $extra_stats Extra statistics to report to the WordPress.org API. + * @phpstan-return void */ function wp_update_themes($extra_stats = array()) { @@ -133071,6 +133501,7 @@ function wp_get_update_data() * @since 2.8.0 * * @global string $wp_version The WordPress version string. + * @phpstan-return void */ function _maybe_update_core() { @@ -133084,6 +133515,7 @@ function _maybe_update_core() * * @since 2.7.0 * @access private + * @phpstan-return void */ function _maybe_update_plugins() { @@ -133096,6 +133528,7 @@ function _maybe_update_plugins() * * @since 2.7.0 * @access private + * @phpstan-return void */ function _maybe_update_themes() { @@ -133120,6 +133553,7 @@ function wp_clean_update_cache() * Schedules the removal of all contents in the temporary backup directory. * * @since 6.3.0 + * @phpstan-return void */ function wp_delete_all_temp_backups() { @@ -133677,6 +134111,7 @@ function wp_update_user_counts($network_id = \null) * Schedules a recurring recalculation of the total count of users. * * @since 6.0.0 + * @phpstan-return void */ function wp_schedule_update_user_counts() { @@ -133713,6 +134148,7 @@ function wp_is_large_user_count($network_id = \null) * @global string $user_identity The display name of the user * * @param int $for_user_id Optional. User ID to set up global data. Default 0. + * @phpstan-return void */ function setup_userdata($for_user_id = 0) { @@ -133878,6 +134314,7 @@ function update_user_caches($user) * @since 6.2.0 User metadata caches are now cleared. * * @param WP_User|int $user User object or ID to be cleaned from the cache + * @phpstan-return void */ function clean_user_cache($user) { @@ -134344,6 +134781,7 @@ function wp_user_personal_data_exporter($email_address) * @access private * * @param int $request_id ID of the request. + * @phpstan-return void */ function _wp_privacy_account_request_confirmed($request_id) { @@ -134357,6 +134795,7 @@ function _wp_privacy_account_request_confirmed($request_id) * @since 4.9.6 * * @param int $request_id The ID of the request. + * @phpstan-return void */ function _wp_privacy_send_request_confirmation_notification($request_id) { @@ -134369,6 +134808,7 @@ function _wp_privacy_send_request_confirmation_notification($request_id) * @since 4.9.6 * * @param int $request_id The privacy request post ID associated with this request. + * @phpstan-return void */ function _wp_privacy_send_erasure_fulfillment_notification($request_id) { @@ -134751,6 +135191,7 @@ function is_registered_sidebar($sidebar_id) * description?: string, * show_instance_in_rest?: bool, * } $options + * @phpstan-return void */ function wp_register_sidebar_widget($id, $name, $output_callback, $options = array(), ...$params) { @@ -134828,6 +135269,7 @@ function wp_unregister_sidebar_widget($id) * width?: int, * id_base?: int|string, * } $options + * @phpstan-return void */ function wp_register_widget_control($id, $name, $control_callback, $options = array(), ...$params) { @@ -134851,6 +135293,7 @@ function wp_register_widget_control($id, $name, $control_callback, $options = ar * width?: int, * id_base?: int|string, * } $options See wp_register_widget_control() + * @phpstan-return void */ function _register_widget_update_callback($id_base, $update_callback, $options = array(), ...$params) { @@ -134875,6 +135318,7 @@ function _register_widget_update_callback($id_base, $update_callback, $options = * width?: int, * id_base?: int|string, * } $options See wp_register_widget_control() + * @phpstan-return void */ function _register_widget_form_callback($id, $name, $form_callback, $options = array(), ...$params) { @@ -135074,6 +135518,7 @@ function wp_convert_widget_settings($base_name, $option_name, $settings) * before_title?: string, * after_title?: string, * } $args + * @phpstan-return void */ function the_widget($widget, $instance = array(), $args = array()) { @@ -135157,6 +135602,7 @@ function _wp_remove_unregistered_widgets($sidebars_widgets, $allowed_widget_ids * * @param string|array|object $rss RSS url. * @param array $args Widget arguments. + * @phpstan-return void */ function wp_widget_rss_output($rss, $args = array()) { @@ -135204,6 +135650,7 @@ function wp_widget_rss_process($widget_rss, $check_feed = \true) * Calls {@see 'widgets_init'} action after all of the WordPress widgets have been registered. * * @since 2.2.0 + * @phpstan-return void */ function wp_widgets_init() { @@ -135315,6 +135762,7 @@ function wp_check_widget_editor_deps() * @access private * * @global array $wp_registered_sidebars Registered sidebars. + * @phpstan-return void */ function _wp_block_theme_register_classic_sidebars() {