This repository was archived by the owner on Aug 23, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ function flagpole_admin_imports( $hook ) {
100100require plugin_dir_path ( __FILE__ ) . 'includes/admin/settings-page.php ' ;
101101require plugin_dir_path ( __FILE__ ) . 'includes/api/api.general.php ' ;
102102require plugin_dir_path ( __FILE__ ) . 'includes/api/api.shortcode.php ' ;
103- require plugin_dir_path ( __FILE__ ) . 'includes/javascript/class-javascript.php ' ;
103+
104+ require_once ( plugin_dir_path ( __FILE__ ) . 'includes/javascript/class-javascript.php ' );
104105
105106/**
106107 * AJAX Action toggling features from the WP admin area.
Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ private function enabled_flag_filter( array $flag_list ) {
4949 * @return void
5050 */
5151 public function print_flagpole_js () {
52- $ flagpole_available_flags = self ::enabled_flag_filter ( Flagpole::init ()->get_flags () );
52+ $ available_flags = self ::enabled_flag_filter ( Flagpole::init ()->get_flags () );
5353 ?>
5454 <script>
5555 var flagpole_flag_enabled = function( ff ) {
56- const flist = <?php echo wp_json_encode ( $ flagpole_available_flags ); ?> ;
56+ const flist = <?= wp_json_encode ( $ available_flags ); ?> ;
5757 return flist.indexOf( ff ) !== -1;
5858 }
5959 </script>
You can’t perform that action at this time.
0 commit comments