_s: Adhere to updated WordPress core code formatting.
* Update PHPDoc. * Add periods to the end of comment sentences. * Limit line length to 80 chars. * Use C++-style PHP comments only for function and file documentation.
This commit is contained in:
parent
a7ce5b6f47
commit
6f63a0b39a
5 changed files with 43 additions and 43 deletions
|
@ -9,6 +9,9 @@
|
|||
|
||||
/**
|
||||
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
|
||||
*
|
||||
* @param array $args Configuration arguments.
|
||||
* @return array
|
||||
*/
|
||||
function _s_page_menu_args( $args ) {
|
||||
$args['show_home'] = true;
|
||||
|
@ -18,19 +21,22 @@ add_filter( 'wp_page_menu_args', '_s_page_menu_args' );
|
|||
|
||||
/**
|
||||
* Adds custom classes to the array of body classes.
|
||||
*
|
||||
* @param array $classes Classes for the body element.
|
||||
* @return array
|
||||
*/
|
||||
function _s_body_classes( $classes ) {
|
||||
// Adds a class of group-blog to blogs with more than 1 published author
|
||||
if ( is_multi_author() ) {
|
||||
// Adds a class of group-blog to blogs with more than 1 published author.
|
||||
if ( is_multi_author() )
|
||||
$classes[] = 'group-blog';
|
||||
}
|
||||
|
||||
return $classes;
|
||||
}
|
||||
add_filter( 'body_class', '_s_body_classes' );
|
||||
|
||||
/**
|
||||
* Filter in a link to a content ID attribute for the next/previous image links on image attachment pages
|
||||
* Filter in a link to a content ID attribute for the next/previous image links
|
||||
* on image attachment pages.
|
||||
*/
|
||||
function _s_enhanced_image_navigation( $url, $id ) {
|
||||
if ( ! is_attachment() && ! wp_attachment_is_image( $id ) )
|
||||
|
@ -46,6 +52,10 @@ add_filter( 'attachment_link', '_s_enhanced_image_navigation', 10, 2 );
|
|||
|
||||
/**
|
||||
* Filters wp_title to print a neat <title> tag based on what is being viewed.
|
||||
*
|
||||
* @param string $title Default title text for current view.
|
||||
* @param string $sep Optional separator.
|
||||
* @return string The filtered title.
|
||||
*/
|
||||
function _s_wp_title( $title, $sep ) {
|
||||
global $page, $paged;
|
||||
|
@ -67,4 +77,4 @@ function _s_wp_title( $title, $sep ) {
|
|||
|
||||
return $title;
|
||||
}
|
||||
add_filter( 'wp_title', '_s_wp_title', 10, 2 );
|
||||
add_filter( 'wp_title', '_s_wp_title', 10, 2 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue