public static function view_template() { $is_network = get_current_screen()->is_network; ?> <p><?php _e('This plugin allows easy inclusion of the Podlove Subscribe Button. Put it in your sidebar with a simple widget or include the button in pages and/or posts with a simple shortcode.', 'podlove'); ?> </p> <p><?php _e('Start by adding a button for each of your podcasts here. You can then add the button to your sidebar by adding the <a href="widgets.php">Podlove Subscribe Button widget</a>.', 'podlove'); ?> </p> <p><?php _e('If you want to display the button inside a page or article, you can also use the <code>[podlove-subscribe-button]</code> shortcode anywhere.', 'podlove'); ?> </p> <?php $table = new \PodloveSubscribeButton\Button_List_Table(); $table->prepare_items(); $table->display(); // Get the global button settings (with fallback to default values) $settings = \PodloveSubscribeButton\Model\Button::get_global_setting_with_fallback(); if (!$is_network) { ?> <h3><?php _e('Default Settings', 'podlove'); ?> </h3> <form method="post" action="options.php"> <?php settings_fields('podlove-subscribe-button'); ?> <?php do_settings_sections('podlove-subscribe-button'); ?> <table class="form-table"> <tr valign="top"> <th scope="row"><label for="podlove_subscribe_button_default_size"><?php _e('Size', 'podlove'); ?> </label></th> <td> <select name="podlove_subscribe_button_default_size" id="podlove_subscribe_button_default_size"> <?php foreach (\PodloveSubscribeButton\Model\Button::$size as $value => $description) { ?> <option value="<?php echo $value; ?> " <?php echo $settings['size'] == $value ? "selected" : ''; ?> ><?php echo $description; ?> </option> <?php } ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label for="podlove_subscribe_button_default_autowidth"><?php _e('Autowidth', 'podlove'); ?> </label></th> <td> <input type="checkbox" name="podlove_subscribe_button_default_autowidth" id="podlove_subscribe_button_default_autowidth" <?php echo $settings['autowidth'] == 'on' ? 'checked' : ''; ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label for="podlove_subscribe_button_default_color"><?php _e('Color', 'podlove'); ?> </label></th> <td> <input id="podlove_subscribe_button_default_color" name="podlove_subscribe_button_default_color" class="podlove_subscribe_button_color" value="<?php echo $settings['color']; ?> " /> </td> </tr> <tr valign="top"> <th scope="row"><label for="podlove_subscribe_button_default_style"><?php _e('Style', 'podlove'); ?> </label></th> <td> <select name="podlove_subscribe_button_default_style" id="podlove_subscribe_button_default_style"> <?php foreach (\PodloveSubscribeButton\Model\Button::$style as $value => $description) { ?> <option value="<?php echo $value; ?> " <?php echo $settings['style'] == $value ? "selected" : ''; ?> ><?php echo $description; ?> </option> <?php } ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label for="podlove_subscribe_button_default_format"><?php _e('Format', 'podlove'); ?> </label></th> <td> <select name="podlove_subscribe_button_default_format" id="podlove_subscribe_button_default_format"> <?php foreach (\PodloveSubscribeButton\Model\Button::$format as $value => $description) { ?> <option value="<?php echo $value; ?> " <?php echo $settings['format'] == $value ? "selected" : ''; ?> ><?php echo $description; ?> </option> <?php } ?> </select> </td> </tr> </table> <?php submit_button(); ?> </form> <?php } }