Méthode | Description | |
---|---|---|
add_column ( array $columns ) : array | Adds SEO column on edit(-tags).php | |
add_post_state ( array $states = [], object $post ) | Adds post states in post/page edit.php query | |
get_the_seo_bar_classes ( ) : array | Returns an array of the classes used for CSS within The SEO Bar. | |
get_the_seo_bar_i18n ( ) : array | Returns an array of the i18n notices for The SEO Bar. | |
init_columns ( object | empty $screen = '', boolean $doing_ajax = false ) | Initializes columns | |
init_columns_ajax ( ) | AJAX wrapper for $this->init_columns | |
post_state ( ) | Add post state on edit.php to the page or post that has been altered. | |
post_status ( integer $post_id = '', string $type = 'inpost', boolean $echo = false ) : string | void | Renders post status. Caches the output. | |
seo_bar ( string $column, integer $post_id, string $tax_id = '' ) | Echo's the SEO Bar. | |
seo_bar_ajax ( string $column, integer $post_id, string $tax_id = '' ) | Echo's the SEO column in edit screens on Ajax call. |
Méthode | Description | |
---|---|---|
__construct ( ) | Constructor, load parent constructor. | |
get_the_seo_bar_description_length_warning ( integer $desc_len, string $class ) : array | Description Length notices. | |
get_the_seo_bar_description_words_warning ( string $description, string $class ) : string | Calculates the word count and returns a warning with the words used. | |
get_the_seo_bar_title_length_warning ( integer $tit_len, string $class ) : array | Title Length notices. | |
get_the_seo_bar_wrap ( string $content, boolean $is_term, integer | null $ajax_id = null ) : string | Wrap the SEO bar. | |
pill_the_seo_bar ( ) : boolean | Whether to square or pill the seo bar. | |
post_status_special ( string $context, string $symbol = '?', $color = 'unknown', $is_term = '', integer | null $ajax_id = null, boolean $echo = false ) : string | void | Wrap a single-line block for the SEO bar, showing special statuses. | |
the_seo_bar_archive_notice ( array $args ) : string | Render the SEO bar archive block and notice. | |
the_seo_bar_archive_robots_options ( string $type ) : boolean | Checks whether global index/archive/follow options are checked for archives. | |
the_seo_bar_blocked ( array $args ) : string | Render the SEO bar when the page/term is blocked. | |
the_seo_bar_data ( array $args ) : array | Fetch the post or term data for The SEO Bar, structured and cached. | |
the_seo_bar_description_notice ( array $args ) : string | Render the SEO bar description block and notice. | |
the_seo_bar_follow_notice ( array $args ) : string | Render the SEO bar follow block and notice. | |
the_seo_bar_index_notice ( array $args ) : string | Render the SEO bar index block and notice. | |
the_seo_bar_page ( array $args ) : string | Output the SEO bar for Terms and Taxonomies. | |
the_seo_bar_post_data ( array $args ) : array | Fetch the post data for The SEO Bar. | |
the_seo_bar_redirect_notice ( array $args ) : string | Render the SEO bar redirect block and notice. | |
the_seo_bar_term ( array $args ) : string | Output the SEO bar for Terms and Taxonomies. | |
the_seo_bar_term_data ( array $args ) : array | Fetch the term data for The SEO Bar. | |
the_seo_bar_title_notice ( array $args ) : string | Render the SEO bar title block and notice. | |
wrap_the_seo_bar_block ( array $args ) : string | Outputs a part of the SEO Bar based on parameters. |
public add_column ( array $columns ) : array | ||
$columns | array | The existing columns |
Résultat | array | $columns the column data |
public add_post_state ( array $states = [], object $post ) | ||
$states | array | The current post states array |
$post | object | The Post Object. |
public get_the_seo_bar_classes ( ) : array | ||
Résultat | array | The class names. |
public get_the_seo_bar_i18n ( ) : array | ||
Résultat | array | The i18n sentences. |
protected get_the_seo_bar_title_length_warning ( integer $tit_len, string $class ) : array | ||
$tit_len | integer | The Title length |
$class | string | The Current Title notification class. |
Résultat | array | { string $notice => The notice, string $class => The class, bool $but => Whether we should use but or and, } |
protected get_the_seo_bar_wrap ( string $content, boolean $is_term, integer | null $ajax_id = null ) : string | ||
$content | string | The SEO Bar content. |
$is_term | boolean | Whether the bar is for a term. |
$ajax_id | integer | null | The unique Ajax ID to generate a small on-hover script for. |
Résultat | string | The SEO Bar wrapped. |
public init_columns ( object | empty $screen = '', boolean $doing_ajax = false ) | ||
$screen | object | empty | WP_Screen |
$doing_ajax | boolean | Whether we're doing an AJAX response. |
public init_columns_ajax ( ) |
protected pill_the_seo_bar ( ) : boolean | ||
Résultat | boolean |
public post_state ( ) |
public post_status ( integer $post_id = '', string $type = 'inpost', boolean $echo = false ) : string | void | ||
$post_id | integer | The Post ID or taxonomy ID. |
$type | string | Is fetched on edit.php, inpost, taxonomies, etc. |
$echo | boolean | Whether to echo the value. Does not eliminate return. |
Résultat | string | void | $content The post SEO status. Void if $echo is true. |
protected post_status_special ( string $context, string $symbol = '?', $color = 'unknown', $is_term = '', integer | null $ajax_id = null, boolean $echo = false ) : string | void | ||
$context | string | The hover/screenreader context. |
$symbol | string | The single-character symbol. |
$ajax_id | integer | null | The unique Ajax ID to generate a small on-hover script for this ID. May be Arbitrary. |
$echo | boolean | Whether to echo the output. |
Résultat | string | void | The special block with wrap. Void if $echo is true. |
protected the_seo_bar_archive_notice ( array $args ) : string | ||
$args | array | |
Résultat | string | The SEO Bar Follow Block |
protected the_seo_bar_archive_robots_options ( string $type ) : boolean | ||
$type | string | : 'noindex', 'nofollow', 'noarchive' |
Résultat | boolean |
protected the_seo_bar_blocked ( array $args ) : string | ||
$args | array | { $is_term => bool, $redirect => bool, $noindex => bool, $post_i18n => string } |
Résultat | string | The SEO Bar |
protected the_seo_bar_data ( array $args ) : array | ||
$args | array | The term/post args. |
Résultat | array | $data { 'title' => $title, 'title_is_from_custom_field' => $title_is_from_custom_field, 'description' => $description, 'description_is_from_custom_field' => $description_is_from_custom_field, 'nofollow' => $nofollow, 'noarchive' => $noarchive } |
protected the_seo_bar_description_notice ( array $args ) : string | ||
$args | array | |
Résultat | string | The SEO Bar Description Block |
protected the_seo_bar_follow_notice ( array $args ) : string | ||
$args | array | |
Résultat | string | The SEO Bar Follow Block |
protected the_seo_bar_index_notice ( array $args ) : string | ||
$args | array | |
Résultat | string | The SEO Bar Index Block |
protected the_seo_bar_page ( array $args ) : string | ||
$args | array | { 'is_term' => $is_term, 'term' => $term, 'post_id' => $post_id, 'post_i18n' => $post_i18n, 'post_low' => $post_low, 'type' => $type, } |
Résultat | string | $content The SEO bar. |
protected the_seo_bar_post_data ( array $args ) : array | ||
$args | array | The post args. |
Résultat | array | $data { 'title' => $title, 'title_is_from_custom_field' => $title_is_from_custom_field, 'description' => $description, 'description_is_from_custom_field' => $description_is_from_custom_field, 'nofollow' => $nofollow, 'noarchive' => $noarchive } |
protected the_seo_bar_redirect_notice ( array $args ) : string | ||
$args | array | |
Résultat | string | The SEO Bar Redirect Block |
protected the_seo_bar_term ( array $args ) : string | ||
$args | array | { 'is_term' => bool $is_term, 'term' => object $term, 'post_i18n' => string $post_i18n, 'post_low' => string $post_low, 'type' => string $type, } |
Résultat | string | $content The SEO bar. |
protected the_seo_bar_term_data ( array $args ) : array | ||
$args | array | The term args. |
Résultat | array | $data { 'title' => $title, 'title_is_from_custom_field' => $title_is_from_custom_field, 'description' => $description, 'description_is_from_custom_field' => $description_is_from_custom_field, 'nofollow' => $nofollow, 'noarchive' => $noarchive } |
protected the_seo_bar_title_notice ( array $args ) : string | ||
$args | array | |
Résultat | string | The SEO Bar Title Block |
protected wrap_the_seo_bar_block ( array $args ) : string | ||
$args | array | : { string $indicator string $notice string $width string $class } |
Résultat | string | The SEO Bar block part. |