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 = ''; |
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 | |
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
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Money Morning Ticket Export</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
$('.ticket-util').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
<?php | |
add_action( 'wp', 'schedule_task' ); | |
/* Let's schedule some tasks! */ | |
function schedule_task() { | |
if ( ! wp_next_scheduled( 'task_hook' ) ) { | |
// Add scheduled daily task | |
wp_schedule_event( time(), 'daily', 'task_hook'); | |
} | |
} | |
add_action( 'task_hook', 'function_to_run' ); |
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 | |
// in functions.php | |
add_action('wp_ajax_testing_axaj', 'ajax_function_to_execute', 1, 2); | |
add_action('wp_ajax_nopriv_testing_axaj', 'ajax_function_to_execute', 1, 2); | |
function ajax_function_to_execute() { | |
print_r($_REQUEST); | |
die(); |
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
//Find your IP vis curl | |
curl ipecho.net/plain |
OlderNewer