debug-bar
5 years ago
3rd-party.php
5 years ago
bbpress.php
5 years ago
beaverbuilder.php
5 years ago
bitly.php
5 years ago
buddypress.php
5 years ago
class-domain-mapping.php
5 years ago
class-jetpack-bbpress-rest-api.php
5 years ago
class-jetpack-crm-data.php
5 years ago
class-jetpack-modules-overrides.php
5 years ago
class.jetpack-amp-support.php
5 years ago
creative-mail.php
5 years ago
crowdsignal.php
5 years ago
debug-bar.php
5 years ago
qtranslate-x.php
5 years ago
vaultpress.php
5 years ago
web-stories.php
5 years ago
woocommerce-services.php
5 years ago
woocommerce.php
5 years ago
wpml.php
5 years ago
web-stories.php
37 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Compatibility functions for the Web Stories plugin. |
| 4 | * https://wordpress.org/plugins/web-stories/ |
| 5 | * |
| 6 | * @since 9.2.0 |
| 7 | * |
| 8 | * @package automattic/jetpack |
| 9 | */ |
| 10 | |
| 11 | namespace Automattic\Jetpack\Web_Stories; |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Filter to enable web stories built in open graph data from being output. |
| 19 | * If Jetpack is already handling Open Graph Meta Tags, the Web Stories plugin will not output any. |
| 20 | * |
| 21 | * @param bool $enabled If web stories open graph data is enabled. |
| 22 | * |
| 23 | * @return bool |
| 24 | */ |
| 25 | function maybe_disable_open_graph( $enabled ) { |
| 26 | /** This filter is documented in class.jetpack.php */ |
| 27 | $jetpack_enabled = apply_filters( 'jetpack_enable_open_graph', false ); |
| 28 | |
| 29 | if ( $jetpack_enabled ) { |
| 30 | $enabled = false; |
| 31 | } |
| 32 | |
| 33 | return $enabled; |
| 34 | } |
| 35 | add_filter( 'web_stories_enable_open_graph_metadata', __NAMESPACE__ . '\maybe_disable_open_graph' ); |
| 36 | add_filter( 'web_stories_enable_twitter_metadata', __NAMESPACE__ . '\maybe_disable_open_graph' ); |
| 37 |