__('A Good Featured Size', 'planet-foundation' ), ) ); } add_filter( 'image_size_names_choose', 'pf_add_custom_image_to_media' ); /** * * Adds itemscope for schema.org * * @param string $output lanaguage attributes for page or post so far * * @return string itemscope for schema.org */ function pf_add_schema_org_doctype( $output ) { if ( is_singular() ) return $output . ' itemscope itemtype="http://schema.org/Article"'; return $output; } add_filter('language_attributes', 'pf_add_schema_org_doctype'); // Allows shortcodes in widgets add_filter('widget_text', 'do_shortcode'); /** * * For custom home pages when wp_title does not return anything * * @param string $title Title generated for page or post so far * * @return string $title Title for page */ function pf_baw_hack_wp_title_for_home( $title ) { if( empty( $title ) && ( is_home() || is_front_page() ) ) { $name = get_bloginfo( 'name' ); $desc = get_bloginfo( 'description' ); if ( $name && $desc ) return $name . ' | ' . $desc; else if ($name) return $name; else if ($desc) return $desc; } return "$title | " . get_bloginfo('name'); } add_filter( 'wp_title', 'pf_baw_hack_wp_title_for_home' ); /** * * Load foundation libraries * */ function pf_load_foundation() { ?>