= 2 ) //WP-DIR { add_action( 'after_setup_theme', 'bpq\theme_activation' ); add_filter( 'admin_footer_text', 'bpq\admin_footer_left' ); add_filter( 'update_footer', 'bpq\admin_footer_right', 11 ); // Will not work if priority defaults to 10 } if ( !constant( 'WP_DEBUG' ) ) add_filter( 'show_admin_bar', '__return_false' ); /** * Content. * * Changing the 'read more' link is fairly straightforward. Here are the cases: * 1. Generated excerpts > 55 words * 2. Full post teasers (using the more tag in the post) * * However, adding a 'read more' link is really complicated. At this time * these cases are not all covered, but are listed for future reference: * 3. Generated excerpts <= 55 words * 4. Explicit excerpts (author defines the excerpt) * 5. Excerpt teasers (when the teaser is shorter than the excerpt) * 6. Excerpts without a title/teaser * 7. Full posts without a title/teaser * 8. Full posts * * @link http://codex.wordpress.org/Excerpt * * Additionally, in order to change the classes assigned to avatars * (the icons that display in the comments section), call the hook. */ add_filter( 'excerpt_more', 'bpq\change_read_more' ); // Handles case #1 add_filter( 'the_content_more_link', 'bpq\change_read_more' ); // Handles case #2 add_filter( 'the_excerpt', 'bpq\append_read_more', 11 ); // Handles cases #3, #4, #5 // Note: Cannot use 'get_the_excerpt' hook; the 'the_excerpt' hook must be higher than 10 to prevent an empty argument. add_filter( 'pre_get_posts', 'bpq\remove_sticky_posts' ); add_filter( 'get_avatar', 'bpq\change_avatar_class' ); /** * Title. * * Sets up the title that typically appears in the browser tab. * * WordPress requires themes use the 'wp_title' filter. * @link http://make.wordpress.org/themes/guidelines/guidelines-code-quality/ */ add_filter( 'wp_title', 'bpq\title' ); ?>