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
$type= post_type; | |
$name=posts; | |
function referring_url_box ( 'post_type', 'post') { | |
pods_group_add( 'posts', 'Referring URL', 'referring_url_name, referring_url' ); | |
} |
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
$type= post_type; | |
$name=post; | |
function referring_url_box ( $type, $name) { | |
pods_group_add( 'post', 'Referring URL', 'referring_url_name, referring_url' ); | |
pods_group_add( 'post', 'Downloads', 'download_name, download_location' ); | |
pods_group_add( 'post', 'Contact', 'contact_name, contact_url' ); | |
} |
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
$('html,body').animate({ | |
scrollTop: $('a[href*="' + window.location.hash.replace('#','') + '"]').eq(0).offset().top - top_offset | |
}, 400) | |
window.location.hash = '/'; | |
$('li.active').removeClass('active loading'); | |
$article.remove(); | |
}) |
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
$catray[] = $categorize; | |
$access = file_get_contents('https://graph.facebook.com/oauth/access_token?type=client_cred&client_id=' . $clientid . '&client_secret=' . $clientsecret . ''); | |
$token = str_replace('access_token=', '', $access); | |
// Fire the Hfbp request to Twitter | |
$response[] = 'https://graph.facebook.com/' . $pageid . '?fields=statuses.fields(from,id,message)&access_token='.$token; | |
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
// Filter wp_nav_menu() to add link to recent lottery | |
function new_nav_menu_items($items) { | |
// Get the most recent post | |
$the_query = new WP_Query( 'posts_per_page=1' ); | |
// Pull the excerpt | |
while ( $the_query->have_posts() ) : $the_query->the_post(); | |
$latest_link = '<li> <a href="' . get_permalink() . '>Lotteries</a></li>'; | |
endwhile; | |
$items = $latest_link . $items; | |
return $items; |
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
// Filter wp_nav_menu() to add link to recent lottery | |
function new_nav_menu_items($items) { | |
// Get the most recent post | |
$the_query = new WP_Query( 'post_type=toy_lotteries' , 'posts_per_page=1' ); | |
// Pull the link | |
while ( $the_query->have_posts() ) : $the_query->the_post(); | |
$latest_link = '<li> <a href="' . get_permalink() . '">Lotteries</a></li>'; | |
endwhile; | |
$items = $latest_link . $items; | |
return $items; |
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
class description_walker extends Walker_Nav_Menu | |
{ | |
/** | |
* Start the element output. | |
* | |
* @param string $output Passed by reference. Used to append additional content. | |
* @param object $item Menu item data object. | |
* @param int $depth Depth of menu item. May be used for padding. | |
* @param array $args Additional strings. |
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
<ul id="menu-main-nav" class="nav-menu"><li id="nav-menu-item-17" class="main-menu-item menu-item-even menu-item-depth-0 about menu-item menu-item-type-post_type menu-item-object-page"><a href="http://nsr.dev/about-us/" data-description="Our Story" class="menu-link main-menu-link">About Us</a><small class="nav_desc">Our Story</small> | |
<ul class="sub-menu menu-odd menu-depth-1"> | |
<li id="nav-menu-item-34" class="sub-menu-item menu-item-odd menu-item-depth-1 menu-item menu-item-type-post_type menu-item-object-page"><a href="http://nsr.dev/about-us/about-sub-page/" class="menu-link sub-menu-link">History</a></li> | |
<li id="nav-menu-item-32" class="sub-menu-item menu-item-odd menu-item-depth-1 menu-item menu-item-type-post_type menu-item-object-page"><a href="http://nsr.dev/about-us/values-mission/" class="menu-link sub-menu-link">Values & Mission</a></li> | |
<li id="nav-menu-item-33" class="sub-menu-item menu-item-odd menu-item-depth-1 menu-item menu-item-type-post_type menu-item-object-page"><a href="http |
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
// Schedules an event | |
function fbp_create_schedule2() { | |
global $fbp_opts; | |
$recurrence = isset($fbp_opts['recurrence']) ? $fbp_opts['recurrence'] : 'hourly'; | |
$schedule = wp_get_schedule('fbp_statuses_to_posts'); | |
$author_id = isset($fbp_opts['author']) ? $fbp_opts['author'] : 0; | |
$author = get_user_by('id', $author_id); | |
// Clear the schedule if recurrence was changed | |
if($schedule != $recurrence) { | |
wp_clear_scheduled_hook('fbp_statuses_to_posts'); |
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
foreach($statusesray as $status) | |
{ | |
if($status->type=="status") | |
{ | |
do stuff | |
} | |
// this echos "photo" which is expected when the type == photo | |
echo $status->type; |