Hi all,
when I activated some plugins (debug true, I am on dev), admin panel displays these notices:
Notice: Undefined index: host in C:\mysite\wp-includes\theme.php on line 1981
Notice: Undefined index: host in C:\mysite\wp-includes\theme.php on line 1922
functions:
_wp_customize_loader_settings
wp_customize_support_script
here my fix:
$cross_domain = ( strtolower( isset($admin_origin[ 'host' ]) ? $admin_origin[ 'host' ] : "" ) != strtolower( isset($home_origin[ 'host' ]) ? $home_origin[ 'host' ] : "" ) );
and so on for other function.
This, instead, the function of plugin that fire the notice (purpose: enqueu scripts only on homepage/frontpage):
add_filter( 'home_url', 'mycustomscripts' );
function mycustomscripts()
{
if ( is_front_page() )
{
wp_register_script(
'my_bootstrap',
plugins_url() . "/myplugin/js/bootstrap.min.js",
array(),
true
);
wp_enqueue_script( 'my_bootstrap' );
wp_register_script(
'other_js_after_bootst',
plugins_url() . '/myplugin2/js/bumi.js',
array( 'my_bootstrap' ),
true
);
wp_enqueue_script( 'other_js_after_bootst' );
}
}
Thanks