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 | |
add_action( 'init', 'tgm_remove_soliloquy_license_stuff', 999 ); | |
function tgm_remove_soliloquy_license_stuff() { | |
// Do nothing if Soliloquy is not active. | |
if ( ! class_exists( 'Soliloquy' ) ) { | |
return; | |
} | |
// Remove the Settings menu and license notices. |
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 | |
add_filter( 'soliloquy_fc_slider_data', 'tgm_sol_remove_no_image' ); | |
function tgm_sol_remove_no_image( $data ) { | |
// Loop through the data and remove any items that don't have images. | |
foreach ( (array) $data['slider'] as $id => $item ) { | |
if ( empty( $item['src'] ) ) { | |
unset( $data['slider'][$id] ); | |
} | |
} |
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 | |
add_filter( 'soliloquy_fc_post_content', 'tgm_sol_full_post_content', 10, 2 ); | |
function tgm_sol_full_post_content( $content, $post ) { | |
// Use the full post content. | |
return $post->post_content; | |
} |
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 | |
add_action( 'soliloquy_api_after_transition', 'tgm_soliloquy_force_auto' ); | |
function tgm_soliloquy_force_auto( $data ) { | |
ob_start(); | |
?> | |
soliloquy_slider['<?php echo $data['id']; ?>'].startAuto(); | |
<?php | |
echo ob_get_clean(); | |
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 | |
add_filter( 'envira_gallery_output_after_image', 'tgm_envira_gallery_themes_overlay', 10, 5 ); | |
/** | |
* Adds custom HTML overlays for specific gallery themes. | |
* | |
* @since 1.0.0 | |
* | |
* @param string $output String of gallery output. | |
* @param mixed $id The ID of the gallery. | |
* @param array $item Array of data about the image. |
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 | |
add_filter( 'soliloquy_post_type_args', 'tgm_soliloquy_remove_from_search' ); | |
function tgm_soliloquy_remove_from_search( $args ) { | |
$args['exclude_from_search'] = true; | |
return $args; | |
} |
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 // Do not include this opening PHP tag! | |
add_filter( 'optin_monster_post_selection_limit', 'tgm_om_post_selection_limit' ); | |
function tgm_om_post_selection_limit( $limit ) { | |
return 5000; | |
} |
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 | |
add_filter( 'optin_monster_save_optin', 'tgm_om_disable_powered_by_link' ); | |
function tgm_om_disable_powered_by_link( $settings ) { | |
$settings['powered_by'] = 0; | |
return $settings; | |
} |
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 | |
add_filter( 'optin_monster_pre_optin_mailpoet', 'tgm_om_send_to_nimble', 10, 2 ); | |
function tgm_om_send_to_nimble( $data, $lead ) { | |
// You would enter your code to send to Nimble here, probably using wp_remote_post. Uncomment to see the data provided. | |
//echo '<pre>' . var_export( $data, true ) . '</pre>'; | |
//echo '<pre>' . var_export( $lead, true ) . '</pre>'; | |
// Return the data so it can be sent to Mailpoet. | |
return $data; |
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 | |
add_action( 'optin_monster_success_message', 'tgm_om_success_social' ); | |
function tgm_om_success_social(){ | |
echo '<div class="om-follow"><img src="' . plugins_url( 'assets/css/images/sidebar-logo@2x.png', Optin_Monster::get_instance()->file ) . '" alt="OptinMonster" style="display:block;margin:0 auto 15px;text-align:center;" width="260px" height="38px" /><p style="margin: 15px 0;font-size: 16px;line-height:20px;"><strong>Thanks for subscribing to OptinMonster. You will receive an email soon with your FREE case study increasing your conversion rates. Make sure to follow us on Twitter for all the latest updates to OptinMonster!</strong></p>'; | |
echo '<a href="https://twitter.com/optinmonster" class="twitter-follow-button" data-show-count="false" data-size="large" data-dnt="true">Follow @optinmonster</a>'; | |
echo "<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitte |