lightspeeddevelopment /
lsx
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * LSX functions and definitions - Config. |
||
| 4 | * |
||
| 5 | * @package lsx |
||
| 6 | * @subpackage 404-widget |
||
| 7 | */ |
||
| 8 | |||
| 9 | if ( ! function_exists( 'lsx_widget_area_404_init' ) ) : |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 10 | /** |
||
| 11 | * Add Widget. |
||
| 12 | * |
||
| 13 | * @package lsx |
||
| 14 | * @subpackage 404-widget |
||
| 15 | */ |
||
| 16 | function lsx_widget_area_404_init() { |
||
|
0 ignored issues
–
show
|
|||
| 17 | register_sidebar( |
||
| 18 | array( |
||
| 19 | 'name' => esc_html__( '404 page', 'lsx' ), |
||
| 20 | 'id' => 'sidebar-404', |
||
| 21 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
||
| 22 | 'after_widget' => '</aside>', |
||
| 23 | 'before_title' => '<h3 class="widget-title">', |
||
| 24 | 'after_title' => '</h3>', |
||
| 25 | ) |
||
| 26 | ); |
||
| 27 | } |
||
|
0 ignored issues
–
show
|
|||
| 28 | |||
| 29 | endif; |
||
| 30 | |||
| 31 | add_action( 'widgets_init', 'lsx_widget_area_404_init' ); |
||
| 32 | |||
| 33 | if ( ! function_exists( 'my_search_placeholder' ) ) : |
||
|
0 ignored issues
–
show
|
|||
| 34 | /** |
||
| 35 | * Placeholder. |
||
| 36 | * |
||
| 37 | * @package lsx |
||
| 38 | * @subpackage 404-widget |
||
| 39 | */ |
||
| 40 | function my_search_placeholder() { |
||
|
0 ignored issues
–
show
|
|||
| 41 | return __( 'lsdev.biz', 'lsx' ); |
||
| 42 | } |
||
|
0 ignored issues
–
show
|
|||
| 43 | |||
| 44 | endif; |
||
| 45 | |||
| 46 | add_filter( 'search_placeholder_text', 'my_search_placeholder' ); |
||
| 47 |