Commit inicial powerservice

This commit is contained in:
Gabriel
2026-10-19 12:45:45 -06:00
commit ad85486fe2
10158 changed files with 2736804 additions and 0 deletions
@@ -0,0 +1,266 @@
<?php
/**
* Ability: rank-math/analyze-post-content
*
* @since 1.0.274
* @package RankMath
* @subpackage RankMath\Abilities\Content_Analysis
* @author Rank Math <support@rankmath.com>
*/
namespace RankMath\Abilities\Content_Analysis;
use RankMath\Abilities\Ability_Interface;
use RankMath\Rest\Rest_Helper;
defined( 'ABSPATH' ) || exit;
/**
* Registers and executes the rank-math/analyze-post-content ability.
*/
class Analyze_Post_Content implements Ability_Interface {
/**
* KB article covering all 24 on-page SEO tests, used as the scoring rubric reference.
*/
const KB_LINK = 'https://rankmath.com/kb/score-100-in-tests/';
/**
* Ability category slug.
*
* @var string
*/
private $category;
/**
* Shared meta args.
*
* @var array
*/
private $shared_meta;
/**
* Content analysis data gatherer.
*
* @var Content_Analysis_Data
*/
private $data;
/**
* Constructor.
*
* @param string $category Ability category slug.
* @param array $shared_meta Shared meta args.
* @param Content_Analysis_Data|null $data Content analysis data gatherer (injectable for tests).
*/
public function __construct( string $category, array $shared_meta, ?Content_Analysis_Data $data = null ) {
$this->category = $category;
$this->shared_meta = $shared_meta;
$this->data = $data ?? new Content_Analysis_Data();
}
/**
* Register the ability with the WordPress Abilities API.
*
* @return void
*/
public function register(): void {
\wp_register_ability(
'rank-math/analyze-post-content',
[
'category' => $this->category,
'label' => esc_html__( 'Analyze post content', 'seo-by-rank-math' ),
'description' => esc_html__(
'Gathers the raw content, metadata, and list of on-page SEO tests for a saved post so an AI agent can run Rank Math\'s full on-page analysis itself, since the scoring engine only runs client-side. Use tests_to_run and content together with kb_link (the scoring rubric for all 24 tests) to evaluate each test and produce a per-test score, status, and fix message.',
'seo-by-rank-math'
),
'input_schema' => [
'type' => 'object',
'required' => [ 'post_id' ],
'properties' => [
'post_id' => [
'type' => 'integer',
'description' => esc_html__( 'ID of the post to analyze.', 'seo-by-rank-math' ),
],
'keyword' => [
'type' => 'string',
'description' => esc_html__( 'Optional focus keyword to analyze against, overriding the post\'s saved focus keyword.', 'seo-by-rank-math' ),
],
],
'additionalProperties' => false,
],
'output_schema' => $this->output_schema(),
'permission_callback' => [ $this, 'check_permissions' ],
'execute_callback' => [ $this, 'execute' ],
'meta' => array_merge(
$this->shared_meta,
[
'annotations' => [
'readonly' => true,
'destructive' => false,
'idempotent' => true,
],
]
),
]
);
}
/**
* Check if the current user has permission to execute this ability.
*
* @return bool
*/
public function check_permissions(): bool {
return current_user_can( 'rank_math_onpage_analysis' );
}
/**
* Execute the ability.
*
* @param array $input Ability input arguments.
* @return array
*/
public function execute( array $input = [] ): array {
$post_id = absint( $input['post_id'] );
$post = get_post( $post_id );
if ( ! $post || ! in_array( get_post_status( $post_id ), [ 'publish', 'draft', 'private', 'pending' ], true ) ) {
return [
'error' => [
'code' => 'invalid_post',
'message' => esc_html__( 'No post found with the given ID, or the post status is not supported.', 'seo-by-rank-math' ),
],
];
}
if ( ! Rest_Helper::can_edit_post( $post ) ) {
return [
'error' => [
'code' => 'rest_cannot_edit',
'message' => esc_html__( 'Sorry, you are not allowed to edit this post.', 'seo-by-rank-math' ),
],
];
}
if ( post_password_required( $post ) ) {
return [
'error' => [
'code' => 'post_password_required',
'message' => esc_html__( 'This post is password protected.', 'seo-by-rank-math' ),
],
];
}
$keyword = isset( $input['keyword'] ) ? sanitize_text_field( $input['keyword'] ) : '';
$payload = $this->data->get( $post, $keyword );
$result = [
'post_id' => $post_id,
'keyword' => $payload['content']['focus_keyword'],
'tests_to_run' => $payload['tests_to_run'],
'content' => $payload['content'],
'kb_link' => self::KB_LINK,
'instructions' => esc_html__(
'Evaluate each test ID in tests_to_run against the fields in content, using kb_link as the scoring rubric for how each test is scored. Return a per-test breakdown with score, max_score, status (pass/fail), and a message with a specific fix. For the contentHasTOC test, when suggesting a fix or drafting content, tell the user to insert the Rank Math Table of Contents block (block name rank-math/toc-block, available in the block inserter as "Table of Contents") right after the intro, instead of a manual list of links — it auto-generates from the post headings.',
'seo-by-rank-math'
),
'error' => null,
];
rank_math()->tracking->track_ability_executed(
'Post Content Analyzed',
[
'post_id' => $post_id,
'tests_count' => count( $payload['tests_to_run'] ),
'has_keyword' => ! empty( $result['keyword'] ),
],
'rank_math_onpage_analysis'
);
return $result;
}
/**
* JSON schema for the ability output.
*
* @return array
*/
private function output_schema(): array {
return [
'type' => 'object',
'properties' => [
'post_id' => [ 'type' => 'integer' ],
'keyword' => [
'type' => 'string',
'description' => 'Focus keyword used for analysis (input override, or the post\'s saved keyword).',
],
'tests_to_run' => [
'type' => 'array',
'items' => [ 'type' => 'string' ],
'description' => 'IDs of the on-page SEO tests registered for this post, to be evaluated by the caller.',
],
'content' => [
'type' => 'object',
'description' => 'Raw content and metadata needed to evaluate each test in tests_to_run.',
'properties' => [
'title' => [ 'type' => 'string' ],
'description' => [ 'type' => 'string' ],
'permalink' => [ 'type' => 'string' ],
'focus_keyword' => [ 'type' => 'string' ],
'body' => [ 'type' => 'string' ],
'word_count' => [ 'type' => 'integer' ],
'excerpt_10pct' => [
'type' => 'string',
'description' => 'First 10% of the content body, used by the keywordIn10Percent test.',
],
'headings' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'level' => [ 'type' => 'string' ],
'text' => [ 'type' => 'string' ],
],
],
],
'images' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'alt' => [ 'type' => 'string' ],
],
],
],
'links' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'url' => [ 'type' => 'string' ],
'external' => [ 'type' => 'boolean' ],
],
],
],
],
],
'kb_link' => [
'type' => 'string',
'description' => 'KB article covering all 24 on-page SEO tests and how each is scored.',
],
'instructions' => [
'type' => 'string',
'description' => 'Guidance for the calling agent on how to use tests_to_run, content, and kb_link to produce a per-test analysis.',
],
'error' => [
'type' => [ 'object', 'null' ],
'properties' => [
'code' => [ 'type' => 'string' ],
'message' => [ 'type' => 'string' ],
],
],
],
];
}
}
@@ -0,0 +1,199 @@
<?php
/**
* Gathers raw content facts for the rank-math/analyze-post-content ability.
*
* @since 1.0.274
* @package RankMath
* @subpackage RankMath\Abilities\Content_Analysis
* @author Rank Math <support@rankmath.com>
*/
namespace RankMath\Abilities\Content_Analysis;
use WP_Post;
use RankMath\Helper;
use RankMath\Helpers\Str;
use RankMath\Helpers\Url;
use RankMath\Traits\Hooker;
defined( 'ABSPATH' ) || exit;
/**
* Builds the raw content payload an AI agent needs to evaluate the on-page SEO tests itself.
*
* This class does NOT score or judge anything — the actual test logic (Analyzer/Paper/Researcher)
* only exists client-side in JS and has no PHP port. Instead, it assembles the same facts the JS
* engine reads off the `Paper` object, so the calling agent can run the per-test evaluation.
*/
class Content_Analysis_Data {
use Hooker;
/**
* Canonical on-page test IDs for a post, mirroring Post_Screen::get_analysis().
*
* @var array
*/
const DEFAULT_TESTS = [
'contentHasTOC' => true,
'contentHasShortParagraphs' => true,
'contentHasAssets' => true,
'keywordInTitle' => true,
'keywordInMetaDescription' => true,
'keywordInPermalink' => true,
'keywordIn10Percent' => true,
'keywordInContent' => true,
'keywordInSubheadings' => true,
'keywordInImageAlt' => true,
'keywordDensity' => true,
'keywordNotUsed' => true,
'lengthContent' => true,
'lengthPermalink' => true,
'linksHasInternal' => true,
'linksHasExternals' => true,
'linksNotAllExternals' => true,
'titleStartWithKeyword' => true,
'titleSentiment' => true,
'titleHasPowerWords' => true,
'titleHasNumber' => true,
'hasContentAI' => true,
];
/**
* Build the content analysis payload for a post.
*
* @param WP_Post $post Post to analyze.
* @param string $keyword Optional focus keyword override.
* @return array
*/
public function get( WP_Post $post, string $keyword = '' ): array {
$post_id = $post->ID;
$body = $this->get_plain_text( $post->post_content );
$first_tenth = (int) ceil( mb_strlen( $body ) * 0.1 );
$title = Helper::get_post_meta( 'title', $post_id );
$description = Helper::get_post_meta( 'description', $post_id );
return [
'tests_to_run' => array_keys( $this->get_tests( $post->post_type ) ),
'content' => [
'title' => ! empty( $title ) ? $title : get_the_title( $post_id ),
'description' => ! empty( $description ) ? $description : '',
'permalink' => str_replace( home_url(), '', (string) get_permalink( $post_id ) ),
'focus_keyword' => '' !== $keyword ? $keyword : $this->get_primary_keyword( $post_id ),
'body' => $body,
'word_count' => str_word_count( $body ),
'excerpt_10pct' => Str::substr( $body, 0, $first_tenth ),
'headings' => $this->get_headings( $post->post_content ),
'images' => $this->get_images( $post->post_content ),
'links' => $this->get_links( $post->post_content ),
],
];
}
/**
* Get the on-page test IDs registered for a post type.
*
* @param string $post_type Post type slug.
* @return array
*/
private function get_tests( string $post_type ): array {
return $this->do_filter( 'researches/tests', self::DEFAULT_TESTS, $post_type );
}
/**
* Strip a post's content down to plain text.
*
* @param string $content Raw post content (may contain blocks/shortcodes/HTML).
* @return string
*/
private function get_plain_text( string $content ): string {
$content = strip_shortcodes( $content );
$content = wp_strip_all_tags( $content );
return trim( preg_replace( '/\s+/', ' ', $content ) );
}
/**
* Extract heading text grouped by level (H1-H6).
*
* @param string $content Raw post content.
* @return array
*/
private function get_headings( string $content ): array {
$headings = [];
if ( ! preg_match_all( '/<h([1-6])[^>]*>(.*?)<\/h\1>/is', $content, $matches, PREG_SET_ORDER ) ) {
return $headings;
}
foreach ( $matches as $match ) {
$headings[] = [
'level' => 'h' . $match[1],
'text' => trim( wp_strip_all_tags( $match[2] ) ),
];
}
return $headings;
}
/**
* Extract image alt text from post content.
*
* @param string $content Raw post content.
* @return array
*/
private function get_images( string $content ): array {
$images = [];
if ( ! preg_match_all( '/<img[^>]+>/i', $content, $matches ) ) {
return $images;
}
foreach ( $matches[0] as $tag ) {
$alt = preg_match( '/alt=["\']([^"\']*)["\']/i', $tag, $alt_match ) ? $alt_match[1] : '';
$images[] = [ 'alt' => $alt ];
}
return $images;
}
/**
* Extract links from post content, classified as internal or external.
*
* @param string $content Raw post content.
* @return array
*/
private function get_links( string $content ): array {
$links = [];
if ( ! preg_match_all( '/<a\s[^>]*href=["\']([^"\']+)["\'][^>]*>/i', $content, $matches ) ) {
return $links;
}
foreach ( $matches[1] as $href ) {
if ( Str::starts_with( '#', $href ) ) {
continue;
}
$links[] = [
'url' => $href,
'external' => Url::is_external( $href ),
];
}
return $links;
}
/**
* Get the primary focus keyword for the post.
*
* @param int $post_id Post ID.
* @return string
*/
private function get_primary_keyword( int $post_id ): string {
$keywords = get_post_meta( $post_id, 'rank_math_focus_keyword', true );
if ( empty( $keywords ) ) {
return '';
}
$parts = explode( ',', $keywords );
return trim( $parts[0] );
}
}
@@ -0,0 +1,359 @@
<?php
/**
* Ability: rank-math/get-seo-scores
*
* @since 1.0.274
* @package RankMath
* @subpackage RankMath\Abilities\Content_Analysis
* @author Rank Math <support@rankmath.com>
*/
namespace RankMath\Abilities\Content_Analysis;
use RankMath\Abilities\Ability_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Registers and executes the rank-math/get-seo-scores ability.
*/
class Get_SEO_Scores implements Ability_Interface {
/**
* Default number of posts to return.
*/
const DEFAULT_NUMBER_OF_POSTS = 10;
/**
* Maximum number of posts to return.
*/
const MAX_NUMBER_OF_POSTS = 100;
/**
* Ability category slug.
*
* @var string
*/
private $category;
/**
* Shared meta args.
*
* @var array
*/
private $shared_meta;
/**
* Constructor.
*
* @param string $category Ability category slug.
* @param array $shared_meta Shared meta args.
*/
public function __construct( string $category, array $shared_meta ) {
$this->category = $category;
$this->shared_meta = $shared_meta;
}
/**
* Register the ability with the WordPress Abilities API.
*
* @return void
*/
public function register(): void {
\wp_register_ability(
'rank-math/get-seo-scores',
[
'category' => $this->category,
'label' => esc_html__( 'Get SEO scores', 'seo-by-rank-math' ),
'description' => esc_html__(
'Returns SEO scores and grades for posts. Before running, ask the user which posts they want to review: posts needing improvement (bad score), posts with no focus keyword, unscored posts, or simply the most recently modified posts. Use this to surface which posts need SEO attention without needing to know post IDs in advance.',
'seo-by-rank-math'
),
'input_schema' => [
'type' => 'object',
'default' => [],
'properties' => [
'number_of_posts' => [
'type' => 'integer',
'description' => esc_html__( 'Number of recently modified posts to retrieve. Defaults to 10, maximum 100.', 'seo-by-rank-math' ),
'minimum' => 1,
'maximum' => self::MAX_NUMBER_OF_POSTS,
'default' => self::DEFAULT_NUMBER_OF_POSTS,
],
'post_type' => [
'type' => 'string',
'description' => esc_html__( 'Post type to filter by (e.g. "post", "page"). Defaults to all public post types.', 'seo-by-rank-math' ),
],
'seo_filter' => [
'type' => 'string',
'description' => esc_html__( 'Ask the user which posts they want to review before running this ability. Available options: "bad" (score ≤ 50, needs improvement), "good" (score 51–80, ok), "great" (score > 80), "empty-fk" (no focus keyword set), "unscored" (never analyzed). If the user does not specify, omit this parameter to return the most recently modified posts.', 'seo-by-rank-math' ),
'enum' => [ 'bad', 'good', 'great', 'empty-fk', 'unscored' ],
],
],
'additionalProperties' => false,
],
'output_schema' => $this->output_schema(),
'permission_callback' => [ $this, 'check_permissions' ],
'execute_callback' => [ $this, 'execute' ],
'meta' => array_merge(
$this->shared_meta,
[
'annotations' => [
'readonly' => true,
'destructive' => false,
'idempotent' => true,
],
]
),
]
);
}
/**
* Check if the current user has permission to execute this ability.
*
* @return bool
*/
public function check_permissions(): bool {
return current_user_can( 'rank_math_onpage_analysis' );
}
/**
* Execute the ability.
*
* @param array $input Ability input arguments.
* @return array
*/
public function execute( array $input = [] ): array {
$limit = min( self::MAX_NUMBER_OF_POSTS, max( 1, absint( $input['number_of_posts'] ?? self::DEFAULT_NUMBER_OF_POSTS ) ) );
$post_type = isset( $input['post_type'] ) ? sanitize_key( $input['post_type'] ) : '';
$seo_filter = isset( $input['seo_filter'] ) ? sanitize_key( $input['seo_filter'] ) : '';
$meta_query = $this->build_meta_query( $seo_filter );
$query_args = [
'post_status' => 'publish',
'posts_per_page' => $limit,
'orderby' => 'modified',
'order' => 'DESC',
'fields' => 'ids',
];
if ( ! empty( $meta_query ) ) {
$query_args['meta_query'] = $meta_query;
// Order by score ascending for score-based filters so worst offenders surface first.
if ( in_array( $seo_filter, [ 'bad', 'good', 'great' ], true ) ) {
$query_args['orderby'] = 'meta_value_num';
$query_args['meta_key'] = 'rank_math_seo_score';
$query_args['order'] = 'ASC';
}
}
if ( ! empty( $post_type ) ) {
$query_args['post_type'] = $post_type;
} else {
$post_types = get_post_types( [ 'public' => true ] );
unset( $post_types['attachment'] );
$query_args['post_type'] = array_values( $post_types );
}
$post_ids = get_posts( $query_args );
$results = [];
foreach ( $post_ids as $post_id ) {
$results[] = $this->build_score_result( $post_id );
}
rank_math()->tracking->track_ability_executed(
'SEO Scores Retrieved',
[
'count' => count( $results ),
'post_type' => ! empty( $post_type ) ? $post_type : 'all',
'seo_filter' => ! empty( $seo_filter ) ? $seo_filter : 'none',
],
'rank_math_onpage_analysis'
);
return $results;
}
/**
* JSON schema for the ability output.
*
* @return array
*/
private function output_schema(): array {
return [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'post_id' => [ 'type' => 'integer' ],
'title' => [ 'type' => 'string' ],
'keyword' => [
'type' => [ 'string', 'null' ],
'description' => 'Primary focus keyword, or null if not set.',
],
'score' => [
'type' => [ 'integer', 'null' ],
'minimum' => 0,
'maximum' => 100,
],
'grade' => [
'type' => 'string',
'enum' => [ 'good', 'ok', 'bad', 'na' ],
],
'label' => [
'type' => 'string',
'description' => 'Human-readable grade label.',
],
'last_updated' => [ 'type' => 'integer' ],
],
],
];
}
/**
* Build the meta query for a given SEO filter.
*
* Mirrors the filter conditions defined in Post_Filters::set_seo_filters().
*
* @param string $filter SEO filter slug.
* @return array
*/
private function build_meta_query( string $filter ): array {
$hash = [
'empty-fk' => [
'key' => 'rank_math_focus_keyword',
'compare' => 'NOT EXISTS',
],
'unscored' => [
'key' => 'rank_math_seo_score',
'compare' => 'NOT EXISTS',
],
'bad' => [
'key' => 'rank_math_seo_score',
'value' => 50,
'compare' => '<=',
'type' => 'numeric',
],
'good' => [
'key' => 'rank_math_seo_score',
'value' => [ 51, 80 ],
'compare' => 'BETWEEN',
'type' => 'numeric',
],
'great' => [
'key' => 'rank_math_seo_score',
'value' => 80,
'compare' => '>',
'type' => 'numeric',
],
];
if ( ! isset( $hash[ $filter ] ) ) {
return [];
}
$meta_query = [];
// Score-based filters exclude noindexed posts and require a focus keyword, matching Post_Filters behaviour.
if ( in_array( $filter, [ 'bad', 'good', 'great' ], true ) ) {
$meta_query['relation'] = 'AND';
$meta_query[] = [
'relation' => 'OR',
[
'key' => 'rank_math_robots',
'value' => 'noindex',
'compare' => 'NOT LIKE',
],
[
'key' => 'rank_math_robots',
'compare' => 'NOT EXISTS',
],
];
$meta_query[] = [
'key' => 'rank_math_focus_keyword',
'compare' => 'EXISTS',
];
$meta_query[] = [
'key' => 'rank_math_focus_keyword',
'value' => '',
'compare' => '!=',
];
}
$meta_query[] = $hash[ $filter ];
return $meta_query;
}
/**
* Build the score result array for a single post.
*
* @param int $post_id Post ID.
* @return array
*/
private function build_score_result( int $post_id ): array {
$raw_score = get_post_meta( $post_id, 'rank_math_seo_score', true );
$keyword = $this->get_primary_keyword( $post_id );
if ( '' === $raw_score || false === $raw_score ) {
return [
'post_id' => $post_id,
'title' => get_the_title( $post_id ),
'keyword' => ! empty( $keyword ) ? $keyword : null,
'score' => null,
'grade' => 'na',
'label' => esc_html__( 'Not available', 'seo-by-rank-math' ),
'last_updated' => (int) get_post_modified_time( 'U', true, $post_id ),
];
}
$score = absint( $raw_score );
$grade = $score >= 80 ? 'good' : ( $score >= 50 ? 'ok' : 'bad' );
$label = $this->grade_to_label( $grade );
return [
'post_id' => $post_id,
'title' => get_the_title( $post_id ),
'keyword' => ! empty( $keyword ) ? $keyword : null,
'score' => $score,
'grade' => $grade,
'label' => $label,
'last_updated' => (int) get_post_modified_time( 'U', true, $post_id ),
];
}
/**
* Convert a grade slug to a human-readable label.
*
* @param string $grade Grade slug.
* @return string
*/
private function grade_to_label( string $grade ): string {
$labels = [
'good' => esc_html__( 'Good', 'seo-by-rank-math' ),
'ok' => esc_html__( 'OK', 'seo-by-rank-math' ),
'bad' => esc_html__( 'Needs improvement', 'seo-by-rank-math' ),
];
return $labels[ $grade ] ?? esc_html__( 'Not available', 'seo-by-rank-math' );
}
/**
* Get the primary focus keyword for a post.
*
* @param int $post_id Post ID.
* @return string
*/
private function get_primary_keyword( int $post_id ): string {
$keywords = get_post_meta( $post_id, 'rank_math_focus_keyword', true );
if ( empty( $keywords ) ) {
return '';
}
$parts = explode( ',', $keywords );
return trim( $parts[0] );
}
}
@@ -0,0 +1,89 @@
<?php
/**
* Subscriber for Content Analysis abilities.
*
* @since 1.0.274
* @package RankMath
* @subpackage RankMath\Abilities\Content_Analysis
* @author Rank Math <support@rankmath.com>
*/
namespace RankMath\Abilities\Content_Analysis;
use RankMath\Traits\Hooker;
use RankMath\Abilities\Subscriber_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Registers the Content Analysis ability category and its abilities.
*/
class Subscriber implements Subscriber_Interface {
use Hooker;
/**
* Ability category slug for Content Analysis abilities.
*/
const CATEGORY_SLUG = 'rank-math-content-analysis';
/**
* Shared meta args.
*
* @var array
*/
private $shared_meta;
/**
* Constructor.
*
* @param array $shared_meta Shared meta args from the top-level Abilities class.
*/
public function __construct( array $shared_meta ) {
$this->shared_meta = $shared_meta;
}
/**
* Wire hooks.
*
* @return void
*/
public function register(): void {
$this->action( 'wp_abilities_api_categories_init', 'register_category' );
$this->action( 'wp_abilities_api_init', 'register_get_seo_scores' );
$this->action( 'wp_abilities_api_init', 'register_analyze_post_content' );
}
/**
* Register the Content Analysis ability category.
*
* @return void
*/
public function register_category(): void {
\wp_register_ability_category(
self::CATEGORY_SLUG,
[
'label' => esc_html__( 'Content Analysis', 'seo-by-rank-math' ),
'description' => esc_html__( 'Abilities to retrieve on-page SEO analysis scores for posts.', 'seo-by-rank-math' ),
]
);
}
/**
* Register the rank-math/get-seo-scores ability.
*
* @return void
*/
public function register_get_seo_scores(): void {
( new Get_SEO_Scores( self::CATEGORY_SLUG, $this->shared_meta ) )->register();
}
/**
* Register the rank-math/analyze-post-content ability.
*
* @return void
*/
public function register_analyze_post_content(): void {
( new Analyze_Post_Content( self::CATEGORY_SLUG, $this->shared_meta ) )->register();
}
}