Last active
February 17, 2020 14:15
-
-
Save wpmudev-sls/95c7fa6c11a163425c5efc7f18d4c316 to your computer and use it in GitHub Desktop.
[Hustle Pro] - Shortcode template for embed code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: [Hustle Pro] - Shortcode template for embed code | |
* Description: [Hustle Pro] - Shortcode template for embed code | |
* Task: 0/11289012348292/1161822563205200 | |
* Author: Thobk @ WPMUDEV | |
* Author URI: https://premium.wpmudev.org | |
* License: GPLv2 or later | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { exit; } elseif ( defined( 'WP_CLI' ) && WP_CLI ) { return; } | |
add_action( 'after_setup_theme', 'wpmudev_hustle_shortcode_for_embed_code_func', 100 ); | |
function wpmudev_hustle_shortcode_for_embed_code_func() { | |
if( defined('HUSTLE_SUI_VERSION') && class_exists( 'Hustle_Module_Collection' ) ){ | |
add_shortcode( 'wpmudev_hustle_embed_code', 'wpmudev_hustle_shortcode_for_embed_code' ); | |
function wpmudev_hustle_shortcode_for_embed_code(){ | |
ob_start(); | |
?> | |
<!-- start your embed code here --> | |
<iframe class="uvembed84900" frameborder="0" src="https://static.upviral.com/loader.html" ></iframe> | |
<script> | |
window.UpviralConfig = { | |
camp: "8GSR($", | |
widget_style:"iframe", | |
width:"500px"} | |
</script> | |
<script language="javascript" src="https://snippet.upviral.com/upviral.js"></script> | |
<!-- end your code here --> | |
<?php | |
return ob_get_clean(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment