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
config/app_config.yml | |
config/database.yml | |
config/*.sphinx.conf | |
config/s3_credentials.yml | |
*~ | |
*.cache | |
*.log | |
*.pid | |
tmp/**/* | |
.DS_Store |
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 tan_show_related_content( $postid, $post_type ) { | |
global $wp_query, $post; | |
// Related IDs for this view ? | |
$ids = rpt_get_object_relation( $postid, $post_type ); | |
if( $ids == false || empty($ids) ) | |
return false; | |
$items_query = new WP_Query( array( | |
'post__in' => $ids, |
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
/* | |
* Load any taxonomy terms | |
*/ | |
function load_cpt_choices($post_type, $type, $first_choice = '', $term) { | |
$choices = array(); | |
if ($type === 'select') { | |
$posts = get_posts('post_type='.$post_type.'&numberposts=-1&school_type='.$term); | |
} |
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 | |
function tan_athlete_search_page(){ | |
if( isset($_GET['sport']) ) { | |
$sport = $_GET['sport']; | |
$sportquery = array( 'key' => 'sfn_tan_choose_sport', 'compare' => 'like', 'value' => $sport ); | |
} else { | |
$sportquery = ''; | |
} |
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
<form method="get" id="searchform" action="<?php echo home_url(); ?>/"> | |
<label class="hidden" for="s"><?php _e('', 'comienzo'); ?></label> | |
<input type="search" class="text" value="search site" name="s" id="s" /> | |
<select name="sport"> | |
<option value="" />Choose sport</option> | |
<?php | |
$metakey = 'sfn_tan_choose_sport'; | |
$sports = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = %s ORDER BY meta_value ASC", $metakey) ); | |
if ($sports) { |
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
Array | |
( | |
[headers] => Array | |
( | |
[date] => Wed, 12 Oct 2011 16:43:03 GMT | |
[server] => Apache | |
[x-frame-options] => SAMEORIGIN | |
[set-cookie] => Array | |
( | |
[0] => cwrClyrK4LoCV1fydGbAxiNL6iG=nCjyLd7d9MfRHl7YkCVHge47b1p2aZUcZJqm1l1pWkIOrNBCDtI3mJdoGwduc0EGILEnqCTT5zWFZ8QEPHgj_6hLrbjGH8B22_UCH3YkQvhladuusBIOPX-o_dCG-6gfEXsdpW%7cTMrchYr4J_kFS4bGx1rn1P3FESW--5D9CO1P9O6AUlgyt_42EAN2ZVKosoS5LWfgGI1NXG%7ckyTIO3wmjAAEyG2e7Uds0yBvJDS3ALVbWf1lUfNbhkQX4MUu8thJXciIguLaC1ALUK5IyW%7c1318437784; domain=.paypal.com; path=/; Secure; HttpOnly |
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
add_action( 'gform_paypal_post_ipn', 'tan_deal_with_posts', 10, 8 ); | |
function tan_deal_with_posts( $ipn_post, $entry, $config, $cancel ){ | |
global $current_user; | |
$time_period = $entry['1.1']; | |
$userid = $entry['created_by']; | |
if( empty( $userid ) ) $userid = $current_user->ID; |
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
// Redirect admins to the dashboard and other users elsewhere | |
add_filter( 'login_redirect', 'sfn_tan_login_redirect', 10, 3 ); | |
function sfn_tan_login_redirect( $redirect_to, $request, $user ) { | |
// Is there a user? | |
if ( is_array( $user->roles ) ) { | |
// Is it an administrator? | |
if ( in_array( 'athlete', $user->roles ) ) | |
return home_url( '/dashboard/' ); | |
else |
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 | |
// adds our custom style buttons | |
/** | |
* Filter TinyMCE Buttons | |
* | |
* Here we are filtering the TinyMCE buttons and adding a button | |
* to it. In this case, we are looking to add a style select | |
* box (button) which is referenced as "styleselect". In this |
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 | |
/** | |
* Adds scripts to the front end of the site | |
* | |
* Most scripts are only needed on the front end of the site | |
* and the function below makes sure jQuery is ready then adds | |
* the scripts we need for the site | |
* | |
* @uses wp_enqueue_script |
OlderNewer