coresocial_get_term_title

Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

PHP
Definition
apply_filters( "coresocial_get_term_title", $title, $term, $method );
coreSocial 4.0 — core/base/Method.php:183
Arguments
Name
Type
Description
$title
string|null
Title resolved by the plugin before the optional site-name suffix.
$term
WP_Term
Resolved term object.
$method
Dev4Press\Plugin\coreSocial\Base\Method
Calling sharing method.
Returns
string — Title used in the sharing context.

Filters the term title before the Append website name option is applied. Return a plain-text title and preserve the object-specific context.

The final method converts a null result to an empty string. This hook does not change the WordPress term title stored in the database.

Example

add_filter( 'coresocial_get_term_title', function ( $title, $term, $method ) {
    return wp_strip_all_tags( (string) $title );
}, 10, 3 );
Rate this reference
0
0
2

You are not allowed to rate this post.

Leave a Comment

0
0
0
0
0
0
0
0
0