| @@ -24,9 +24,9 @@ | ||
| 24 | 24 | /** |
| 25 | 25 | * Initialize the class, registering WordPress hooks. |
| 26 | 26 | */ |
| 27 | 27 | public static function init() { |
| 28 | - if ( ! \function_exists( 'opengraph_metadata' ) ) { | |
| 28 | + if ( ! function_exists( 'opengraph_metadata' ) ) { | |
| 29 | 29 | \add_action( 'wp_head', array( self::class, 'add_meta_tags' ) ); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | \add_filter( 'opengraph_metadata', array( self::class, 'add_metadata' ) ); |
| @@ -93,9 +93,9 @@ | ||
| 93 | 93 | /** |
| 94 | 94 | * Output Open Graph <meta> tags in the page header. |
| 95 | 95 | */ |
| 96 | 96 | public static function add_meta_tags() { |
| 97 | - $metadata = \apply_filters( 'opengraph_metadata', array() ); | |
| 97 | + $metadata = apply_filters( 'opengraph_metadata', array() ); | |
| 98 | 98 | foreach ( $metadata as $key => $value ) { |
| 99 | 99 | if ( empty( $key ) || empty( $value ) ) { |
| 100 | 100 | continue; |
| 101 | 101 | } |
| @@ -101,12 +101,12 @@ | ||
| 101 | 101 | } |
| 102 | 102 | $value = (array) $value; |
| 103 | 103 | |
| 104 | 104 | foreach ( $value as $v ) { |
| 105 | - \printf( | |
| 105 | + printf( | |
| 106 | 106 | '<meta property="%1$s" name="%1$s" content="%2$s" />' . PHP_EOL, |
| 107 | - \esc_attr( $key ), | |
| 108 | - \esc_attr( $v ) | |
| 107 | + esc_attr( $key ), | |
| 108 | + esc_attr( $v ) | |
| 109 | 109 | ); |
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | } |