db $wpdb WordPress database abstraction object. */ function wp_register_persisted_preferences_meta() { /* * Create a meta key that incorporates the blog prefix so that each site * on a multisite can have distinct user preferences. */ global $wpdb; $meta_key = $wpdb->get_blog_prefix() . 'persisted_preferences'; register_meta( 'user', $meta_key, array( 'type' => 'object', 'single' => true, 'show_in_rest' => array( 'name' => 'persisted_preferences', 'type' => 'object', 'schema' => array( 'type' => 'object', 'context' => array( 'edit' ), 'properties' => array( '_modified' => array( 'description' => __( 'The date and time the preferences were updated.' ), 'type' => 'string', 'format' => 'date-time', 'readonly' => false, ), ), 'additionalProperties' => true, ), ), ) ); } /** * Sets the last changed time for the 'users' cache group. * * @since 6.3.0 */ function wp_cache_set_users_last_changed() { wp_cache_set_last_changed( 'users' ); } /** * Checks if password reset is allowed for a specific user. * * @since 6.3.0 * * @param int|WP_User $user The user to check. * @return bool|WP_Error True if allowed, false or WP_Error otherwise. */ function wp_is_password_reset_allowed_for_user( $user ) { if ( ! is_object( $user ) ) { $user = get_userdata( $user ); } if ( ! $user || ! $user->exists() ) { return false; } $allow = true; if ( is_multisite() && is_user_spammy( $user ) ) { $allow = false; } /** * Filters whether to allow a password to be reset. * * @since 2.7.0 * * @param bool $allow Whether to allow the password to be reset. Default true. * @param int $user_id The ID of the user attempting to reset a password. */ return apply_filters( 'allow_password_reset', $allow, $user->ID ); }
Fatal error: Uncaught Error: Call to undefined function _wp_get_current_user() in /home/devangso/public_html/wp-includes/pluggable.php:70 Stack trace: #0 /home/devangso/public_html/wp-includes/capabilities.php(914): wp_get_current_user() #1 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Admin/Features/Features.php(392): current_user_can('manage_woocomme...') #2 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Admin/Features/Features.php(60): Automattic\WooCommerce\Admin\Features\Features::should_load_features() #3 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Admin/Features/Features.php(48): Automattic\WooCommerce\Admin\Features\Features->__construct() #4 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Loader.php(65): Automattic\WooCommerce\Admin\Features\Features::get_instance() #5 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Loader.php(55): Automattic\WooCommerce\Internal\Admin\Loader->__construct() #6 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php(200): Automattic\WooCommerce\Internal\Admin\Loader::get_instance() #7 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php(108): Automattic\WooCommerce\Internal\Admin\FeaturePlugin->hooks() #8 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php(92): Automattic\WooCommerce\Internal\Admin\FeaturePlugin->on_plugins_loaded() #9 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Admin/Composer/Package.php(65): Automattic\WooCommerce\Internal\Admin\FeaturePlugin->init() #10 [internal function]: Automattic\WooCommerce\Admin\Composer\Package::init() #11 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Packages.php(291): call_user_func(Array) #12 /home/devangso/public_html/wp-content/plugins/woocommerce/src/Packages.php(89): Automattic\WooCommerce\Packages::initialize_packages() #13 /home/devangso/public_html/wp-includes/class-wp-hook.php(341): Automattic\WooCommerce\Packages::on_init('') #14 /home/devangso/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(Object(FusionCore_Plugin), Array) #15 /home/devangso/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #16 /home/devangso/public_html/wp-settings.php(593): do_action('plugins_loaded') #17 /home/devangso/public_html/wp-config.php(99): require_once('/home/devangso/...') #18 /home/devangso/public_html/wp-load.php(50): require_once('/home/devangso/...') #19 /home/devangso/public_html/wp-blog-header.php(13): require_once('/home/devangso/...') #20 /home/devangso/public_html/index.php(17): require('/home/devangso/...') #21 {main} thrown in /home/devangso/public_html/wp-includes/pluggable.php on line 70