View gist:d01f9b223687b94a3c9274061fd441f1
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 iwm_callback() { | |
var connectmap = jQuery('#map_canvas_1'); | |
if(connectmap.length > 0 && !connectmap.hasClass('iwm_connected')){ | |
iwm_connect('1','#f03b21','#f03b22','red',1,'dashed-arrow'); | |
iwm_connect('1','#f03b22','#f03b23','#667788',1,'curved-arrow'); | |
iwm_connect('1','#f03b23','#6699cc','#667788',1,'dashed-curved-arrow'); | |
connectmap.addClass('iwm_connected'); | |
} | |
} |
View gist:a377c38521bfe142189f7f0690a39a12
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 | |
/** | |
* Filter the CPT to register more options | |
* | |
* @param $args array The original CPT args. | |
* @param $post_type string The CPT slug. | |
* | |
* @return array | |
*/ |
View register_cpt.php
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 register_my_cpt() { | |
$args = array( | |
'public' => true, | |
'label' => 'Books' | |
'yarpp_support' => true, | |
); | |
register_post_type( 'book', $args ); | |
} | |
add_action( 'init', 'register_my_cpt' ); |
View team-showcase-order.php
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
//Order for Fields | |
add_filter('tshowcase_content_order','my_tshowcase_content_order'); | |
function my_tshowcase_content_order($tshowcase_fields){ | |
$ts_content_order = array( | |
1 => 'title', | |
2 => 'groups', | |
3 => 'taxonomy', | |
4 => 'ctaxonomy', | |
5 => 'dtaxonomy', |
View create_multisite_wp_cli
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
wp core download | |
wp config create --dbname="database_name" --dbuser="database_user" --dbpass="database_pass" | |
wp core multisite-install --title="Welcome to the WordPress" --admin_user="admin" --admin_password="password" --admin_email="email@gmail.com" --url="http://localhost" --skip-email |
View get_multisite_themes.php
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
if ( function_exists( 'get_sites' ) && class_exists( 'WP_Site_Query' ) ) { | |
$sites = get_sites(); | |
foreach ( $sites as $site ) { | |
switch_to_blog( $site->blog_id ); | |
$curr = get_blog_details(); | |
$theme = wp_get_theme(); | |
echo '<h1>' . $curr->blogname . '</h1>'; | |
echo $theme->Name; | |
$style_parent_theme = wp_get_theme(get_template()); |
View new_url_mobile.js
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
jQuery( document ).ready(function() { | |
var isMobile = window.matchMedia("only screen and (max-width: 760px)"); | |
if (isMobile.matches) { | |
iwmparam[0]['action'] = 'i_map_action_open_url_new'; | |
} | |
}); |
View salient-fix.js
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
jQuery(document).ready(function(){ | |
jQuery( '[data-featherlight]' ).each( function(){ | |
jQuery(this).attr('data-featherlight', jQuery(this).attr('href')) | |
.removeAttr("href"); | |
}); | |
}); |
View ios_click_fix.js
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
jQuery(document).ready(function(){ | |
var isMobile = window.matchMedia("only screen and (max-width: 760px)"); | |
if (isMobile.matches && navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { | |
iwmparam[0]['usehtml'] = 0; | |
} | |
}); |
View hide_empty_tooltips.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
/* | |
INSTRUCTIONS: | |
1. replace _1 with the ID of your map. | |
2. use the 'tooltip' field to add your information. The 'title' field will not display. | |
*/ | |
/* this will hide an empty div the tooltip has, which may cause some white space */ | |
.iwm_map_canvas #map_canvas_1 li.google-visualization-tooltip-item:first-child { display:none; box-shadow:none; } | |
/* this will hide the element in case it is empty */ |
OlderNewer