~/** * Authenticates and logs a user in with 'remember' capability. * * The credentials is an array that has 'user_login', 'user_password', and * 'remember' indices. If the credentials is not given, then the log in form * will be assumed and used if set. * * The various authentication cookies will be set by this function and will be * set for a longer period depending on if the 'remember' credential is set to * true. * * Note: wp_signon() doesn't handle setting the current user. This means that if the * function is called before the {@see 'init'} hook is fired, is_user_logged_in() will * evaluate as false until that point. If is_user_logged_in() is needed in conjunction * with wp_signon(), wp_set_current_user() should be called explicitly. * * @since 2.5.0 * * @global string $auth_secure_cookie * @global wpdb $wpdb WordPress database abstraction object. * * @param array $credentials { * Optional. User info in order to sign on. * * @type string $user_login Username. * @type string $user_password User password. * @type bool $remember Whether to 'remember' the user. Increases the time * that the cookie will be kept. Default false. * } * @param string|bool $secure_cookie Optional. Whether to use secure cookie. * @return WP_User|WP_Error WP_User on success, WP_Error on failure. */uery object. * @global WP_Rewrite $wp_rewrite WordPress rewrite component. * @global wpdb $wpd0 R1VP ?`i%R1VPp  !R1Vp !R1V@ +$R1VP >0 R1V;P R1V< !R1V!R1V@+$R1VP>V!R1V@YP!R1V0s`!R1V.V!R1VYP!R1Vs!R1V4 !R1V!R1V@+$R1VP>0 R1V0`=P!R1VPPAV!R1V@Pp!R1V0Q!R1V`AV!R1V Pp!R1V 0Q!R1V0pAP R1V@<&%R1V`@P$R1V``!R1V``+@$R1V``pR!R1Vp>$R1VP> R1V >X$BX$B BB BȟBB BB BȟBB(BH=Bk}[type string $siteurl The site URL sending the mail. * } */d_once Whether to require_once or require. * @param array $arw9Bi@ R1VP@0 R1V=P R1Vp< !R1Vp`!R1V`. T$R1VP{!R1V4!R1V+0 R1V=P!R1VPA0 R1Vp=0 R1V=P!R1VPAP R1V<P#R1VPuP!R1VP`Ax R1VP#R1V`uP!R1VpA R1V<0 R1V ;@O%R1VPPBP R1V< !R1V%%R1V`0 R1V@P(=P!R1V@PAP$R1V``uP!R1VpAP R1V< !R1V!R1V@+t_tag'; $reason = Indexing_Reasons::REASON_TAG_BASE_PREFIX; } if ( $subtype === 'category' ) { $reason = Indexing_Reasons::REASON_CATEGORY_BASE_PREFIX; } $this->indexable_helper->reset_permalink_indexables( 'term', $subtype, $reason ); } /** * Resets the permalink indexables automatically, if necessary. * * @return bool Whether the reset request ran. */ public function force_reset_permalinks() { if ( \get_option( 'tag_base' ) !== $this->options_helper->get( 'tag_base_url' ) ) { $this->reset_permalinks_term( null, null, 'tag_base' ); $this->options_helper->set( 'tag_base_url', \get_option( 'tag_base' ) ); } if ( \get_option( 'category_base' ) !== $this->options_helper->get( 'category_base_url' ) ) { $this->reset_permalinks_term( null, null, 'category_base' ); $this->options_helper->set( 'category_base_url', \get_option( 'category_base' ) ); } if ( $this->should_reset_permalinks() ) { $this->reset_permalinks(); return true; } $this->reset_altered_custom_taxonomies(); return true; } /** * Checks whether the permalinks should be reset after `permalink_structure` has changed. * * @return bool Whether the permalinks should be reset. */ public function should_reset_permalinks() { return \get_option( 'permalink_structure' ) !== $this->options_helper->get( 'permalink_structure' ); } /** * Resets custom taxonomies if their slugs have changed. * * @return void */ public function reset_altered_custom_taxonomies() { $taxonomies = $this->taxonomy_helper->get_custom_taxonomies(); $custom_taxonomy_bases = $this->options_helper->get( 'custom_taxonomy_slugs', [] ); $new_taxonomy_bases = []; foreach ( $taxonomies as $taxonomy ) { $taxonomy_slug = $this->taxonomy_helper->get_taxonomy_slug( $taxonomy ); $new_taxonomy_bases[ $taxonomy ] = $taxonomy_slug; if ( ! \array_key_exists( $taxonomy, $custom_taxonomy_bases ) ) { continue; } if ( $taxonomy_slug !== $custom_taxonomy_bases[ $taxonomy ] ) { $this->indexable_helper->reset_permalink_indexables( 'term', $taxonomy ); } } $this->options_helper->set( 'custom_taxonomy_slugs', $new_taxonomy_bases ); } /** * Retrieves a list with the public post types. * * @return array The post types. */ protected function get_post_types() { /** * Filter: Gives the possibility to filter out post types. * * @param array $post_types The post type names. * * @return array The post types. */ $post_types = \apply_filters( 'wpseo_post_types_reset_permalinks', $this->post_type->get_public_post_types() ); return $post_types; } /** * Retrieves the taxonomies that belongs to the public post types. * * @param array $post_types The post types to get taxonomies for. * * @return array The retrieved taxonomies. */ protected function get_taxonomies_for_post_types( $post_types ) { $taxonomies = []; foreach ( $post_types as $post_type ) { $taxonomies[] = \get_object_taxonomies( $post_type, 'names' ); } $taxonomies = \array_merge( [], ...$taxonomies ); $taxonomies = \array_unique( $taxonomies ); return $taxonomies; } /** * Schedules the WP-Cron job to check the permalink_structure status. * * @return void */ protected function schedule_cron() { if ( \wp_next_scheduled( 'wpseo_permalink_structure_check' ) ) { return; } \wp_schedule_event( \time(), 'daily', 'wpseo_permalink_structure_check' ); } /** * Unschedules the WP-Cron job to check the permalink_structure status. * * @return void */ public function unschedule_cron() { if ( ! \wp_next_scheduled( 'wpseo_permalink_structure_check' ) ) { return; } \wp_clear_scheduled_hook( 'wpseo_permalink_structure_check' ); } }