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 | |
/** | |
* Load 'directory' post type archive on home page | |
* Orderby the meta_key 'last_name' ASC | |
* | |
* Reference: http://wptheming.com/2014/10/displaying-a-custom-post-type-archive-on-the-front-page/ | |
*/ | |
function prefix_directory_front_page( $query ) { | |
// Only filter the main query on the front-end |
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 ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> | |
<nav id="comment-nav-above" class="pagination comment-pagination" role="navigation"> | |
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'cascade' ); ?></h1> | |
<span class="page-numbers"><?php printf( __( 'Page %1$s of %2$s', 'cascade' ), ( get_query_var( 'cpage' ) ? absint( get_query_var( 'cpage' ) ) : 1 ), get_comment_pages_count() ); ?></span> | |
<?php paginate_comments_links(); ?> | |
</nav><!-- .comment-navigation --> | |
<?php endif; // check for comment navigation ?> |
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 | |
/** | |
* Plugin Name: Photon Experiments | |
* Description: Experimenting with Photon parameters. | |
* Version: 0.1.0 | |
*/ | |
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) : | |
function photon_experiments() { |
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
/** | |
* Add page selector to the customizer. | |
* | |
* @since Theme 1.0.0 | |
* | |
* @param WP_Customize_Manager $wp_customize Customizer object. | |
*/ | |
function prefix_customize_register( $wp_customize ) { | |
$wp_customize->add_section( 'showcase' , array( |
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 | |
// Get pages set in the customizer (if any) | |
$pages = array(); | |
for ( $count = 1; $count <= 5; $count++ ) { | |
$mod = get_theme_mod( 'showcase-page-' . $count ); | |
if ( 'page-none-selected' != $mod ) { | |
$pages[] = $mod; | |
} | |
} |
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 | |
/** | |
* Adds a checkbox to the featured image metabox. | |
* | |
* @param string $content | |
*/ | |
function prefix_featured_image_meta( $content ) { | |
global $post; |
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 | |
/** | |
* Angular Experiments. | |
* Enqueue scripts and styles for the front end. | |
* | |
* @since 1.0.0 | |
*/ | |
function ae_scripts() { | |
// Load main stylesheet. | |
wp_enqueue_style( 'ae-style', get_stylesheet_uri() ); |
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
var myapp = angular.module( 'myapp', [] ); | |
// Set the configuration | |
myapp.run( ['$rootScope', function($rootScope) { | |
// Variables defined by wp_localize_script | |
$rootScope.api = aeJS.api; | |
}]); |
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
<div ng-controller="mycontroller"> | |
<article ng-repeat="post in posts"> | |
<h3>{{ post.title }}</h3> | |
<p>{{ post.excerpt }}</p> | |
</article> | |
</div> |
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 | |
/** | |
* Display upgrade notice on customizer page | |
*/ | |
function prefix_upsell_notice() { | |
// Enqueue the script | |
wp_enqueue_script( | |
'prefix-customizer-upsell', | |
get_template_directory_uri() . '/js/upsell.js', |