/** * Metabox to show the restore options * * @since 1.0.2 * * @param string $title - Title to be displayed in header of metabox * @param array $item - The current viewed item * * @return none */ function snapshot_metabox_restore_options($title, $item) { ?> <div class="postbox"> <h3 class="hndle"><span><?php echo $title; ?> </span></h3> <div class="inside"> <table class="form-table snapshot-restore-options"> <tr class=""> <th scope="row"> <label><?php _e('Plugins', SNAPSHOT_I18N_DOMAIN); ?> </label> </th> <td> <input type="checkbox" id="snapshot-restore-option-plugins" name="restore-option-plugins" value="yes"/> <label for="snapshot-restore-option-plugins"><?php _e('Turn off all plugins', SNAPSHOT_I18N_DOMAIN); ?> </label> </td> </tr> <tr> <th scope="row"> <label><?php _e('Set a theme to active', SNAPSHOT_I18N_DOMAIN); ?> </label> </th> <td> <?php if (isset($item['blog-id'])) { $current_theme = Snapshot_Helper_Utility::get_current_theme($item['blog-id']); } else { $current_theme = Snapshot_Helper_Utility::get_current_theme(); } //echo "current_theme=[". $current_theme ."]<br />"; if (isset($item['blog-id'])) { $themes = Snapshot_Helper_Utility::get_blog_active_themes($item['blog-id']); } else { $themes = Snapshot_Helper_Utility::get_blog_active_themes(); } if ($themes) { //echo "themes<pre>"; print_r($themes); echo "</pre>"; ?> <ul><?php foreach ($themes as $theme_key => $theme_name) { ?> <li><input type="radio" id="snapshot-restore-option-theme-<?php echo $theme_key; ?> " <?php if ($theme_name == $current_theme) { echo ' checked="checked" '; } ?> name="restore-option-theme" value="<?php echo $theme_key; ?> "/> <label for="snapshot-restore-option-theme-<?php echo $theme_key; ?> "> <?php if ($theme_name == $current_theme) { echo '<strong>'; } ?> <?php echo $theme_name; ?> <?php if ($theme_name == $current_theme) { echo '</strong> (current active theme)'; } ?> </label> </li> <?php } ?> </ul><?php } ?> </td> </tr> </table> </div> </div> <?php }