No longer kept up to date.
Please see Sridhar's fork.
| <?php | |
| /* | |
| * Examples to add custom classes to Genesis WordPress Framework Markup when using HTML5 output | |
| */ | |
| add_action( 'genesis_setup', 'srf_add_cust_classes', 15 ); // Priority 15 ensures it runs after Genesis itself has setup. | |
| function srf_add_cust_classes() { | |
| add_filter( 'genesis_attr_site-inner', 'srf_attr_site_inner' ); | |
| add_filter( 'genesis_attr_content-sidebar-wrap', 'srf_attr_content_sidebar_wrap' ); | |
| add_filter( 'genesis_attr_content', 'srf_attr_content' ); | |
| add_filter( 'genesis_attr_sidebar-primary', 'srf_attr_sidebar_primary' ); |
| <?php | |
| // Don't include the above. | |
| add_filter( 'genesis_get_image_default_args', 'prefix_stop_auto_featured_image' ); | |
| /** | |
| * Stop Genesis archives from using first attached image as fallback when no featured image is set. | |
| * | |
| * @param array $args Default image arguments. | |
| * |
| <?php | |
| // Don't include the above | |
| add_filter( 'wp_kses_allowed_html', 'georgef_allow_anchor_target_attribute_in_biography', 20, 2 ); | |
| /** | |
| * Allow links to have a target attribute in user biographical information. | |
| * | |
| * @author Gary Jones | |
| * @link http://www.studiopress.com/forums/topic/about-the-author-box-can-open-links-in-new-window/ |
| <?php | |
| // Don't include the above | |
| add_filter( 'wp_nav_menu_items', 'prefix_change_nav_date_format', 15, 2 ); | |
| /** | |
| * Filter the Primary Navigation menu items in Genesis, to change the date format. | |
| * | |
| * @author Gary Jones | |
| * @link http://www.studiopress.com/forums/topic/abbreviate-month-in-primary-navigation-bar-enterprise/ |
No longer kept up to date.
Please see Sridhar's fork.
| <?php | |
| add_action( 'pre_get_posts', 'mfsbig_remove_floating_social_bar', 15 ); | |
| /** | |
| * Remove Floating Social Bar from outputting at the top of the content. | |
| * | |
| * FSB adds these filters at pre_get_posts, priorty 10, so we'll remove them | |
| * just after that. | |
| * | |
| * @author Gary Jones |
| <?php | |
| add_filter( 'gettext', 'prefix_genesis_header_nav_name', 10, 3 ); | |
| /** | |
| * Change the name of the Header menu location added by Genesis Header Nav plugin. | |
| */ | |
| function prefix_genesis_header_nav_name( $translated_text, $original_text, $domain ) { | |
| if ( 'genesis-header-nav' === $domain && 'Header' === $original_text ) | |
| return 'Top'; | |
| } |
| <?php | |
| //* Do NOT include the opening php tag | |
| //* Add Organization schema to our logo | |
| add_filter( 'genesis_seo_title', 'rvam_header_title', 10, 3 ); | |
| function rvam_header_title( $title, $inside, $wrap ) { | |
| $inside = sprintf( '<div itemscope="itemscope" itemtype="http://schema.org/Organization"><a itemprop="url" href="%s" title="%s"><img class="logo" itemprop="logo" src="http://www.rvamedia.com/img/rva-media.png" alt="%s" /></a></div>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) ); | |
| return sprintf( '<%1$s id="title">%2$s</%1$s>', 'span', $inside ); | |
| } |
| <?php | |
| /** | |
| * Registers an option sanitization filter. | |
| * | |
| * If the option is an "array" option type with "suboptions", you have to use the third param to specify the | |
| * suboption or suboptions you want the filter to apply to. DO NOT call this without the third parameter on an option | |
| * that is an array option, because in that case it will apply that filter to the array(), not each member. | |
| * | |
| * Use the 'genesis_settings_sanitizer_init' action to be notified when this function is safe to use |
| <?php | |
| // Don't include the above <?php when copying and pasting to your child theme functions.php! | |
| add_filter( 'genesis_post_info', 'gmj_fix_post_info_linked_author', 10, 2 ); | |
| /** | |
| * Temporary fix for an incorrect escaping in genesis_post_author_link_shortcode() for Genesis 2.0.0. | |
| * | |
| * This function can probably be removed once Genesis 2.0.1 is released. | |
| * |