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 daz_custom_field_on_publish( $new, $old, $post ) { | |
$unixtime = date(strtotime("+1 week")); | |
$now = date("m/d/Y",$unixtime); | |
if ( $new == 'publish' && $old == 'pending') { | |
update_post_meta( $post->ID, '_post_expiration_date', $now ); | |
} | |
} | |
add_action( 'transition_post_status', 'daz_custom_field_on_publish', 10, 3 ); |
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 my_page_template_redirect() | |
{ | |
if( is_front_page() && is_user_logged_in() ) | |
{ | |
global $current_user; | |
get_currentuserinfo(); | |
$url = add_query_arg( array( | |
'firstName' => $current_user->user_firstname, |
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
//CREATE THE INTEREST TAXONOMY | |
//New Interest Taxonomy for Users | |
register_taxonomy('interest', 'user', array( | |
'public' =>true, | |
'single_value' => false, | |
'show_admin_column' => true, | |
'labels' =>array( | |
'name' =>'Interests', | |
'singular_name' =>'Interest', | |
'menu_name' =>'Interests', |
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
global $pmprogl_gift_levels; | |
$pmprogl_gift_levels = array( | |
// Set level 9 as a "Purchase Gift" membership level to create a gift code for a free level 5 gift. | |
9 => array( | |
'level_id' => 5, // Create a gift code for level 5 | |
'initial_payment' => 0, // with an initial payment of $0.00 | |
'billing_amount' => 0, // and no recurring billing amount | |
'cycle_number' => 0, // The number of billing cycles for the gift membership level. | |
'cycle_period' => '', // The billing cycle period. Possible values are "Day", "Week", "Month", and "Year" (without the quotes). | |
'billing_limit' => 0, // The billing cycle limit for the gift membership level. |
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 | |
if ( ! function_exists('cpt_sponsor') ) { | |
// Register Custom Post Type for SPONSORS | |
function cpt_sponsor() { | |
$labels = array( | |
'name' => _x( 'Sponsors', 'Post Type General Name', 'text_domain' ), | |
'singular_name' => _x( 'Sponsor', 'Post Type Singular Name', 'text_domain' ), |
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
//wrap action in condition to show ONLY if ACF is active, avoiding errors | |
if( class_exists('acf') ) { | |
add_action( 'genesis_before_content', 'dz_output_slick_slider' ); | |
} | |
function dz_output_slick_slider() { | |
$post_object = get_field('select_a_slider'); | |
//$post_object_id = $post_object->ID; |