Skip to content

Commit

Permalink
Fix PHP warning Undefined array key "plugin-init"
Browse files Browse the repository at this point in the history
  • Loading branch information
xelan authored and alekart committed Aug 7, 2023
1 parent ddfadaa commit 1fd58ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/archives-calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ function arcw_plugin_action_links( $links ) {

function archivesCalendar_jquery_plugin() {
global $archivesCalendar_options;
$jQarcw = $archivesCalendar_options['plugin-init'] == 1 ? '/admin/js/jquery.arcw-init.js' : '/admin/js/jquery.arcw.js';
$pluginInit = isset($archivesCalendar_options['plugin-init']) ? $archivesCalendar_options['plugin-init'] : null;
$jQarcw = $pluginInit == 1 ? '/admin/js/jquery.arcw-init.js' : '/admin/js/jquery.arcw.js';
wp_register_script( 'jquery-arcw', plugins_url( $jQarcw, __FILE__ ), array( "jquery" ), ARCWV );
wp_enqueue_script( 'jquery-arcw' );
}
Expand Down

0 comments on commit 1fd58ae

Please sign in to comment.