Update stubs.php

This commit is contained in:
Tetrakern 2024-05-31 12:20:08 +02:00
parent 050806cfe3
commit 99a0028880

View file

@ -145,3 +145,37 @@ function fictioneer_get_cache_bust() {}
*/

function wp_admin_notice( string $message, array $args = array() ) {}

/**
* Wrapper to update user meta
*
* If the meta value is truthy, the meta field is updated as normal.
* If not, the meta field is deleted instead to keep the database tidy.
*
* @since 5.7.3
*
* @param int $user_id The ID of the user.
* @param string $meta_key The meta key to update.
* @param mixed $meta_value The new meta value. If empty, the meta key will be deleted.
* @param mixed $prev_value Optional. If specified, only updates existing metadata with this value.
* Otherwise, update all entries. Default empty.
*
* @return int|bool Meta ID if the key didn't exist on update, true on successful update or delete,
* false on failure or if the value passed to the function is the same as the one
* that is already in the database.
*/

function fictioneer_update_user_meta( $user_id, $meta_key, $meta_value, $prev_value = '' ) {}

/**
* Sanitizes a checkbox value into true or false
*
* @since 4.7.0
* @link https://www.php.net/manual/en/function.filter-var.php
*
* @param string|boolean $value The checkbox value to be sanitized.
*
* @return boolean True or false.
*/

function fictioneer_sanitize_checkbox( $value ) {}