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_action( 'init', 'shortcodes_anywhere' ); | |
/** | |
* Run shortcodes and enable autoembed at Genesis archive intro text. | |
*/ | |
function shortcodes_anywhere(){ | |
/** Global $wp_embed */ | |
global $wp_embed; | |
add_filter('widget_text', 'do_shortcode'); | |
/** Taxonomy Intros */ | |
add_filter( 'genesis_term_intro_text_output', 'do_shortcode' ); |
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 | |
//grabbed from image.php in TwentyTwelve...credit where credit's due | |
/** | |
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, | |
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file | |
*/ | |
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); | |
foreach ( $attachments as $k => $attachment ) : | |
if ( $attachment->ID == $post->ID ) |