Tan-007 /
DesignFly
| 1 | <?php |
||||||
| 2 | /** |
||||||
| 3 | * Functions which enhance the theme by hooking into WordPress |
||||||
| 4 | * |
||||||
| 5 | * @package DesignFly |
||||||
| 6 | */ |
||||||
| 7 | |||||||
| 8 | /** |
||||||
| 9 | * Adds custom classes to the array of body classes. |
||||||
| 10 | * |
||||||
| 11 | * @param array $classes Classes for the body element. |
||||||
| 12 | * @return array |
||||||
| 13 | */ |
||||||
| 14 | function designfly_body_classes( $classes ) { |
||||||
| 15 | // Adds a class of hfeed to non-singular pages. |
||||||
| 16 | if ( ! is_singular() ) { |
||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
| 17 | $classes[] = 'hfeed'; |
||||||
| 18 | } |
||||||
| 19 | |||||||
| 20 | // Adds a class of no-sidebar when there is no sidebar present. |
||||||
| 21 | if ( ! is_active_sidebar( 'sidebar-1' ) ) { |
||||||
|
0 ignored issues
–
show
The function
is_active_sidebar was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 22 | $classes[] = 'no-sidebar'; |
||||||
| 23 | } |
||||||
| 24 | |||||||
| 25 | return $classes; |
||||||
| 26 | } |
||||||
| 27 | add_filter( 'body_class', 'designfly_body_classes' ); |
||||||
|
0 ignored issues
–
show
The function
add_filter was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 28 | |||||||
| 29 | /** |
||||||
| 30 | * Add a pingback url auto-discovery header for single posts, pages, or attachments. |
||||||
| 31 | */ |
||||||
| 32 | function designfly_pingback_header() { |
||||||
| 33 | if ( is_singular() && pings_open() ) { |
||||||
|
0 ignored issues
–
show
The function
is_singular was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
The function
pings_open was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 34 | printf( '<link rel="pingback" href="%s">', esc_url( get_bloginfo( 'pingback_url' ) ) ); |
||||||
|
0 ignored issues
–
show
The function
esc_url was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
The function
get_bloginfo was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 35 | } |
||||||
| 36 | } |
||||||
| 37 | add_action( 'wp_head', 'designfly_pingback_header' ); |
||||||
|
0 ignored issues
–
show
The function
add_action was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 38 |