8速$%:.dR [r/$R~!]'Lq5ߔmb|xϷh̄?|}CQ>}_/vw~ ~7x%~?}mJ*cΰ}5ۭzT"FhZu{Ir4+igXVI\Ax0mS9뗸8NJjӛׯqy~zպqT.%+2ilI0+nT@!z{|G,(1JXq e.%t?;;jq%ӷ7̺j\IPhe3+H)=ɢ[0x逾D|3h ( A:v+ɍkQ)v;X2'JhyǹO]z]'J3?N+x~!$bPIaI=|Wg?C*ۄ*%TF %Y6Z~nsrΧQ1H/V D\__Ç5޿??Nj/^K2-~_I988$_oXCb!XJ>gYh}pcTxa81v+t]MhAh!Ì{T&V&^quuW '(Τ6>5 ^f M"u.ϥɒ jBUKxSffMSK1Z*G HkUeɖ勗g2dY8fvKCS$OJgz>Mxs΁v݈!Js- !JE/9]DL\Ĝ,ӰwzyfJiZU%[Ž8kc59iPtG#GE "*`V;dz'҄~)8W`W-*HDkHC:_oXw!$Jw`QEvp570TR ˆFPDޢ,8_% l orKy3 V~+iTR$B=;S|ohмɐcxidRw(BUoj0ÈUwR1>8O-!k|#n!&8TB$X?r+/2ƥoU-9c10XƋ_9o$icp")/R9B :U n8n}x[Gxy &BxHZw#jPuҳc^2++l(EdGe)g$ LU n@-i ])Ŝ_ a+.YI!crfAs-?l>Uacontext->id, $taxonomy ); if ( ! \is_array( $terms ) ) { return $data; } $callback = static function( $term ) { // We are using the WordPress internal translation. return $term->name !== \__( 'Uncategorized', 'default' ); }; $terms = \array_filter( $terms, $callback ); if ( empty( $terms ) ) { return $data; } $data[ $key ] = \wp_list_pluck( $terms, 'name' ); return $data; } /** * Adds an image node if the post has a featured image. * * @param array $data The Article data. * * @return array The Article data. */ private function add_image( $data ) { if ( $this->context->main_image_url !== null ) { $data['image'] = [ '@id' => $this->context->canonical . Schema_IDs::PRIMARY_IMAGE_HASH, ]; $data['thumbnailUrl'] = $this->context->main_image_url; } return $data; } /** * Adds the potential action property to the Article Schema piece. * * @param array $data The Article data. * * @return array The Article data with the potential action added. */ private function add_potential_action( $data ) { /** * Filter: 'wpseo_schema_article_potential_action_target' - Allows filtering of the schema Article potentialAction target. * * @api array $targets The URLs for the Article potentialAction target. */ $targets = \apply_filters( 'wpseo_schema_article_potential_action_target', [ $this->context->canonical . '#respond' ] ); $data['potentialAction'][] = [ '@type' => 'CommentAction', 'name' => 'Comment', 'target' => $targets, ]; return $data; } /** * Does a simple word count but tries to be relatively smart about it. * * @param string $post_content The post content. * @param string $post_title The post title. * * @return int The number of words in the content. */ private function word_count( $post_content, $post_title = '' ) { // Add the title to our word count. $post_content = $post_title . ' ' . $post_content; // Strip pre/code blocks and their content. $post_content = \preg_replace( '@<(pre|code)[^>]*?>.*?@si', '', $post_content ); // Add space between tags that don't have it. $post_content = \preg_replace( '@><@', '> <', $post_content ); // Strips all other tags. $post_content = \wp_strip_all_tags( $post_content ); $characters = ''; if ( \preg_match( '@[а-я]@ui', $post_content ) ) { // Correct counting of the number of words in the Russian and Ukrainian languages. $alphabet = [ 'ru' => 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя', 'ua' => 'абвгґдеєжзиіїйклмнопрстуфхцчшщьюя', ]; $characters = \implode( '', $alphabet ); $characters = \preg_split( '//u', $characters, -1, \PREG_SPLIT_NO_EMPTY ); $characters = \array_unique( $characters ); $characters = \implode( '', $characters ); $characters .= \mb_strtoupper( $characters ); } // Remove characters from HTML entities. $post_content = \preg_replace( '@&[a-z0-9]+;@i', ' ', \htmlentities( $post_content ) ); return \str_word_count( $post_content, 0, $characters ); } }