updated plugin ActivityPub version 9.1.0
This commit is contained in:
@ -25,7 +25,7 @@ class Opengraph {
|
||||
* Initialize the class, registering WordPress hooks.
|
||||
*/
|
||||
public static function init() {
|
||||
if ( ! function_exists( 'opengraph_metadata' ) ) {
|
||||
if ( ! \function_exists( 'opengraph_metadata' ) ) {
|
||||
\add_action( 'wp_head', array( self::class, 'add_meta_tags' ) );
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ class Opengraph {
|
||||
* Output Open Graph <meta> tags in the page header.
|
||||
*/
|
||||
public static function add_meta_tags() {
|
||||
$metadata = apply_filters( 'opengraph_metadata', array() );
|
||||
$metadata = \apply_filters( 'opengraph_metadata', array() );
|
||||
foreach ( $metadata as $key => $value ) {
|
||||
if ( empty( $key ) || empty( $value ) ) {
|
||||
continue;
|
||||
@ -102,10 +102,10 @@ class Opengraph {
|
||||
$value = (array) $value;
|
||||
|
||||
foreach ( $value as $v ) {
|
||||
printf(
|
||||
\printf(
|
||||
'<meta property="%1$s" name="%1$s" content="%2$s" />' . PHP_EOL,
|
||||
esc_attr( $key ),
|
||||
esc_attr( $v )
|
||||
\esc_attr( $key ),
|
||||
\esc_attr( $v )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user