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_output_slide', 'tgm_soliloquy_custom_html', 10, 4 ); | |
function tgm_soliloquy_custom_html( $html, $id, $image, $data ) { | |
// If the ID doesn't match the one we want to modify, return the default HTML output. Change 324 to your slider ID. | |
$slider_id = $data['id']; | |
if ( '1937' != $slider_id ) return $html; | |
ob_start(); ?> | |
<span class="social-m"> | |
<?php $summary = get_field('short_description');?> |
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
add_action( 'pre_get_posts', array( $this, 'hide_children_posts' ) ); | |
function hide_children_posts( $query ) { | |
if ( !is_post_type_archive( 'hotspot' ) || !is_admin() ) return; | |
$query->set( 'post_parent', 0 ); | |
} |
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
function td_debug_log($sMsg = NULL) { | |
if (!is_string($sMsg)) $sMsg = print_r($sMsg, true); | |
$sFile = dirname(__FILE__) . '/~log.txt'; | |
$fh = fopen($sFile, 'a+'); | |
if ($fh !== FALSE) | |
{ | |
if ($sMsg === NULL) | |
fwrite($fh, date("\r\nY-m-d H:I:s:\r\n")); | |
else | |
fwrite($fh, date('Y-m-d H:i:s - ') . $sMsg . "\r\n"); |
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
// In Canvas admin-interface.php | |
// executed on main theme options page | |
if ( $pagenow == 'admin.php' && isset( $_GET['page'] ) && $_GET['page'] == 'woothemes' ) { | |
if ( get_option( 'framework_woo_theme_version_checker' ) == 'true' ) { add_action( 'admin_notices', 'woo_theme_update_notice', 10 ); } | |
// Which calls theme update notice (if it's not disabled) | |
if ( ! function_exists( 'woo_theme_update_notice' ) ) { | |
function woo_theme_update_notice () { | |
$theme_data = get_theme_data( get_template_directory() . '/style.css' ); |
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
add_filter('option_active_plugins', 'p2_filter_active_plugins'); | |
function p2_filter_active_plugins($active_plugins) { | |
if(get_template()!='p2') return $active_plugins; | |
$required_plugins = array( | |
'inform-about-content/inform-about-content.php' | |
); | |
foreach ($required_plugins as $key => $plugin) { | |
if(!(in_array($plugin, $active_plugins))) $active_plugins[] = $plugin; |
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
add_filter('gform_pre_render', 'tdgf_favorite_food'); | |
function tdgf_favorite_food($form) { | |
if(empty($form['fields'])) return; | |
foreach ($form['fields'] as $key => &$field) { | |
if($field['cssClass']!='favorite_food' || empty($field['choices'])) continue; | |
$field['choices'] = array('apples' => 'Apples', 'oranges' => 'Oranges'); | |
} | |
return $form; |
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
<div id="testfield" class="span16"> | |
<div class="flyout-wrap"> | |
<a class="flyout-btn" href="#" title="Toggle"><span>Flyout Menu Toggle</span></a> | |
<ul class="flyout flyout-init"> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> |
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
<div id="testfield" class="span16"> | |
<div class="flyout-wrap"> | |
<a class="flyout-btn" href="#" title="Toggle"><span>Flyout Menu Toggle</span></a> | |
<ul class="flyout flyout-init"> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> |
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
<div id="testfield" class="span16"> | |
<div class="flyout-wrap"> | |
<a class="flyout-btn" href="#" title="Toggle"><span>Flyout Menu Toggle</span></a> | |
<ul class="flyout flyout-init"> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> |
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
<div id="testfield" class="span16"> | |
<div class="flyout-wrap"> | |
<a class="flyout-btn" href="#" title="Toggle"><span>Flyout Menu Toggle</span></a> | |
<ul class="flyout flyout-init"> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> | |
<li><a href="#"><span>Item</span></a></li> |
OlderNewer