Skip to content

Instantly share code, notes, and snippets.

@wpmudev-sls
Created September 26, 2019 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpmudev-sls/39aa2e8e5b008220ef30d85c327212eb to your computer and use it in GitHub Desktop.
Save wpmudev-sls/39aa2e8e5b008220ef30d85c327212eb to your computer and use it in GitHub Desktop.
[SmartCrawl] Priority OG Tags
<?php
/**
* Plugin Name: [SmartCrawl] Priority OG Tags
* Description: [SmartCrawl] Priority OG Tags - 1141840275444771
* Author: Thobk @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action( 'plugins_loaded', 'wpmudev_sc_priority_og_tags', 100 );
function wpmudev_sc_priority_og_tags() {
if ( defined( 'SMARTCRAWL_VERSION' ) && SMARTCRAWL_VERSION
&& class_exists( 'Smartcrawl_OpenGraph_Printer' )
) {
$open_graph = Smartcrawl_OpenGraph_Printer::get();
remove_action( 'wp_head', array( $open_graph, 'dispatch_og_tags_injection' ), 50 );
add_action( 'wp_head', array( $open_graph, 'dispatch_og_tags_injection' ), 5 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment