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 replace_open_sans() { | |
// Kill the original style | |
wp_deregister_style('open-sans'); | |
// Replace it with your own (just as an example, I included only the 300 weight) | |
wp_register_style( 'open-sans', 'http://fonts.googleapis.com/css?family=Open+Sans:300' ); | |
wp_enqueue_style( 'open-sans'); | |
} | |
add_action( 'wp_enqueue_scripts', 'replace_open_sans' ); | |
// Thanks to @timkinnane | |
add_action( 'admin_enqueue_scripts', 'replace_open_sans' ); |
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 | |
function is_user_logged_in() { | |
$loggedin = false; | |
foreach ( (array) $_COOKIE as $cookie => $value ) { | |
if ( stristr($cookie, 'wordpress_logged_in_') ) | |
$loggedin = true; | |
} | |
return $loggedin; | |
} | |
if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') && ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && ! is_user_logged_in() ) |
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
$new_text = preg_replace('/[^(\x20-\x7F)]*/','', $text); |
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 you'd rather have category drop downs ?> | |
<form action="#" method="get" id="event-change"> | |
<?php | |
$current = get_query_var('tribe_events_cat'); | |
$terms = get_terms($tribe_ecp->get_event_taxonomy()); | |
$count = count($terms); | |
if ( $count > 0 ){ | |
echo '<select class="events-cat-menu"><option value="-1">All Events</option>'; | |
// print_r($terms); | |
$selected = ''; |
NewerOlder