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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Conditional Logic to Detect Various Event Related Views/Pages | |
/*-----------------------------------------------------------------------------------*/ | |
if( tribe_is_month() && !is_tax() ) { // Month View Page | |
echo 'were on the month view page'; | |
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |
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 | |
/* | |
Plugin Name: Pug Bomb API Endpoint | |
Description: Adds an API endpoint at /api/pugs/$n_pugs | |
Version: 0.1 | |
Author: Brian Fegter | |
Author URL: http://coderrr.com | |
*/ | |
class Pugs_API_Endpoint{ |
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
// rename existing sections | |
$wp_customize->add_section( 'section_id' , array( | |
'title' => __('Section Title','mytheme'), | |
'priority' => 20, | |
)); |
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 | |
$post_type = get_post_type_object( get_post_type($post) ); | |
echo $post_type->labels->name; | |
?> |
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 rkv_remove_columns( $columns ) { | |
// remove the Yoast SEO columns | |
unset( $columns['wpseo-score'] ); | |
unset( $columns['wpseo-title'] ); | |
unset( $columns['wpseo-metadesc'] ); | |
unset( $columns['wpseo-focuskw'] ); |
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 | |
// LOGOUT LINK IN MENU | |
function diww_menu_logout_link( $nav, $args ) { | |
$logoutlink = '<li><a href="'.wp_logout_url().'">Logout</a></li>'; | |
if( $args->theme_location == 'primary' ) { | |
return $nav.$logoutlink ; | |
} else { | |
return $nav; |
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 (($wp_query->current_post +1) == ($wp_query->post_count)) { | |
echo 'This is the last post'; | |
} ?> | |
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) { | |
echo 'This is the not the last post'; | |
} ?> |
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
// Get And Cache Vimeo Thumbnails | |
function get_vimeo_thumb($id, $size = 'thumbnail_small') | |
{ | |
if(get_transient('vimeo_' . $size . '_' . $id)) | |
{ | |
$thumb_image = get_transient('vimeo_' . $size . '_' . $id); | |
} | |
else | |
{ | |
$json = json_decode( file_get_contents( "http://vimeo.com/api/v2/video/" . $id . ".json" ) ); |
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 | |
/* | |
Plugin Name: Convert Custom Taxonomy to Custom Post Type | |
Plugin URI: N/A | |
Description: A plugin to convert a Custom Taxonomy to a Custom Post Type and transfer associated metadata. | |
Version: 0.1 | |
Author: Strap1 | |
Author URI: http:/www.hiphopinenglish.com | |
/** Convert Taxonomy '%name%' to CPT '%name%' **/ |
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 | |
/* | |
Plugin Name: Restrict Content Pro - Custom User Fields | |
Description: Illustrates how to add custom user fields to the Restrict Content Pro registration form that can also be edited by the site admins | |
Version: 1.0 | |
Author: Pippin Williamson | |
Author URI: http://pippinsplugins.com | |
Contributors: mordauk | |
*/ |
OlderNewer