Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Fussy code check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonny-bull committed Oct 8, 2021
1 parent 20cf02f commit b60e8d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion flagpole.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ function flagpole_admin_imports( $hook ) {
require plugin_dir_path( __FILE__ ) . 'includes/admin/settings-page.php';
require plugin_dir_path( __FILE__ ) . 'includes/api/api.general.php';
require plugin_dir_path( __FILE__ ) . 'includes/api/api.shortcode.php';
require plugin_dir_path( __FILE__ ) . 'includes/javascript/class-javascript.php';

require_once( plugin_dir_path( __FILE__ ) . 'includes/javascript/class-javascript.php' );

/**
* AJAX Action toggling features from the WP admin area.
Expand Down
4 changes: 2 additions & 2 deletions includes/javascript/class-javascript.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ private function enabled_flag_filter( array $flag_list ) {
* @return void
*/
public function print_flagpole_js() {
$flagpole_available_flags = self::enabled_flag_filter( Flagpole::init()->get_flags() );
$available_flags = self::enabled_flag_filter( Flagpole::init()->get_flags() );
?>
<script>
var flagpole_flag_enabled = function( ff ) {
const flist = <?php echo wp_json_encode( $flagpole_available_flags ); ?>;
const flist = <?= wp_json_encode( $available_flags ); ?>;
return flist.indexOf( ff ) !== -1;
}
</script>
Expand Down

0 comments on commit b60e8d0

Please sign in to comment.