Skip to content

Commit

Permalink
Fixing php notices
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlfarth committed Sep 17, 2024
1 parent 3abc39f commit 0fd2a5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions config/onboarding.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'demo_url' => 'https://demo.studiopress.com/genesis-child-chapters/home-color/',
'config' => [
'dependencies' => [
'plugins' => $genesis_child_chapters_shared_content['plugins'],
'plugins' => isset($genesis_child_chapters_shared_content['plugins']) ? $genesis_child_chapters_shared_content['plugins'] : '',
],

'content' => array_merge(
Expand All @@ -46,7 +46,8 @@
$genesis_child_chapters_shared_content['content']
),

'navigation_menus' => $genesis_child_chapters_shared_content['navigation_menus'],
//'navigation_menus' => $genesis_child_chapters_shared_content['navigation_menus'],
'navigation_menus' => isset($genesis_child_chapters_shared_content['navigation_menus']) ? $genesis_child_chapters_shared_content['navigation_menus'] : '',
'widgets' => $genesis_child_chapters_shared_content['widgets'],
],
],
Expand Down
7 changes: 3 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,8 @@ function cc_mime_types($mimes) {

add_filter( 'get_search_form', 'pb_custom_search_form', 10, 4 );
function pb_custom_search_form() {

$onfocus = "if ('" . esc_js( $search_text ) . "' === this.value) {this.value = '';}";
$onblur = "if ('' === this.value) {this.value = '" . esc_js( $search_text ) . "';}";
$onfocus = "if ('" . esc_js( isset($search_text) ? $search_text : '') . "' === this.value) {this.value = '';}";
$onblur = "if ('' === this.value) {this.value = '" . esc_js( isset($search_text) ? $search_text : '') . "';}";

$value_or_placeholder = ( get_search_query() == '' ) ? 'placeholder' : 'value';

Expand Down Expand Up @@ -913,7 +912,7 @@ function pb_custom_search_form() {
esc_html( 'Search this website', 'genesis' ),
esc_attr( $form_id ),
$value_or_placeholder,
esc_attr( $_GET['s'] ?: 'Search by Keyword', 'genesis' ),
esc_attr( isset($_GET['s']) ? 'Search by Keyword' : '', 'genesis' ),
esc_attr( 'Search', 'genesis' )
);
$form .= '</div>';
Expand Down

0 comments on commit 0fd2a5c

Please sign in to comment.