D JDDJpostDKGD KhDDJD DJs wiDOODEPDhDEDODO@ on EP@n acS@PP8GDz5@ADP@_filS@PPD@S EPPDD PD(D PD@DPDDTT@@QQ/** * Sanitizes text content and strips out disallowed HTML. * * This function emulates `wp_kses_post()` with a context of "acf" for extensibility. * * @date 16/4/21 * @since 5.9.6 * * @param string $string * @return string */RDRDRV/** * Private callback for the "wp_kses_allowed_html" filter used to return allowed HTML for "acf" context. * * @date 16/4/21 * @since 5.9.6 * * @param array $tags An array of allowed tags. * @param string $context The context name. * @return array. */yETTpD|yEL+sEZ['hE>r`PDIZkJPD<PQD@o.sEe/1ߛQD  UPO@p{ U P=0 UP`P3 U`PPA U`PA UpP<> UpP> UPQ>P@@@Pq UP^?Pq U`^?t Up_ U`apb U@a+ Upb> UPd> U@e>O@@DD]E|E`@ss a@``PD` ( $DhDDreturn d@e_opP@``D` reDete_metadata( $type, $id`(D8DD`/** * Returns a WordPress object type. * * @date 1/4/20 * @since 5.9.0 * * @param string $object_type The object type (post, term, user, etc). * @param string $object_subtype Optional object subtype (post type, taxonomy). * @return object */PDK8$ ҏ@j^Rɍ @dD@ash ;Dd@ dat`@dd(Dd\' c@DD. $meta = wp_s@( $mP@ddDdDPDHD>rPD4 = ar8D8DDDDDDDDxDDDD * @since 5.3.8 * @de@atedՏ@hhD@t_id`yEhhD/** * Extract the ID of a given object/array. This supports all expected types handled by our update_fields() and * load_fields() callbacks. * * @param WP_Post|WP_User|WP_Term|WP_Comment|array $object * @return int|mixed|null */ Optional object subtype (post type, taxonomy). */DDK8$ ҏ@j^Rɍ @ȀD _|@؀D ]wƛ@h description. */ public function generate_open_graph_description() { if ( $this->model->open_graph_description ) { $open_graph_description = $this->model->open_graph_description; } if ( empty( $open_graph_description ) ) { // The helper applies a filter, but we don't have a default value at this stage so we pass an empty string. $open_graph_description = $this->values_helper->get_open_graph_description( '', $this->model->object_type, $this->model->object_sub_type ); } if ( empty( $open_graph_description ) ) { $open_graph_description = $this->meta_description; } if ( empty( $open_graph_description ) ) { $open_graph_description = $this->post->get_the_excerpt( $this->model->object_id ); $open_graph_description = $this->post->strip_shortcodes( $open_graph_description ); } return $open_graph_description; } /** * Generates the open graph images. * * @return array The open graph images. */ public function generate_open_graph_images() { if ( \post_password_required() ) { return []; } return parent::generate_open_graph_images(); } /** * Generates the Open Graph type. * * @return string The Open Graph type. */ public function generate_open_graph_type() { return 'article'; } /** * Generates the open graph article author. * * @return string The open graph article author. */ public function generate_open_graph_article_author() { if ( $this->model->object_sub_type !== 'post' ) { return ''; } $post = $this->source; $open_graph_article_author = $this->user->get_the_author_meta( 'facebook', $post->post_author ); if ( $open_graph_article_author ) { return $open_graph_article_author; } return ''; } /** * Generates the open graph article publisher. * * @return string The open graph article publisher. */ public function generate_open_graph_article_publisher() { $open_graph_article_publisher = $this->context->open_graph_publisher; if ( $open_graph_article_publisher ) { return $open_graph_article_publisher; } return ''; } /** * Generates the open graph article published time. * * @return string The open graph article published time. */ public function generate_open_graph_article_published_time() { if ( $this->model->object_sub_type !== 'post' ) { /** * Filter: 'wpseo_opengraph_show_publish_date' - Allow showing publication date for other post types. * * @param string $post_type The current URL's post type. * * @api bool Whether or not to show publish date. */ if ( ! \apply_filters( 'wpseo_opengraph_show_publish_date', false, $this->post->get_post_type( $this->source ) ) ) { return ''; } } return $this->date->format( $this->source->post_date_gmt ); } /** * Generates the open graph article modified time. * * @return string The open graph article modified time. */ public function generate_open_graph_article_modified_time() { if ( $this->source->post_modified_gmt !== $this->source->post_date_gmt ) { return $this->date->format( $this->source->post_modified_gmt ); } return ''; } /** * Generates the source. * * @return array The source. */ public function generate_source() { return \get_post( $this->model->object_id ); } /** * Generates the robots value. * * @return array The robots value. */ public function generate_robots() { $robots = $this->get_base_robots(); $robots = \array_merge( $robots, [ 'imageindex' => ( $this->model->is_robots_noimageindex === true ) ? 'noimageindex' : null, 'archive' => ( $this->model->is_robots_noarchive === true ) ? 'noarchive' : null, 'snippet' => ( $this->model->is_robots_nosnippet === true ) ? 'nosnippet' : null, ] ); // No snippet means max snippet can be omitted. if ( $this->model->is_robots_nosnippet === true ) { $robots['max-snippet'] = null; } // No image index means max image preview can be omitted. if ( $this->model->is_robots_noimageindex === true ) { $robots['max-image-preview'] = null; } // When the post specific index is not set, look to the post status and default of the post type. if ( $this->model->is_robots_noindex === null ) { $post_status_private = \get_post_status( $this->model->object_id ) === 'private'; $post_type_noindex = ! $this->post_type->is_indexable( $this->model->object_sub_type ); if ( $post_status_private || $post_type_noindex ) { $robots['index'] = 'noindex'; } } return $this->filter_robots( $robots ); } /** * Generates the Twitter description. * * @return string The Twitter description. */ public function generate_twitter_description() { $twitter_description = parent::generate_twitter_description(); if ( $twitter_description ) { return $twitter_description; } if ( $this->open_graph_description && $this->context->open_graph_enabled === true ) { return ''; } return $this->post->get_the_excerpt( $this->model->object_id ); } /** * Generates the Twitter image. * * @return string The Twitter image. */ public function generate_twitter_image() { if ( \post_password_required() ) { return ''; } return parent::generate_twitter_image(); } /** * Generates the Twitter creator. * * @return string The Twitter creator. */ public function generate_twitter_creator() { if ( $this->model->object_sub_type !== 'post' ) { return ''; } $twitter_creator = \ltrim( \trim( \get_the_author_meta( 'twitter', $this->source->post_author ) ), '@' ); /** * Filter: 'wpseo_twitter_creator_account' - Allow changing the Twitter account as output in the Twitter card by Yoast SEO. * * @api string $twitter The twitter account name string. */ $twitter_creator = \apply_filters( 'wpseo_twitter_creator_account', $twitter_creator ); if ( \is_string( $twitter_creator ) && $twitter_creator !== '' ) { return '@' . $twitter_creator; } $site_twitter = $this->options->get( 'twitter_site', '' ); if ( \is_string( $site_twitter ) && $site_twitter !== '' ) { return '@' . $site_twitter; } return ''; } /** * Wraps the get_paginated_url pagination helper method. * * @codeCoverageIgnore A wrapper method. * * @param string $url The un-paginated URL of the current archive. * @param string $page The page number to add on to $url for the $link tag. * * @return string The paginated URL. */ protected function get_paginated_url( $url, $page ) { return $this->pagination->get_paginated_url( $url, $page, false ); } }