', '' ); ?>

$nr_required_actions, 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'template_directory' => get_template_directory_uri(), 'no_required_actions_text' => __( 'Hooray! There are no required actions for you right now.','bfastmag' ) ) ); } } /** * Load scripts for customizer page * @since 1.0.11 */ public function bfastmag_welcome_scripts_for_customizer() { global $bfastmag_required_actions; $nr_required_actions = 0; /* get number of required actions */ if( get_option('bfastmag_show_required_actions') ): $bfastmag_show_required_actions = get_option('bfastmag_show_required_actions'); else: $bfastmag_show_required_actions = array(); endif; if( !empty($bfastmag_required_actions) ): foreach( $bfastmag_required_actions as $bfastmag_required_action_value ): if(( !isset( $bfastmag_required_action_value['check'] ) || ( isset( $bfastmag_required_action_value['check'] ) && ( $bfastmag_required_action_value['check'] == false ) ) ) && ((isset($bfastmag_show_required_actions[$bfastmag_required_action_value['id']]) && ($bfastmag_show_required_actions[$bfastmag_required_action_value['id']] == true)) || !isset($bfastmag_show_required_actions[$bfastmag_required_action_value['id']]) )) : $nr_required_actions++; endif; endforeach; endif; } /** * Dismiss required actions * */ public function bfastmag_dismiss_required_action_callback() { global $bfastmag_required_actions; $bfastmag_dismiss_id = (isset($_GET['dismiss_id'])) ? $_GET['dismiss_id'] : 0; echo $bfastmag_dismiss_id; /* this is needed and it's the id of the dismissable required action */ if( !empty($bfastmag_dismiss_id) ): /* if the option exists, update the record for the specified id */ if( get_option('bfastmag_show_required_actions') ): $bfastmag_show_required_actions = get_option('bfastmag_show_required_actions'); $bfastmag_show_required_actions[$bfastmag_dismiss_id] = false; update_option( 'bfastmag_show_required_actions',$bfastmag_show_required_actions ); /* create the new option,with false for the specified id */ else: $bfastmag_show_required_actions_new = array(); if( !empty($bfastmag_required_actions) ): foreach( $bfastmag_required_actions as $bfastmag_required_action ): if( $bfastmag_required_action['id'] == $bfastmag_dismiss_id ): $bfastmag_show_required_actions_new[$bfastmag_required_action['id']] = false; else: $bfastmag_show_required_actions_new[$bfastmag_required_action['id']] = true; endif; endforeach; update_option( 'bfastmag_show_required_actions', $bfastmag_show_required_actions_new ); endif; endif; endif; die(); // this is required to return a proper result } /** * Welcome screen content * */ public function bfastmag_welcome_screen() { ?>








$bfastmag_required_action_value ): if($bfastmag_show_required_actions[$bfastmag_required_action_value['id']] === false) continue; if($bfastmag_required_action_value['check']) continue; ?>

.


'.__( 'Hooray! There are no required actions for you right now.','bfastmag' ).'

'; endif; ?>




bfastmag

get_contents( get_template_directory().'/CHANGELOG.md' ); $bfastmag_changelog_lines = explode(PHP_EOL, $bfastmag_changelog); foreach($bfastmag_changelog_lines as $bfastmag_changelog_line){ if(substr( $bfastmag_changelog_line, 0, 3 ) === "###"){ echo '

'.substr($bfastmag_changelog_line,3).'

'; } else { echo $bfastmag_changelog_line.'
'; } } ?>