This file contains hidden or 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 | |
$url = 'http://usr:[email protected]:81/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment'; | |
if ($url === unparse_url(parse_url($url))) { | |
print "YES, they match!\n"; | |
} | |
function unparse_url($parsed_url) { | |
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; | |
$host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; |
This file contains hidden or 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 | |
class WP_Scholar_Defer_Scripts { | |
public static function initialize() { | |
add_filter( 'script_loader_tag', array( __CLASS__, 'defer_scripts' ), 10, 2 ); | |
add_filter( 'script_loader_tag', array( __CLASS__, 'async_scripts' ), 10, 2 ); | |
} | |
public static function defer_scripts( $tag, $handle ) { |
This file contains hidden or 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 | |
/* remove css for header background image */ | |
remove_action('wp_head', 'genesis_custom_header_style'); | |
remove_action( 'genesis_site_title', 'genesis_seo_site_title' ); | |
remove_action( 'genesis_site_description', 'genesis_seo_site_description' ); | |
# Hide Wordpress Specific Schema |
This file contains hidden or 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
// This file controls all base color styles for our theme. All colors should be | |
// defined in _colors.scss. This allows us to at a glance determine global color | |
// styles of our theme and prevents arbitrary color assignment. | |
// Do not use the base theme colors in the scss partial files! Set up your theme's | |
// base colors and then use scoped color values in your Sass partials. | |
// Theme Colors (private vars) | |
//------------------------------------------------------------------------------ | |
$off-black: #1c1e1f; |
This file contains hidden or 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
//* Wrap .nav-primary in a custom div | |
add_filter( 'genesis_do_nav', 'genesis_child_nav', 10, 3 ); | |
function genesis_child_nav($nav_output, $nav, $args) { | |
return '<div class="nav-primary-wrapper">' . $nav_output . '</div>'; | |
} | |
//* Wrap .nav-secondary in a custom div | |
add_filter( 'genesis_do_subnav', 'genesis_child_subnav', 10, 3 ); |
This file contains hidden or 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 //<~ don't add me in | |
add_action( 'genesis_before_entry', 'wpb_remove_comments_category' ); | |
function wpb_remove_comments_category() { | |
if ( !in_category( 38 ) ) {//adjust your Category ID's in the conditional | |
remove_action( 'genesis_after_entry', 'genesis_get_comments_template' ); | |
} | |
} |
This file contains hidden or 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
/* Bootstrap Genesis Theme Variables | |
------------------------------------------------------------ */ | |
/* Variables | |
------------------------------------------------------------ */ | |
/* Archive/Blog Styling | |
------------------------------------------------------------ */ | |
body.archive .post, | |
body.blog .post { |
This file contains hidden or 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 | |
/** | |
* Theme Setup | |
* @since 1.0.0 | |
* | |
* This setup function attaches all of the site-wide functions | |
* to the correct hooks and filters. All the functions themselves | |
* are defined below this setup function. | |
* |
This file contains hidden or 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 | |
/** | |
* wp_register_script wrapper with local fallback | |
* | |
* @param $handle | |
* @param $src | |
* @param $js_test JavaScript code to test for availability of object | |
* @param bool|false $local_src Load source file if test fails | |
* @param array $deps |
This file contains hidden or 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
.gform_wrapper .chosen-container.chosen-container-single .chosen-single { | |
display: block; | |
width: 100%; | |
height: 34px; | |
padding: 6px 12px; | |
font-size: 14px; | |
line-height: 1.428571429; | |
color: #555; | |
vertical-align: middle; | |
background-color: #fff; |