diff --git a/visitor.php b/visitor.php index 96b95715..9f52a4aa 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); @@ -329,14 +333,19 @@ public function enterNode(Node $node) $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; @@ -1045,66 +1054,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 7f4eebd6..6fd0f285 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) { @@ -4246,6 +4266,7 @@ public function __get($name) * * @param string $name Property to check if set. * @param mixed $value Property value. + * @phpstan-return void */ public function __set($name, $value) { @@ -4269,6 +4290,7 @@ public function __isset($name) * @since 6.4.0 Unsetting a dynamic property is deprecated. * * @param string $name Property to unset. + * @phpstan-return void */ public function __unset($name) { @@ -4356,6 +4378,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) { @@ -4399,6 +4422,7 @@ protected function get_views() * Displays the list of views available on this table. * * @since 3.1.0 + * @phpstan-return void */ public function views() { @@ -4441,6 +4465,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 = '') { @@ -4476,6 +4501,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) { @@ -4642,6 +4668,7 @@ public function print_column_headers($with_id = \true) * * @since 6.3.0 * @access public + * @phpstan-return void */ public function print_table_description() { @@ -5016,6 +5043,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() { @@ -5027,6 +5055,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) { @@ -5039,6 +5068,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) { @@ -5049,6 +5079,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) { @@ -5061,6 +5092,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) { @@ -5281,6 +5313,7 @@ public function column_date($comment) } /** * @param WP_Comment $comment The comment object. + * @phpstan-return void */ public function column_response($comment) { @@ -5529,6 +5562,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) { @@ -6655,6 +6689,7 @@ class WP_Filesystem_FTPext extends \WP_Filesystem_Base * @since 2.5.0 * * @param array $opt + * @phpstan-return void */ public function __construct($opt = '') { @@ -7091,6 +7126,7 @@ class WP_Filesystem_ftpsockets extends \WP_Filesystem_Base * @since 2.5.0 * * @param array $opt + * @phpstan-return void */ public function __construct($opt = '') { @@ -7520,6 +7556,7 @@ class WP_Filesystem_SSH2 extends \WP_Filesystem_Base * @since 2.7.0 * * @param array $opt + * @phpstan-return void */ public function __construct($opt = '') { @@ -8092,6 +8129,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) { @@ -8197,6 +8235,7 @@ protected function get_bulk_actions() /** * @global int $cat_id * @param string $which + * @phpstan-return void */ protected function extra_tablenav($which) { @@ -8442,6 +8481,7 @@ protected function get_bulk_actions() } /** * @param string $which + * @phpstan-return void */ protected function extra_tablenav($which) { @@ -8563,6 +8603,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) { @@ -9125,6 +9166,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) { @@ -9198,6 +9240,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) { @@ -9302,6 +9345,7 @@ protected function get_installed_plugin_slugs() * @global int $paged * @global string $type * @global string $term + * @phpstan-return void */ public function prepare_items() { @@ -9340,6 +9384,7 @@ public function display() * @global string $tab * * @param string $which + * @phpstan-return void */ protected function display_tablenav($which) { @@ -9455,6 +9500,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) { @@ -9491,6 +9537,7 @@ protected function get_bulk_actions() /** * @global string $status * @param string $which + * @phpstan-return void */ public function bulk_actions($which = '') { @@ -9498,6 +9545,7 @@ public function bulk_actions($which = '') /** * @global string $status * @param string $which + * @phpstan-return void */ protected function extra_tablenav($which) { @@ -9510,6 +9558,7 @@ public function current_action() } /** * @global string $status + * @phpstan-return void */ public function display_rows() { @@ -9711,6 +9760,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) { @@ -9722,6 +9772,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) { @@ -9841,6 +9892,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) { @@ -9995,6 +10047,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() { @@ -10217,6 +10270,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) { @@ -10233,6 +10287,7 @@ public static function text_change_check() * Outputs a warning when some privacy info has changed. * * @since 4.9.6 + * @phpstan-return void */ public static function policy_text_changed_notice() { @@ -10244,6 +10299,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) { @@ -10269,6 +10325,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) { @@ -10590,6 +10647,7 @@ public function get_help_tab($id) * callback?: callable, * priority?: int, * } $args + * @phpstan-return void */ public function add_help_tab($args) { @@ -10714,6 +10772,7 @@ public function remove_screen_reader_content() * @since 3.3.0 * * @global string $screen_layout_columns + * @phpstan-return void */ public function render_screen_meta() { @@ -10749,6 +10808,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() { @@ -10757,6 +10817,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() { @@ -10765,6 +10826,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() { @@ -10773,6 +10835,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() { @@ -10783,6 +10846,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() { @@ -10794,6 +10858,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') { @@ -10982,6 +11047,7 @@ public static function get_instance() * Enqueues the site health scripts. * * @since 5.2.0 + * @phpstan-return void */ public function enqueue_scripts() { @@ -10996,6 +11062,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() { @@ -11643,6 +11710,7 @@ protected function get_sortable_columns() { } /** + * @phpstan-return void */ public function display_rows_or_placeholder() { @@ -11738,6 +11806,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() { @@ -11785,12 +11854,14 @@ public function prepare_items() { } /** + * @phpstan-return void */ public function no_items() { } /** * @param string $which + * @phpstan-return void */ public function tablenav($which = 'top') { @@ -11868,6 +11939,7 @@ public function ajax_user_can() * @global int $paged * @global string $type * @global array $theme_field_defaults + * @phpstan-return void */ public function prepare_items() { @@ -11935,6 +12007,7 @@ public function display_rows() * description?: string, * download_link?: string, * } $theme + * @phpstan-return void */ public function single_row($theme) { @@ -11960,6 +12033,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) { @@ -13373,6 +13447,7 @@ class getID3 const ATTACHMENTS_INLINE = \true; /** * @throws getid3_exception + * @phpstan-return void */ public function __construct() { @@ -13464,6 +13539,7 @@ public function GetFileFormat(&$filedata, $filename = '') * * @param array $array * @param string $encoding + * @phpstan-return void */ public function CharConvert(&$array, $encoding) { @@ -16600,6 +16676,7 @@ public function __destruct() * @see PHPMailer::$SMTPDebug * * @param string $str + * @phpstan-return void */ protected function edebug($str) { @@ -17062,6 +17139,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() { @@ -18083,6 +18161,7 @@ class SMTP * * @see SMTP::$Debugoutput * @see SMTP::$do_debug + * @phpstan-return void */ protected function edebug($str, $level = 0) { @@ -18572,6 +18651,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) { @@ -22543,6 +22623,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) { @@ -25642,6 +25723,7 @@ protected function body() } /** * Parsed a "Transfer-Encoding: chunked" body + * @phpstan-return void */ protected function chunked() { @@ -29772,6 +29854,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()) { @@ -29807,6 +29890,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()) { @@ -29846,6 +29930,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) { @@ -29883,6 +29968,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()) { @@ -29984,6 +30070,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) { @@ -30005,6 +30092,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) { @@ -30022,6 +30110,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()) { @@ -30332,6 +30421,7 @@ public function remove_menu($id) * group?: bool, * meta?: array, * } $args + * @phpstan-return void */ public function add_node($args) { @@ -30448,6 +30538,7 @@ protected final function _render($root) * @since 3.3.0 * * @param object $node + * @phpstan-return void */ protected final function _render_container($node) { @@ -30456,6 +30547,7 @@ protected final function _render_container($node) * @since 3.3.0 * * @param object $node + * @phpstan-return void */ protected final function _render_group($node) { @@ -30464,6 +30556,7 @@ protected final function _render_group($node) * @since 3.3.0 * * @param object $node + * @phpstan-return void */ protected final function _render_item($node) { @@ -31305,6 +31398,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) { @@ -32336,6 +32430,7 @@ public function __isset($name) * * @param string $name Property name. * @param mixed $value Property value. + * @phpstan-return void */ public function __set($name, $value) { @@ -33628,6 +33723,7 @@ public final function get_content() * * @since 3.4.0 * @uses WP_Customize_Control::render() + * @phpstan-return void */ public final function maybe_render() { @@ -33683,6 +33779,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() { @@ -33823,6 +33920,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() { @@ -33856,6 +33954,7 @@ public function after_setup_theme() * to swap it out at runtime. * * @since 3.4.0 + * @phpstan-return void */ public function start_previewing_theme() { @@ -33866,6 +33965,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() { @@ -34049,6 +34149,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()) { @@ -34057,6 +34158,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() { @@ -34136,6 +34238,7 @@ public function set_post_value($setting_id, $value) * Prints JavaScript settings. * * @since 3.4.0 + * @phpstan-return void */ public function customize_preview_init() { @@ -34208,6 +34311,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() { @@ -34443,6 +34547,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() { @@ -34489,6 +34594,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) { @@ -35238,6 +35344,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) { @@ -35775,6 +35882,7 @@ public final function get_content() * Check capabilities and render the panel. * * @since 4.0.0 + * @phpstan-return void */ public final function maybe_render() { @@ -36067,6 +36175,7 @@ public final function get_content() * Check capabilities and render the section. * * @since 3.4.0 + * @phpstan-return void */ public final function maybe_render() { @@ -36633,6 +36742,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) { @@ -36698,6 +36808,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() { @@ -37195,6 +37306,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() { @@ -37502,6 +37614,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') { @@ -38422,6 +38535,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() { @@ -38477,6 +38591,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() { @@ -38487,6 +38602,7 @@ public static function force_uncompressed_tinymce() * @since 4.8.0 * * @global bool $concatenate_scripts + * @phpstan-return void */ public static function print_tinymce_scripts() { @@ -38550,6 +38666,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() { @@ -38604,6 +38721,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() { @@ -38688,6 +38806,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) { @@ -38696,6 +38815,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) { @@ -38796,6 +38916,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 = '') { @@ -38973,6 +39094,7 @@ class WP_Fatal_Error_Handler * This method is registered via `register_shutdown_function()`. * * @since 5.2.0 + * @phpstan-return void */ public function handle() { @@ -39015,6 +39137,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) { @@ -39254,6 +39377,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) { @@ -39561,6 +39685,7 @@ class WP_Http_Cookie * port?: int|string, * host_only?: bool, * } $data + * @phpstan-return void */ public function __construct($data, $requested_url = '') { @@ -42562,6 +42687,7 @@ class WP_Meta_Query * Default is 'CHAR'. * } * } + * @phpstan-return void */ public function __construct($meta_query = \false) { @@ -46656,6 +46782,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) { @@ -46688,6 +46815,7 @@ public function __construct() * Initialize recovery mode for the current request. * * @since 5.2.0 + * @phpstan-return void */ public function initialize() { @@ -46755,6 +46883,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() { @@ -47692,6 +47821,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) { @@ -47984,6 +48114,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) { @@ -47997,6 +48128,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) { @@ -48008,6 +48140,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) { @@ -48048,6 +48181,7 @@ public function is_role($role) * Initializes all of the available roles. * * @since 4.9.0 + * @phpstan-return void */ public function init_roles() { @@ -48060,6 +48194,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) { @@ -49783,6 +49918,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) { @@ -51022,6 +51158,7 @@ public function __get($name) * * @param string $name Property to check if set. * @param mixed $value Property value. + * @phpstan-return void */ public function __set($name, $value) { @@ -51045,6 +51182,7 @@ public function __isset($name) * @since 6.4.0 Unsetting a dynamic property is deprecated. * * @param string $name Property to unset. + * @phpstan-return void */ public function __unset($name) { @@ -52773,6 +52911,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) { @@ -53272,6 +53411,7 @@ public function delete_pattern_cache() * @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) { @@ -53282,6 +53422,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) { @@ -53672,6 +53813,7 @@ public function prepare_query($query = array()) * @since 3.1.0 * * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ public function query() { @@ -53792,6 +53934,7 @@ public function __get($name) * * @param string $name Property to check if set. * @param mixed $value Property value. + * @phpstan-return void */ public function __set($name, $value) { @@ -53815,6 +53958,7 @@ public function __isset($name) * @since 6.4.0 Unsetting a dynamic property is deprecated. * * @param string $name Property to unset. + * @phpstan-return void */ public function __unset($name) { @@ -54030,6 +54174,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 = '') { @@ -54093,6 +54238,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) { @@ -54207,6 +54353,7 @@ public function get_role_caps() * @since 2.0.0 * * @param string $role Role name. + * @phpstan-return void */ public function add_role($role) { @@ -54217,6 +54364,7 @@ public function add_role($role) * @since 2.0.0 * * @param string $role Role name. + * @phpstan-return void */ public function remove_role($role) { @@ -54231,6 +54379,7 @@ public function remove_role($role) * @since 2.0.0 * * @param string $role Role name. + * @phpstan-return void */ public function set_role($role) { @@ -54287,6 +54436,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) { @@ -54779,6 +54929,7 @@ public function is_preview() * @phpstan-param int|array{ * number?: int, * } $widget_args + * @phpstan-return void */ public function display_callback($args, $widget_args = 1) { @@ -54791,6 +54942,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) { @@ -57425,6 +57577,7 @@ public function query_posts() * @since 2.0.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ public function handle_404() { @@ -58006,6 +58159,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) { @@ -58028,6 +58182,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) { @@ -58104,6 +58259,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()) { @@ -58424,6 +58580,7 @@ public function suppress_errors($suppress = \true) * Kills cached query results. * * @since 0.71 + * @phpstan-return void */ public function flush() { @@ -59120,6 +59277,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() { @@ -60234,6 +60392,7 @@ public function enqueue() } /** * @global Custom_Image_Header $custom_image_header + * @phpstan-return void */ public function prepare_control() { @@ -60682,6 +60841,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() { @@ -60772,6 +60932,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) { @@ -60837,6 +60998,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() { @@ -61224,6 +61386,7 @@ public function sanitize($value) * parent?: int, * auto_add?: bool, * } $value + * @phpstan-return void */ protected function update($value) { @@ -61827,6 +61990,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() { @@ -62403,6 +62567,7 @@ public function __construct() * }, * }, * } $fonts See wp_print_font_faces() + * @phpstan-return void */ public function generate_and_print(array $fonts) { @@ -63440,6 +63605,7 @@ public function next_tag($query = \null) * // Outputs: "free lang-en " * * @since 6.4.0 + * @phpstan-return void */ public function class_list() { @@ -64585,6 +64751,7 @@ class Translation_Entry * references?: array, * flags?: array, * } $args + * @phpstan-return void */ public function __construct($args = array()) { @@ -65949,6 +66116,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() { @@ -66152,6 +66320,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) { @@ -74843,6 +75012,7 @@ public function __construct() * by this method, in order to properly send 404s. * * @since 5.5.0 + * @phpstan-return void */ public function init() { @@ -74879,6 +75049,7 @@ public function register_rewrites() * @since 5.5.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ public function render_sitemaps() { @@ -75620,6 +75791,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) { @@ -75748,6 +75920,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) { @@ -76084,6 +76257,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) { @@ -76303,6 +76477,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) { @@ -76355,6 +76530,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) { @@ -76682,6 +76858,7 @@ public function get_instance_schema() * @since 4.8.0 * * @param array $instance Widget instance props. + * @phpstan-return void */ public function render_media($instance) { @@ -76748,6 +76925,7 @@ public function get_instance_schema() * @since 4.8.0 * * @param array $instance Widget instance props. + * @phpstan-return void */ public function render_media($instance) { @@ -76943,6 +77121,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() { @@ -77027,6 +77206,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) { @@ -77087,6 +77267,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) { @@ -77207,6 +77388,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) { @@ -77282,6 +77464,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) { @@ -77444,6 +77627,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') { @@ -78576,6 +78760,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() { @@ -78821,6 +79006,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()) { @@ -78832,6 +79018,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 = '') { @@ -78928,6 +79115,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) { @@ -78938,6 +79126,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) { @@ -79155,6 +79344,7 @@ function wp_check_browser_version() * Displays the PHP update nag. * * @since 5.1.0 + * @phpstan-return void */ function wp_dashboard_php_nag() { @@ -80625,6 +80815,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() { @@ -80661,6 +80852,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) { @@ -81588,6 +81780,7 @@ function media_upload_header() * @global string $tab * * @param array $errors + * @phpstan-return void */ function media_upload_form($errors = \null) { @@ -81779,6 +81972,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') { @@ -82320,6 +82514,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) { @@ -82361,6 +82556,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() { @@ -82433,6 +82629,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() { @@ -82544,6 +82741,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() { @@ -82577,6 +82775,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) { @@ -82854,6 +83053,7 @@ function format_code_lang($code = '') * * @since 3.2.0 * @access private + * @phpstan-return void */ function _access_denied_splash() { @@ -83008,6 +83208,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()) { @@ -83026,6 +83227,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() { @@ -83034,6 +83236,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() { @@ -83042,6 +83245,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() { @@ -83095,6 +83299,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) { @@ -83121,6 +83326,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) { @@ -83201,6 +83407,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() { @@ -83516,6 +83723,7 @@ function install_plugins_favorites_form() * @since 2.7.0 * * @global WP_List_Table $wp_list_table + * @phpstan-return void */ function display_plugins_table() { @@ -83551,6 +83759,7 @@ function install_plugin_install_status($api, $loop = \false) * @since 2.7.0 * * @global string $tab + * @phpstan-return void */ function install_plugin_information() { @@ -84539,6 +84748,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) { @@ -84597,6 +84807,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() { @@ -84612,6 +84823,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() { @@ -84990,6 +85202,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() { @@ -85138,6 +85351,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) { @@ -85153,6 +85367,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) { @@ -85505,6 +85720,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()) { @@ -85545,6 +85761,7 @@ function get_hidden_columns($screen) * @global array $wp_meta_boxes * * @param WP_Screen $screen + * @phpstan-return void */ function meta_box_prefs($screen) { @@ -85567,6 +85784,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()) { @@ -85853,6 +86071,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) { @@ -85863,6 +86082,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) { @@ -85879,6 +86099,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) { @@ -85897,6 +86118,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) { @@ -85938,6 +86160,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) { @@ -86022,6 +86245,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) { @@ -86101,6 +86325,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) { @@ -86217,6 +86442,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) { @@ -86234,6 +86460,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) { @@ -86339,6 +86566,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) { @@ -86979,6 +87207,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() { @@ -87128,6 +87357,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) { @@ -87144,6 +87374,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) { @@ -87320,6 +87551,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() { @@ -87350,6 +87582,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() { @@ -87431,6 +87664,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() { @@ -87562,6 +87796,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. + * @phpstan-return void */ function wp_upgrade() { @@ -87577,6 +87812,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() { @@ -87784,6 +88020,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() { @@ -87884,6 +88121,7 @@ function upgrade_430() * @since 4.3.0 * * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ function upgrade_430_fix_comments() { @@ -88426,6 +88664,7 @@ function wp_revoke_user($id) * @global int $user_ID * * @param false $errors Deprecated. + * @phpstan-return void */ function default_password_nag_handler($errors = \false) { @@ -88435,6 +88674,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) { @@ -88443,6 +88683,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() { @@ -88697,6 +88938,7 @@ function _add_themes_utility_last() * * @access private * @since 5.9.0 + * @phpstan-return void */ function _add_plugin_file_editor_to_tools() { @@ -88775,6 +89017,7 @@ function core_auto_updates_settings() * Display the upgrade plugins form. * * @since 2.9.0 + * @phpstan-return void */ function list_plugin_updates() { @@ -88783,6 +89026,7 @@ function list_plugin_updates() * Display the upgrade themes form. * * @since 2.9.0 + * @phpstan-return void */ function list_theme_updates() { @@ -88791,6 +89035,7 @@ function list_theme_updates() * Display the update translations form. * * @since 3.7.0 + * @phpstan-return void */ function list_translation_updates() { @@ -88803,6 +89048,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) { @@ -88811,6 +89057,7 @@ function do_core_upgrade($reinstall = \false) * Dismiss a core update. * * @since 2.7.0 + * @phpstan-return void */ function do_dismiss_core_update() { @@ -88819,6 +89066,7 @@ function do_dismiss_core_update() * Undismiss a core update. * * @since 2.7.0 + * @phpstan-return void */ function do_undismiss_core_update() { @@ -88879,6 +89127,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() { @@ -88909,6 +89158,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) { @@ -88919,6 +89169,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) { @@ -88929,6 +89180,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) { @@ -88942,6 +89194,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) { @@ -88953,6 +89206,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) { @@ -88963,6 +89217,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) { @@ -88973,6 +89228,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) { @@ -88990,6 +89246,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) { @@ -89000,6 +89257,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) { @@ -89010,6 +89268,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) { @@ -89020,6 +89279,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) { @@ -89030,6 +89290,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) { @@ -89040,6 +89301,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) { @@ -89050,6 +89312,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) { @@ -89068,6 +89331,7 @@ function wp_admin_bar_add_secondary_groups($wp_admin_bar) * Enqueues inline style to hide the admin bar when printing. * * @since 6.4.0 + * @phpstan-return void */ function wp_enqueue_admin_bar_header_styles() { @@ -89076,6 +89340,7 @@ function wp_enqueue_admin_bar_header_styles() * Enqueues inline bump styles to make room for the admin bar. * * @since 6.4.0 + * @phpstan-return void */ function wp_enqueue_admin_bar_bump_styles() { @@ -89561,6 +89826,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) { @@ -89621,6 +89887,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) { @@ -89632,6 +89899,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() { @@ -89645,6 +89913,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() { @@ -89658,6 +89927,7 @@ function _register_remote_theme_patterns() * @since 6.2.0 The `templateTypes` property was added. * @since 6.4.0 Uses the `_wp_get_block_patterns` function. * @access private + * @phpstan-return void */ function _register_theme_block_patterns() { @@ -89706,6 +89976,7 @@ function wp_apply_alignment_support($block_type, $block_attributes) * @access private * * @param WP_Block_Type $block_type Block Type. + * @phpstan-return void */ function wp_register_background_support($block_type) { @@ -89860,6 +90131,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) { @@ -90155,6 +90427,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) { @@ -90222,6 +90495,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) { @@ -90684,6 +90958,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) { @@ -90814,6 +91089,7 @@ function _block_template_render_title_tag() * @access private * @since 5.8.0 * + * @global string $_wp_current_template_id * @global string $_wp_current_template_content * @global WP_Embed $wp_embed * @global WP_Query $wp_query @@ -90869,6 +91145,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) { @@ -91772,6 +92049,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) { @@ -91782,6 +92060,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) { @@ -92563,6 +92842,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() { @@ -93610,6 +93890,7 @@ function classnames_for_block_core_search($attributes) * @param array $wrapper_styles Current collection of wrapper styles. * @param array $button_styles Current collection of button styles. * @param array $input_styles Current collection of input styles. + * @phpstan-return void */ function apply_block_core_search_border_style($attributes, $property, $side, &$wrapper_styles, &$button_styles, &$input_styles) { @@ -93762,12 +94043,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() { @@ -94737,6 +95020,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() { @@ -96008,6 +96292,7 @@ function _make_cat_compat(&$category) * @since 3.5.0 * * @param string $class Class name. + * @phpstan-return void */ function wp_simplepie_autoload($class) { @@ -96649,6 +96934,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 = '') { @@ -96733,6 +97019,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) { @@ -96747,6 +97034,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) { @@ -96935,6 +97223,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) { @@ -97111,6 +97400,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) { @@ -97449,6 +97739,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) { @@ -97488,6 +97779,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) { @@ -98200,6 +98492,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) { @@ -98464,6 +98757,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() { @@ -99024,6 +99318,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 = '') { @@ -99041,6 +99336,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 = '') { @@ -101678,6 +101974,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() { @@ -102208,6 +102505,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() { @@ -102275,6 +102573,7 @@ function print_embed_styles() * * @since 4.2.0 * @deprecated 6.4.0 Use wp_enqueue_emoji_styles() instead. + * @phpstan-return void */ function print_emoji_styles() { @@ -102308,6 +102607,7 @@ function _admin_bar_bump_cb() * update the `https_detection_errors` option, but this is no longer necessary as the errors are * retrieved directly in Site Health and no longer used outside of Site Health. * @access private + * @phpstan-return void */ function wp_update_https_detection_errors() { @@ -102369,6 +102669,7 @@ function _remove_theme_attribute_in_block_template_content($template_content) * @deprecated 6.4.0 Use wp_enqueue_block_template_skip_link() instead. * * @global string $_wp_current_template_content + * @phpstan-return void */ function the_block_template_skip_link() { @@ -102515,6 +102816,7 @@ function wp_oembed_remove_provider($format) * @since 2.9.0 * * @see wp_embed_register_handler() + * @phpstan-return void */ function wp_maybe_load_embeds() { @@ -102824,6 +103126,7 @@ function enqueue_embed_scripts() * Enqueues the CSS in the embed iframe header. * * @since 6.4.0 + * @phpstan-return void */ function wp_enqueue_embed_styles() { @@ -102852,6 +103155,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() { @@ -102860,6 +103164,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() { @@ -102868,6 +103173,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() { @@ -102936,6 +103242,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() { @@ -103215,6 +103522,7 @@ function html_type_rss() * attributes. * * @since 1.5.0 + * @phpstan-return void */ function rss_enclosure() { @@ -103231,6 +103539,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() { @@ -103390,6 +103699,7 @@ function fetch_feed($url) * }, * }, * } $fonts + * @phpstan-return void */ function wp_print_font_faces($fonts = array()) { @@ -103461,6 +103771,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) { @@ -105428,6 +105739,7 @@ function wp_spaces_regexp() * Enqueues the important emoji-related styles. * * @since 6.4.0 + * @phpstan-return void */ function wp_enqueue_emoji_styles() { @@ -105436,6 +105748,7 @@ function wp_enqueue_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() { @@ -106113,6 +106426,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 = '') { @@ -106142,6 +106456,7 @@ function wp_get_nocache_headers() * @since 2.0.0 * * @see wp_get_nocache_headers() + * @phpstan-return void */ function nocache_headers() { @@ -107254,6 +107569,7 @@ function _mce_set_direction($mce_init) * @global array $wp_smiliessearch * * @since 2.2.0 + * @phpstan-return void */ function smilies_init() { @@ -107394,6 +107710,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) { @@ -107543,6 +107860,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() { @@ -107554,6 +107872,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() { @@ -107774,6 +108093,7 @@ function _doing_it_wrong($function_name, $message, $version) * before passing to this function to avoid being stripped {@see wp_kses()}. * @param int $error_level Optional. The designated error type for this error. * Only works with E_USER family of constants. Default E_USER_NOTICE. + * @phpstan-return void */ function wp_trigger_error($function_name, $message, $error_level = \E_USER_NOTICE) { @@ -108310,6 +108630,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() { @@ -108394,6 +108715,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) { @@ -108451,6 +108773,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() { @@ -108574,6 +108897,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) { @@ -108631,6 +108955,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() { @@ -108645,6 +108970,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() { @@ -108733,6 +109059,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() { @@ -108832,6 +109159,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) { @@ -108964,6 +109292,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 = '') { @@ -109102,6 +109431,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) { @@ -109795,6 +110125,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() { @@ -110363,6 +110694,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() { @@ -110381,6 +110713,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 = '') { @@ -110421,6 +110754,7 @@ function wp_body_open() * @since 2.8.0 * * @param array $args Optional arguments. + * @phpstan-return void */ function feed_links($args = array()) { @@ -110465,6 +110799,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() { @@ -110499,6 +110834,7 @@ function wp_resource_hints() * @link https://web.dev/preload-responsive-images/ * * @since 6.1.0 + * @phpstan-return void */ function wp_preload_resources() { @@ -110907,6 +111243,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) { @@ -112015,6 +112352,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) { @@ -114124,6 +114462,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') { @@ -114162,6 +114501,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 = '') { @@ -114186,6 +114526,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) { @@ -114303,6 +114644,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() { @@ -115302,6 +115644,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() { @@ -115335,6 +115678,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() { @@ -115345,6 +115689,7 @@ function wp_shortlink_wp_head() * Attached to the {@see 'wp'} action. * * @since 3.0.0 + * @phpstan-return void */ function wp_shortlink_header() { @@ -115645,6 +115990,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() { @@ -115737,6 +116083,7 @@ function wp_favicon_request() * * @since 3.0.0 * @access private + * @phpstan-return void */ function wp_maintenance() { @@ -115833,6 +116180,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() { @@ -115859,6 +116207,7 @@ function wp_set_lang_dir() * @since 2.5.0 * * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void */ function require_wp_db() { @@ -115913,6 +116262,7 @@ function wp_start_object_cache() * * @since 3.0.0 * @access private + * @phpstan-return void */ function wp_not_installed() { @@ -116197,6 +116547,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() { @@ -116315,6 +116666,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() { @@ -117742,6 +118094,7 @@ function _wp_image_editor_choose($args = array()) * Prints default Plupload arguments. * * @since 3.4.0 + * @phpstan-return void */ function wp_plupload_default_settings() { @@ -117852,6 +118205,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()) { @@ -117938,6 +118292,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) { @@ -118846,6 +119201,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) { @@ -118941,6 +119297,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) { @@ -118952,6 +119309,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) { @@ -118964,6 +119322,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) { @@ -118977,6 +119336,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) { @@ -119023,6 +119383,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() { @@ -119055,6 +119416,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() { @@ -120100,6 +120462,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() { @@ -120226,6 +120589,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() { @@ -120251,6 +120615,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) { @@ -120265,6 +120630,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) { @@ -120377,6 +120743,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) { @@ -120390,6 +120757,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) { @@ -120526,7 +120894,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) { @@ -120623,6 +120990,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) { @@ -120797,6 +121165,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) { @@ -120809,6 +121178,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) { @@ -120974,6 +121344,7 @@ function wp_normalize_site_data($data) * options?: array, * meta?: array, * } $data See wp_insert_site() + * @phpstan-return void */ function wp_validate_site_data($errors, $data, $old_site = \null) { @@ -121050,6 +121421,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) { @@ -121149,6 +121521,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) { @@ -121185,6 +121558,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) { @@ -121680,6 +122054,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) { @@ -121691,6 +122066,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) { @@ -121810,7 +122186,7 @@ function get_option($option, $default_value = \false) { } /** - * Loads specific options into the cache with a single database query. + * Primes specific options into the cache with a single database query. * * Only options that do not already exist in cache will be loaded. * @@ -121819,12 +122195,13 @@ function get_option($option, $default_value = \false) * @global wpdb $wpdb WordPress database abstraction object. * * @param array $options An array of option names to be loaded. + * @phpstan-return void */ - function wp_load_options($options) + function wp_prime_option_caches($options) { } /** - * Loads all options registered with a specific option group. + * Primes the cache of all options registered with a specific option group. * * @since 6.4.0 * @@ -121832,7 +122209,7 @@ function wp_load_options($options) * * @param string $option_group The option group to load options for. */ - function wp_load_options_by_group($option_group) + function wp_prime_option_caches_by_group($option_group) { } /** @@ -121953,6 +122330,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) { @@ -122090,6 +122468,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) { @@ -122102,6 +122481,7 @@ function delete_expired_transients($force_db = \false) * the settings. * * @since 2.7.0 + * @phpstan-return void */ function wp_user_settings() { @@ -122182,6 +122562,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() { @@ -122652,6 +123033,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) { @@ -122792,6 +123174,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 = '') { @@ -122800,6 +123183,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() { @@ -122827,6 +123211,7 @@ function is_user_logged_in() * trying to access. * * @since 1.5.0 + * @phpstan-return void */ function auth_redirect() { @@ -123032,6 +123417,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 = '') { @@ -123633,6 +124019,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) { @@ -123651,6 +124038,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) { @@ -123805,6 +124193,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 = '') { @@ -123933,6 +124322,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) { @@ -124872,6 +125262,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') { @@ -124967,6 +125358,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) { @@ -126431,6 +126823,7 @@ function stick_post($post_id) * @since 2.7.0 * * @param int $post_id Post ID. + * @phpstan-return void */ function unstick_post($post_id) { @@ -126967,6 +127360,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) { @@ -126980,6 +127374,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) { @@ -127137,6 +127532,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) { @@ -127607,6 +128003,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) { @@ -127629,6 +128026,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) { @@ -127738,6 +128136,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) { @@ -127756,6 +128155,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) { @@ -127769,6 +128169,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) { @@ -127779,6 +128180,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) { @@ -127822,6 +128224,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) { @@ -127870,6 +128273,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) { @@ -127990,6 +128394,7 @@ function _prime_post_caches($ids, $update_term_cache = \true, $update_meta_cache * @since 6.4.0 * * @param int[] $ids ID list. + * @phpstan-return void */ function _prime_post_parent_id_caches(array $ids) { @@ -128834,6 +129239,7 @@ function in_the_loop() * @since 1.5.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ function rewind_posts() { @@ -128844,6 +129250,7 @@ function rewind_posts() * @since 1.5.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ function the_post() { @@ -128869,6 +129276,7 @@ function have_comments() * @since 2.2.0 * * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void */ function the_comment() { @@ -128879,6 +129287,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() { @@ -129039,6 +129448,7 @@ function create_initial_rest_routes() * @since 4.4.0 * * @global WP $wp Current WordPress environment instance. + * @phpstan-return void */ function rest_api_loaded() { @@ -129149,6 +129559,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) { @@ -129161,6 +129572,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) { @@ -129173,6 +129585,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) { @@ -129268,6 +129681,7 @@ function rest_is_field_included($field, $fields) * @since 4.4.0 * * @see get_rest_url() + * @phpstan-return void */ function rest_output_rsd() { @@ -129278,6 +129692,7 @@ function rest_output_rsd() * @since 4.4.0 * * @see get_rest_url() + * @phpstan-return void */ function rest_output_link_wp_head() { @@ -129286,6 +129701,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() { @@ -129317,6 +129733,7 @@ function rest_cookie_check_errors($result) * * @see current_action() * @global mixed $wp_rest_auth_cookie + * @phpstan-return void */ function rest_cookie_collect_status() { @@ -130066,6 +130483,7 @@ function _wp_post_revision_data($post = array(), $autosave = \false) * @param int $post_id The post id that was inserted. * @param WP_Post $post The post object that was inserted. * @param bool $update Whether this insert is updating an existing post. + * @phpstan-return void */ function wp_save_post_revision_on_insert($post_id, $post, $update) { @@ -130145,6 +130563,7 @@ function _wp_put_post_revision($post = \null, $autosave = \false) * * @param int $revision_id The ID of the revision to save the meta to. * @param int $post_id The ID of the post the revision is associated with. + * @phpstan-return void */ function wp_save_revisioned_meta_fields($revision_id, $post_id) { @@ -130185,6 +130604,7 @@ function wp_restore_post_revision($revision, $fields = \null) * * @param int $post_id The ID of the post to restore the meta to. * @param int $revision_id The ID of the revision to restore the meta from. + * @phpstan-return void */ function wp_restore_post_revision_meta($post_id, $revision_id) { @@ -130440,6 +130860,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 = '') { @@ -130646,6 +131067,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() { @@ -130814,6 +131236,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) { @@ -130944,6 +131367,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() { @@ -130952,6 +131376,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() { @@ -131117,6 +131542,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() { @@ -131142,6 +131568,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() { @@ -131150,6 +131577,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() { @@ -131198,6 +131626,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() { @@ -131381,6 +131810,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()) { @@ -131491,6 +131921,7 @@ function wp_remove_surrounding_empty_script_tags($contents) * 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) { @@ -132798,6 +133229,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) { @@ -133369,6 +133801,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) { @@ -133386,6 +133819,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) { @@ -133501,6 +133935,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) { @@ -133587,6 +134022,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() { @@ -133611,6 +134047,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) { @@ -133641,6 +134078,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) { @@ -134369,6 +134807,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() { @@ -134407,6 +134846,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) { @@ -134434,6 +134874,7 @@ function wp_filter_wp_template_unique_post_slug($override_slug, $slug, $post_id, * @since 6.4.0 * * @global string $_wp_current_template_content + * @phpstan-return void */ function wp_enqueue_block_template_skip_link() { @@ -134725,6 +135166,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() { @@ -134837,6 +135279,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) { @@ -135102,6 +135545,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() { @@ -135146,6 +135590,7 @@ function background_color() * Default custom background callback. * * @since 3.0.0 + * @phpstan-return void */ function _custom_background_cb() { @@ -135568,6 +136013,7 @@ function check_theme_switched() * @since 3.4.0 * * @global WP_Customize_Manager $wp_customize + * @phpstan-return void */ function _wp_customize_include() { @@ -135584,6 +136030,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) { @@ -135685,6 +136132,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) { @@ -135725,9 +136173,9 @@ function wp_theme_get_element_class_name($element) { } /** - * Adds default theme supports for block themes when the 'setup_theme' action fires. + * Adds default theme supports for block themes when the 'after_setup_theme' action fires. * - * See {@see 'setup_theme'}. + * See {@see 'after_setup_theme'}. * * @since 5.9.0 * @access private @@ -135758,6 +136206,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) { @@ -135796,6 +136245,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()) { @@ -135836,6 +136286,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() { @@ -135849,6 +136300,7 @@ function _maybe_update_core() * * @since 2.7.0 * @access private + * @phpstan-return void */ function _maybe_update_plugins() { @@ -135861,6 +136313,7 @@ function _maybe_update_plugins() * * @since 2.7.0 * @access private + * @phpstan-return void */ function _maybe_update_themes() { @@ -135885,6 +136338,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() { @@ -136442,6 +136896,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() { @@ -136478,6 +136933,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) { @@ -136643,6 +137099,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) { @@ -137117,6 +137574,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) { @@ -137130,6 +137588,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) { @@ -137142,6 +137601,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) { @@ -137525,6 +137985,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) { @@ -137602,6 +138063,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) { @@ -137625,6 +138087,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) { @@ -137649,6 +138112,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) { @@ -137848,6 +138312,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()) { @@ -137931,6 +138396,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()) { @@ -137978,6 +138444,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() { @@ -138089,6 +138556,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() {