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
function run_chk_usr_lvl($matches) { | |
global $userdata; | |
if (!current_user_can('update_plugins')) { | |
remove_action('admin_notices', 'update_nag', 3); | |
remove_action( 'load-update-core.php', 'wp_update_plugins' ); | |
} | |
} | |
add_filter('pre_site_transient_update_plugins', create_function( '$a', "return null;" )); | |
add_action('admin_init', 'run_chk_usr_lvl'); |
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 $query = " | |
SELECT * FROM $wpdb->posts | |
LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id) | |
WHERE ($wpdb->posts.post_status = 'publish') AND | |
($wpdb->postmeta.meta_key = 'event_start_time') | |
ORDER BY $wpdb->postmeta.meta_value ASC"; | |
$events = $wpdb->get_results($query, OBJECT); | |
?> | |
<?php if ($events): foreach ($events as $post): ?> | |
<?php get_template_part( 'loop', 'event' ); ?> |
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
Show hidden characters
{ | |
"replacements": { | |
"nbsp": { "find": " ", "replace": " ", "greedy": true, "case": false }, | |
"remove_json_dangling_commas": { | |
"find": ",([\\r\\n\\s]*)(\\]|\\})", | |
"replace": "\\1\\2", | |
"greedy": true, | |
"scope_filter": ["-string", "-comment"] |
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
#visibility-classes { | |
position: fixed; | |
display: block; | |
top: 0; | |
left: 0px; | |
color: #FFF; | |
z-index: 1000; | |
font-size: 10px; | |
span { | |
padding: 5px; |
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 | |
if ( ! function_exists( 'clean_header' ) ): | |
/* | |
* Clean the WordPress Header | |
*/ | |
function clean_header() { |
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
if ( ! function_exists( 'google_search_form' ) ) : | |
function google_search_form( $form ) { | |
$form = '<form method="get" action="http://www.google.com/search" class="search">'; | |
$form .= '<input type="hidden" name="domains" value="' . get_bloginfo('url') . '">'; | |
$form .= '<input type="hidden" name="sitesearch" value="' . get_bloginfo('url') . '">'; | |
$form .= '<input type="text" name="q" placeholder="Search" class="input">'; | |
$form .= '<input type="submit" value="Submit" class="submit">'; | |
$form .= '</form>'; | |
return $form; |
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
$(document).ready(function(){ | |
// Open any external links in new window | |
$("a[href^='http']:not([href*='" + window.location.hostname + "'])").attr("target","_blank"); | |
// Open links to PDFs in new window | |
$('a[href$=".pdf"]').attr("target","_blank"); | |
// Don't open and links with an empty hash | |
$("a[href='#']").on("click",function(e) { e.preventDefault(); }); |
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
@mixin retina() { | |
@media only screen and (-webkit-min-device-pixel-ratio: 1.25), | |
only screen and (min-resolution: 120dpi) { | |
@content; | |
} | |
} | |
.icon { | |
background-size: 200px 40px; | |
background-image: url(img/icons.png); |
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 | |
if ( | |
!in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) | |
&& !is_admin() | |
&& !is_user_logged_in() | |
) { | |
wp_redirect( 'http://other-temp-site.com/', 302 ); exit; | |
} |
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
<div class="player"> | |
<button class="button-play ion-stop"> | |
<div class="play-crop" data-anim="play-base play-crop"> | |
<div class="play-circle" data-anim="play-base play-left"></div> | |
<div class="play-circle" data-anim="play-base play-right"></div> | |
</div> | |
</button> | |
</div> |