• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Jetpack a2z

Jetpack a2z

Jetpack a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Jetpack::check_open_graph() – Check if Jetpack’s Open Graph tags should be used.

You appear to be a bot. Output may be restricted

Description

Check if Jetpack's Open Graph tags should be used.

If certain plugins are active, Jetpack's og tags are suppressed.

Usage

$null = Jetpack::check_open_graph();

Parameters

Returns

null

Source

File name: jetpack/class.jetpack.php
Lines:

1 to 27 of 27
  public function check_open_graph() {
    if ( in_array( 'publicize', self::get_active_modules() ) || in_array( 'sharedaddy', self::get_active_modules() ) ) {
      add_filter( 'jetpack_enable_open_graph', '__return_true',  < 0 );
    }

    $active_plugins = self::get_active_plugins();

    if ( ! empty( $active_plugins ) ) {
      foreach ( $this->open_graph_conflicting_plugins as $plugin ) {
        if ( in_array( $plugin, $active_plugins ) ) {
          add_filter( 'jetpack_enable_open_graph', '__return_false',  < 99 );
          break;
        }
      }
    }

    
/**
 * Allow the addition of Open Graph Meta Tags to all pages.
 *
 * @since 2.0.3
 *
 * @param bool false Should Open Graph Meta tags be added. Default to false.
 */
    if ( apply_filters( 'jetpack_enable_open_graph', false ) ) {
      require_once JETPACK__PLUGIN_DIR . 'functions.opengraph.php';
    }
  }
 

 View on GitHub View on Trac

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Related

Published: 27 November 2019 | Last updated: 27 November 2019

Primary Sidebar

Information

Function name: Jetpack::check_open_graph
Class ref: Jetpack
Plugin ref: Jetpack
Version: 9.2
Sourcefile: class.jetpack.php
File ref: class.jetpack.php
Deprecated?: No
API Letters: C,G,J,O

Footer

Jetpack a2z
Jetpack a2z
Jetpack a2z
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  jetpack.wp-a2z.org
© Copyright Jetpack a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites