File Editor
Directories:
.. (Back)
Files:
settings.php
settings_advanced.php
settings_defaults.php
settings_general.php
settings_migration.php
settings_news.php
settings_saas.php
settings_sticky.php
settings_timestamps.php
Create New File
Create
Edit File: settings_saas.php
<?php // Default values $defaults = array( 'new_players' => 'false', ); $saved_options = get_option( 'spp_player_saas', $defaults ); $processed_options = array_merge( $defaults, $saved_options ); extract( $processed_options ); $have_new_plugin = false; if(defined('ABSPATH') && include_once(ABSPATH.'wp-admin/includes/plugin.php')) if(function_exists('is_plugin_active') && (is_plugin_active('fusebox-player/fusebox-player.php'))) $have_new_plugin = true; $have_gutenberg = function_exists('register_block_type'); $have_api_key = get_option('fbxp_api_key', '') !== ''; function select_input($name, $value, $options, $class = NULL) { ?> <select name="<?php echo $name ?>" class="<?php echo $class ?>"> <?php foreach ($options as $opt_name => $opt_text) { ?> <option value="<?php echo $opt_name ?>" <?php selected($value, $opt_name); ?> > <?php echo $opt_text ?> </option> <?php } ?> </select> <?php } ?> <?php if(!$have_new_plugin) { ?> <h2>There's an all-new Fusebox Player!</h2> <p>The new Fusebox Player and its accompanying Wordpress plugin have been redesigned from the ground up for ease of use. To get started, log in to <a href="https://my.fusebox.fm">my.fusebox.fm</a> and download the new Fusebox Player for Wordpress. Don't worry, the current plugin, Fusebox Player Classic, will continue to work normally.</p> <?php } else if (!$have_gutenberg) { ?> <h2>Welcome to the all-new Fusebox Player!</h2> <p>Thanks for installing the new Fusebox Player plugin for Wordpress. The new features require the Wordpress Gutenberg editor, available in Wordpress 5.0 and up. Your Classic plugin and shortcodes will continue to work normally.</p> <?php } else if (!$have_api_key) { ?> <h2>Welcome to the all-new Fusebox Player!</h2> <p>Thanks for installing the new Fusebox Player plugin for Wordpress. To get started, please go to <a href="<?php echo admin_url('options-general.php?page=fusebox-player')?>">Settings -> Fusebox Player</a> and enter your API key.</p> <?php } else { ?> <h2>Welcome to the all-new Fusebox Player!</h2> <p>Thanks for installing the new Fusebox Player plugin for Wordpress. Once you're set up at <a href="https://my.fusebox.fm">my.fusebox.fm</a>, you can add new players to your posts right in the post editor. By default, your old shortcodes will continue to show the old player. If you want them to show the new player, adjust the setting below, and read on.</p> <table class="form-table"><tbody><tr> <th scope="row">With old track player shortcodes: </th> <td><?php select_input("spp_player_saas[new_players]", $new_players, array("false" => "Show classic players (default)", "true" => "Show new players")) ?></td> </tr></tbody></table> <p class="submit"> <input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"/> </p> <?php if ($new_players === 'true') { ?> <h2>How does this work?</h2> <p>In order to show the new players, we have to find the episode number for all the old players. It's automatic, but it takes a little while. You should only need to do this once.</p> Field for RSS feed? Button to kick off process "Begin"/"Working"(disabled) Output messages <?php } } ?>
Save Changes
Rename File
Rename