function sjs_PUbox_disp_options_page() { //the action options.php can be accessed by url manipulation,we have to make sure when we create options for the plugin it shows up here in the options.php page //enctype is used here to ensure that user can upload things ?> <div class="wrap"> <?php get_screen_icon(); ?> <h2>PU box Options Settings</h2> <form method="post" action="options.php" enctype="multipart/form-data"> <?php settings_fields('sjs_PUbox_group'); //provides hidden inputs and nonces for security@params:group name ?> <?php do_settings_sections(__FILE__); ?> <p class="submit"> <input type="submit" name="submit" class="button-primary" value="Apply Changes"> </p> </form> </div> <?php }
/** * Render settings page. This function should echo the HTML form of the settings page. */ public function render_settings_page($post) { ?> <div class="wrap"> <?php echo get_screen_icon('options-general'); ?> <h2><?php echo $this->page_title; ?> </h2> <div class="intro"> <p>This is the intro text</p> </div> <?php settings_errors(); print_r($this->get_settings_data()); ?> <form method="post" action="options.php"> <?php echo $this->settings_fields($this->option_group); ?> <table class="form-table"> <tr> <th><label for="<?php echo esc_attr('footer'); ?> "><?php echo esc_attr('Footer Text'); ?> </label></th> <td> <input type="text" id="<?php echo esc_attr('footer'); ?> " name="<?php echo esc_attr($this->option_name . "[footer]"); ?> " value="<?php echo esc_attr($this->get_data('footer')); ?> " /> </td> </tr> </table> <?php submit_button('Save Options', 'primary', 'submit', false); ?> <?php submit_button('Restore Defaults', 'secondary', 'reset', false); ?> </form> </div><?php }
protected function get_screen_icon($icon) { global $wp_version; if (version_compare($wp_version, '3.7', '<=')) { // WP 3.7 and below return get_screen_icon($icon); } return ''; // Screen icons are no longer used as of WordPress 3.8 }
/** * Generate header HTML. * @access public * @since 1.0.0 * @return void */ public static function get_header($token = 'woothemes-updater', $screen_icon = 'tools') { do_action('woothemes_updater_screen_before', $token, $screen_icon); $html = '<div class="wrap woothemes-updater-wrap">' . "\n"; $html .= get_screen_icon($screen_icon); $html .= '<h2 class="nav-tab-wrapper">' . "\n"; $html .= self::get_navigation_tabs(); $html .= '</h2>' . "\n"; echo $html; do_action('woothemes_updater_screen_header_before_content', $token, $screen_icon); }
function main() { if ($_POST) { self::save_settings($_POST); } global $mf_domain; print '<div class="wrap">'; // the title needs a hat icon echo get_screen_icon('magic-fields'); print '<h2>' . __('Magic Fields Settings', $mf_domain) . '</h2>'; $options = self::fields_form(); self::form_options($options); print '</div>'; }
/** * Generate header HTML. * @access public * @since 6.0.0 * @return void */ public static function get_header($token = 'woothemes', $screen_icon = 'themes') { do_action('wf_screen_before', $token, $screen_icon); do_action('wf_screen_before_' . esc_attr($token), $token, $screen_icon); $html = '<div class="wf-wrap wrap">' . "\n"; $html .= get_screen_icon($screen_icon); $html .= '<h2 class="nav-tab-wrapper">' . "\n"; $html .= self::get_navigation_tabs(); $html .= self::get_admin_branding(); $html .= '</h2>' . "\n"; echo $html; do_action('wf_screen_header_before_content', $token, $screen_icon); do_action('wf_screen_header_before_content_' . esc_attr($token), $token, $screen_icon); }
function woo_help() { ?> <div class='wrap'> <?php get_screen_icon(); ?> <h3>Use the shortcode [product-cat] inside any WordPress post or page to view category wise WooCommerce product listing. </h3> <h4>WooCommerce must be installed to use this plugin.</h4> </div> <?php }
/** * Render settings page. This function should echo the HTML form of the settings page. */ public function render_settings_page($post) { $this->view->set_view_file(CYCLONE_PATH . 'views/settings-page.php'); $settings_data = $this->get_settings_data(); $templates = $this->templates_manager->get_all_templates(); $settings_data['load_templates'] = $this->templates_manager->get_active_templates($settings_data); // Filter load templates $vars = array(); $vars['page_title'] = $this->page_title; $vars['screen_icon'] = get_screen_icon('options-general'); $vars['settings_fields'] = $this->settings_fields($this->option_group); $vars['option_name'] = $this->option_name; $vars['templates'] = $templates; $vars['settings_data'] = $settings_data; $vars['debug'] = CYCLONE_DEBUG ? cyclone_slider_debug($vars['settings_data']) : ''; $this->view->set_vars($vars); $this->view->render(); }
/** * Render page. This function should output the HTML of the page. */ public function render_page($post) { ?> <div class="wrap"> <?php echo get_screen_icon('options-general'); ?> <h2><?php echo $this->page_title; ?> </h2> <div class="intro"> <p>This is the intro text</p> </div> <form method="post" action=""> <table class="form-table"> <tr> <th><label for="<?php echo esc_attr('sample_text'); ?> "><?php echo esc_attr('Sample Text'); ?> </label></th> <td> <input type="text" id="sample_text" name="sample_text" value="" /> </td> </tr> </table> <?php submit_button('Save Options', 'primary', 'submit', false); ?> <?php submit_button('Restore Defaults', 'secondary', 'reset', false); ?> </form> </div><?php }
/** * Render settings page. This function should echo the HTML form of the settings page. */ public function render_settings_page($post) { global $wp_version; $vars = array(); $vars['page_title'] = $this->page_title; $vars['textdomain'] = $this->plugin['textdomain']; if (version_compare($wp_version, '3.7', '<=')) { // WP 3.7 and below $vars['screen_icon'] = get_screen_icon('options-general'); } else { // WP 3.8+ $vars['screen_icon'] = ''; // Screen icons are no longer used as of WordPress 3.8 } $vars['settings_fields'] = $this->settings_fields($this->plugin['settings_page.option_group']); $vars['option_name'] = $this->plugin['settings_page.option_name']; $vars['settings_data'] = $this->get_settings_data(); $debug = filter_var(trim(print_r($vars['settings_data'], true)), FILTER_SANITIZE_FULL_SPECIAL_CHARS); $vars['debug'] = $this->plugin['debug'] ? '<pre>' . $debug . '</pre>' : ''; $this->plugin['view']->render('settings-page.php', $vars); }
public function options_page_tabs($current = 'basic') { if (isset($_GET['tab'])) { $current = $_GET['tab']; } else { $current = 'basic'; } $tabs = $this->get_settings_page_tabs(); $links = array(); foreach ($tabs as $tab => $name) { if ($tab == $current) { $links[] = "<a class=\"nav-tab nav-tab-active\" href=\"?page=mangapress-options-page&tab={$tab}\">{$name}</a>"; } else { $links[] = "<a class=\"nav-tab\" href=\"?page=mangapress-options-page&tab={$tab}\">{$name}</a>"; } } echo get_screen_icon(); echo '<h2 class="nav-tab-wrapper">'; foreach ($links as $link) { echo $link; } echo '</h2>'; }
public function screen_icon_link($name = 'aaron') { $link = '<a href="http://aarondcampbell.com">'; if (function_exists('get_screen_icon')) { $link .= get_screen_icon($name); } else { ob_start(); screen_icon($name); $link .= ob_get_clean(); } $link .= '</a>'; echo apply_filters('rpf-screen_icon_link', $link, $name); }
/** * admin_screen() * * Load the admin screen. * * @since 1.0.0 */ function admin_screen() { $export_type = 'all'; if (isset($_POST['export-type'])) { $export_type = esc_attr($_POST['export-type']); } ?> <div class="wrap"> <?php echo get_screen_icon($screen = 'import-export'); ?> <h2><?php _e('Import / Export'); ?> </h2> <div class="import"> <h3><?php _e('Import Settings'); ?> </h3> <p><?php _e('If you have settings in a backup file on your computer, the Import / Export system can import those into this site. To get started, upload your backup file to import from below.'); ?> </p> <form enctype="multipart/form-data" method="post" action="<?php echo admin_url('admin.php?page=' . $this->token); ?> "> <?php wp_nonce_field('OptionsFramework-backup-import'); ?> <label for="OptionsFramework-import-file"><?php printf(__('Upload File: (Maximum Size: %s)'), ini_get('post_max_size')); ?> </label> <input type="file" id="OptionsFramework-import-file" name="OptionsFramework-import-file" size="25"/> <input type="hidden" name="OptionsFramework-backup-import" value="1"/> <input type="submit" class="button" value="<?php _e('Upload File and Import'); ?> "/> </form> </div> <div class="export"> <h3><?php _e('Export Settings'); ?> </h3> <p><?php _e('When you click the button below, the Import / Export system will create a text file for you to save to your computer.'); ?> </p> <p><?php echo sprintf(__('This text file can be used to restore your settings here on "%s", or to easily setup another website with the same settings".'), get_bloginfo('name')); ?> </p> <form method="post" action="<?php echo admin_url('admin.php?page=' . $this->token); ?> "> <?php wp_nonce_field('OptionsFramework-backup-export'); ?> <input type="hidden" name="OptionsFramework-backup-export" value="1"/> <input type="submit" class="button" value="<?php _e('Download Export File', 'OptionsFramework'); ?> "/> </form> </div> </div><!--/.wrap--> <?php }
/** * Display Plugin Title and if needed tabbed navigation. * * @since 2.0 * @param string $plugin_title Plugin title. * @param string $tab_id Page id. Manually set the active tab. * @return void */ public function render_header($plugin_title = '', $tab_id = false) { if (!empty($plugin_title)) { echo get_screen_icon() . '<h2>' . (string) $plugin_title . '</h2>'; } // if ( !$this->valid_pages ) // return; $page_title_count = 0; foreach ($this->pages as $page) { if (isset($page['title']) && $page['title']) { ++$page_title_count; } } $html = ''; $current = $this->current_page; $page_ids = wp_list_pluck($this->pages, 'id'); $cur_tab_id = $tab_id ? (string) $tab_id : $current['id']; $cur_tab_id = in_array($cur_tab_id, $page_ids) ? $cur_tab_id : $current['id']; $i = 0; foreach ($this->pages as $page) { if (isset($page['title']) && $page['title']) { if ($page_title_count > 1) { $html .= 0 === $i ? '<h2 class="nav-tab-wrapper">' : ''; $active = ''; if ($cur_tab_id === $page['id']) { $active = ' nav-tab-active'; } // Get the url of the current settings page. $tab_url = remove_query_arg(array('tab', 'settings-updated')); // Add query arg 'tab' if it's not the first settings page. if ($this->pages[0]['id'] !== $page['id']) { $tab_url = add_query_arg('tab', $page['slug'], $tab_url); } $html .= sprintf('<a href="%1$s" class="nav-tab%2$s" id="%3$s-tab">%4$s</a>', esc_url($tab_url), $active, esc_attr($page['id']), $page['title']); $html .= ++$i === $page_title_count ? '</h3>' : ''; } if ($page_title_count === 1) { if (isset($current['title']) && $current['title'] === $page['title']) { $html .= '<h3>' . $page['title'] . '</h3>'; break; } } } } echo $html; }
/** * Output the settings page, if one has been hooked to the current admin page, and output * the settings sections hooked to the current admin page/tab. * * WordPress core icons that can be used for the page and tab icons. * - index * - tools * - edit * - upload * - link-manager * - edit-pages * - edit-comments * - themes * - plugins * - users * - options-general * * @author Steven A. Zahm * @since 0.7.3.0 * @param string $pageHook * @param bool $return [optional] * @return string */ public function form($pageHook, $args = array()) { $defaults = array('page_title' => '', 'page_icon' => '', 'tab_icon' => ''); $args = wp_parse_args($args, $defaults); //var_dump($args); $out = ''; $sort = array(); // Page icon. if (!empty($args['page_icon'])) { echo get_screen_icon($args['page_icon']); } // Page title. if (!empty($args['page_title'])) { echo '<h2>', $args['page_title'], '</h2>'; } // Display any registered settings errors and success messages. settings_errors(); // Display the tab icon if (!empty($args['tab_icon'])) { echo get_screen_icon($args['tab_icon']); } // If the page hook was not supplied echo an empty string. if (!empty($pageHook)) { $tabs = $this->tabs[$pageHook]; //var_dump($this->tabs[$pageHook]); // If there were no tabs returned echo out an empty string. if (!empty($tabs)) { echo '<h2 class="nav-tab-wrapper">'; // Store the position values so an array multi sort can be done to postion the tabs in the desired order. foreach ($tabs as $key => $tab) { $sort[] = isset($tab['position']) && !empty($tab['position']) ? $tab['position'] : 0; } // Sort the tabs based on their position. array_multisort($sort, $tabs); // If the current tab isn't set, set the current tab to the intial tab in the array. $currentTab = isset($_GET['tab']) ? $_GET['tab'] : $tabs[0]['id']; foreach ($tabs as $tab) { // Only show tabs registered to the current page. if (!isset($tab['page_hook']) || $tab['page_hook'] !== $pageHook) { continue; } echo '<a class="nav-tab' . ($currentTab === $tab['id'] ? ' nav-tab-active' : '') . '" href="' . add_query_arg('tab', $tab['id']) . '">' . $tab['title'] . '</a>'; } echo '</h2>'; } } echo '<form method="post" action="options.php">'; /* * If tabs were registered to the current page, set the hidden fields with the current tab id * appended to the page hook. If this is not done the settings registered to the current tab will * not be saved. */ //global $new_whitelist_options;print_r($new_whitelist_options); settings_fields(isset($currentTab) && !empty($currentTab) ? $pageHook . '-' . $currentTab : $pageHook); /* * Output any fields that were not registered to a specific section and defaulted to the default section. * Mimics default core WP behaviour. */ echo '<table class="form-table">'; do_settings_fields(isset($currentTab) && !empty($currentTab) ? $pageHook . '-' . $currentTab : $pageHook, 'default'); echo '</table>'; /* * Reference: * http://codex.wordpress.org/Function_Reference/do_settings_sections * * If the section is hooked into a tab add the current tab to the page hook * so only the settings registered to the current tab are displayed. */ do_settings_sections(isset($currentTab) && !empty($currentTab) ? $pageHook . '-' . $currentTab : $pageHook); submit_button(); echo '</form>'; }
function connectionsShowTemplatesPage() { /* * Check whether user can edit Settings */ if (!current_user_can('connections_manage_template')) { wp_die('<p id="error-page" style="-moz-background-clip:border; -moz-border-radius:11px; background:#FFFFFF none repeat scroll 0 0; border:1px solid #DFDFDF; color:#333333; display:block; font-size:12px; line-height:18px; margin:25px auto 20px; padding:1em 2em; text-align:center; width:700px">' . __('You do not have sufficient permissions to access this page.', 'connections') . '</p>'); } else { global $connections; // Purge the transient so the page is freshly scanned by the template API. delete_transient('cn_legacy_templates'); // cnTemplateFactory::$templates = new stdClass(); cnTemplateFactory::registerLegacy(); $form = new cnFormObjects(); $type = isset($_GET['type']) ? esc_attr($_GET['type']) : 'all'; $template = cnTemplateFactory::getCatalog($type); ?> <div class="wrap"> <?php echo get_screen_icon('connections'); ?> <h2>Connections : <?php _e('Templates', 'connections'); ?> <a class="button add-new-h2" href="http://connections-pro.com/templates/" target="_blank"><?php _e('Get More', 'connections'); ?> </a></h2> <ul class="subsubsub"> <li><a <?php if ($type === 'all') { echo 'class="current" '; } ?> href="admin.php?page=connections_templates&type=all"><?php _e('All', 'connections'); ?> </a> | </li> <li><a <?php if ($type === 'individual') { echo 'class="current" '; } ?> href="admin.php?page=connections_templates&type=individual"><?php _e('Individual', 'connections'); ?> </a> | </li> <li><a <?php if ($type === 'organization') { echo 'class="current" '; } ?> href="admin.php?page=connections_templates&type=organization"><?php _e('Organization', 'connections'); ?> </a> | </li> <li><a <?php if ($type === 'family') { echo 'class="current" '; } ?> href="admin.php?page=connections_templates&type=family"><?php _e('Family', 'connections'); ?> </a> | </li> <li><a <?php if ($type === 'anniversary') { echo 'class="current" '; } ?> href="admin.php?page=connections_templates&type=anniversary"><?php _e('Anniversary', 'connections'); ?> </a> | </li> <li><a <?php if ($type === 'birthday') { echo 'class="current" '; } ?> href="admin.php?page=connections_templates&type=birthday"><?php _e('Birthday', 'connections'); ?> </a></li> </ul> <br class="clear"> <table cellspacing="0" cellpadding="0" id="currenttheme"> <tbody> <tr> <td class="current_template"> <h2><?php _e('Current Template', 'connections'); ?> </h2> <div id="current-template"> <?php $slug = $connections->options->getActiveTemplate($type); $activeTemplate = cnTemplateFactory::getTemplate($slug); // var_dump( $activeTemplate ); if ($activeTemplate) { if ($activeTemplate->getThumbnail()) { $thumbnail = $activeTemplate->getThumbnail(); if (!empty($thumbnail['name'])) { echo '<div class="center-thumbnail"><img class="template-thumbnail" src="', $thumbnail['url'], '" /></div>'; } else { echo '<div class="center-thumbnail"><div class="template-thumbnail-none">', __('Thumbnail Not Available', 'connections'), '</div></div>'; } } if ($activeTemplate->getAuthorURL()) { $author = '<a title="' . __('Visit author\'s homepage.', 'connections') . '" href="' . $activeTemplate->getAuthorURL() . '">' . $activeTemplate->getAuthor() . '</a>'; } else { $author = $activeTemplate->getAuthor(); } echo '<h3>', $activeTemplate->getName(), ' ', $activeTemplate->getVersion(), ' by ', $author, '</h3>'; echo '<p class="theme-description">', $activeTemplate->getDescription(), '</p>'; // Remove the current template so it does not show in the available templates. unset($template->{$activeTemplate->getSlug()}); } else { echo '<h3 class="error"> Template ', esc_attr($slug), ' can not be found.</h3>'; } ?> </div> <div class="clear"></div> </td> <td class="template_instructions" colspan="2"> <p><strong><?php _e('Instructions', 'connections'); ?> :</strong></p> <p> <?php _e('By default the <code><a href="http://connections-pro.com/documentation/connections/shortcodes/shortcode-connections/">[connections]</a></code> shortcode will show all entries types. To change the template used when displaying all entry types, select the "All" tab and activate the template. When the <code><a href="http://connections-pro.com/documentation/connections/shortcodes/shortcode-connections/list_type/">list_type</a></code>shortcode option is used to filter the entries based on the entry type, the template for that entry type will be used. To change the template used for a specific entry type, select the appropriate tab and then activate the template. If multiple entry types are specified in the <code><a href="http://connections-pro.com/documentation/connections/shortcodes/shortcode-connections/list_type/">list_type</a></code> shortcode option, the template for the entry type listed first will be used to display the entry list.', 'connections'); ?> </p> <p> <?php _e('The <code><a href="http://connections-pro.com/documentation/connections/shortcodes/shortcode-upcoming-list/">[upcoming_list]</a></code> shortcode which displays the upcoming anniversaries and birthdays will be displayed with the template that is activated under their respective tabs.', 'connections'); ?> </p> <p> <?php _e('The current active template for each template type can be overridden by using the <code><a href="http://connections-pro.com/documentation/connections/shortcodes/shortcode-connections/template-option/">template</a></code> shortcode option.', 'connections'); ?> </p> </td> </tr> </tbody> </table> <table cellspacing="0" cellpadding="0" id="availablethemes"> <tbody> <tr> <td class="current_template" colspan="3"> <h2><?php _e('Available Templates', 'connections'); ?> </h2> </td> </tr> <?php $slugs = array_keys((array) $template); natcasesort($slugs); $table = array(); $rows = ceil(count($slugs) / 3); for ($row = 1; $row <= $rows; $row++) { for ($col = 1; $col <= 3; $col++) { $table[$row][$col] = array_shift($slugs); } } foreach ($table as $row => $cols) { ?> <tr> <?php foreach ($cols as $col => $slug) { $activateTokenURL = ''; $deleteTokenURL = ''; $class = array('available-theme'); if ($row == 1) { $class[] = 'top'; } if ($row == $rows) { $class[] = 'bottom'; } if ($col == 1) { $class[] = 'left'; } if ($col == 3) { $class[] = 'right'; } ?> <td class="<?php echo join(' ', $class); ?> "> <?php if (!isset($template->{$slug})) { continue; } // var_dump( $template->{ $slug } ); if ($template->{$slug}->getThumbnail()) { $thumbnail = $template->{$slug}->getThumbnail(); if (!empty($thumbnail['name'])) { echo '<div class="center-thumbnail"><img class="template-thumbnail" src="', $thumbnail['url'], '" width="300" height="225"></div>'; } else { echo '<div class="center-thumbnail"><div class="template-thumbnail-none" style="width: 300px; height: 225px"><p>', __('Thumbnail Not Available', 'connections'), '</p></div></div>'; } } if ($template->{$slug}->getAuthorURL()) { $author = '<a title="Visit author\'s homepage." href="' . $template->{$slug}->getAuthorURL() . '">' . $template->{$slug}->getAuthor() . '</a>'; } else { $author = $template->{$slug}->getAuthor(); } echo '<h3>', $template->{$slug}->getName(), ' ', $template->{$slug}->getVersion(), ' by ', $author, '</h3>'; echo '<p class="description">', $template->{$slug}->getDescription(), '</p>'; echo '<p>', __('Shortcode Override:', 'connections'), '<code> template="', $slug, '"</code></p>'; ?> <span class="action-links"> <?php $activateTokenURL = $form->tokenURL('admin.php?cn-action=activate_template&type=' . $type . '&template=' . $template->{$slug}->getSlug(), 'activate_' . $template->{$slug}->getSlug()); if ($template->{$slug}->isCustom() === TRUE && $template->{$slug}->isLegacy() === TRUE) { $deleteTokenURL = $form->tokenURL('admin.php?cn-action=delete_template&type=' . $type . '&template=' . $template->{$slug}->getSlug(), 'delete_' . $template->{$slug}->getSlug()); } ?> <a class="button-primary" href="<?php echo esc_attr($activateTokenURL); ?> " title="Activate '<?php echo esc_attr($template->{$slug}->getName()); ?> '"><?php _e('Activate', 'connections'); ?> </a> <?php if (!empty($deleteTokenURL)) { ?> | <a class="button button-warning" href="<?php echo esc_attr($deleteTokenURL); ?> " title="Delete '<?php echo esc_attr($template->{$slug}->getName()); ?> '" onclick="return confirm('You are about to delete this theme \'<?php echo esc_attr($template->{$slug}->getName()); ?> \'\n \'Cancel\' to stop, \'OK\' to delete.');">Delete</a> <?php } ?> </span> <?php if ($template->{$slug}->isCustom() === FALSE) { echo '<p class="description">', __('This a core template and can not be deleted.', 'connections'), '</p>'; } else { if ($template->{$slug}->isCustom() === TRUE && $template->{$slug}->isLegacy() === FALSE) { echo '<p class="description">', __('This template is a plugin. You can deactivate and delete the template from the Plugins admin page.', 'connections'), '</p>'; } } } ?> </td> </tr> <?php } ?> </tbody> </table> <?php if (file_exists(CN_CUSTOM_TEMPLATE_PATH) && is_writeable(CN_CUSTOM_TEMPLATE_PATH)) { ?> <table cellspacing="0" cellpadding="0" id="installthemes"> <tbody> <tr> <td class="install_template" colspan="3"> <h2><?php _e('Install Legacy Template', 'connections'); ?> </h2> <p><?php printf(__("If you puchased your template after 3.25.2013, please follow these <a href='%s'>installation instructions</a>. If you are upgrading your template purchased prior to 3.25.2013, please take note of the special upgrade instructions found on the same page.", 'connections'), 'http://connections-pro.com/documentation/plugin/install/templates/'); ?> </p> <?php $formAttr = array('action' => '', 'method' => 'post', 'enctype' => 'multipart/form-data'); $form->open($formAttr); $form->tokenField('install_template'); ?> <p> <input type="hidden" name="cn-action" value="install_template"/> <label for='template'><?php _e('Select Template:', 'connections'); ?> <input type='file' value='' name='template' size='25' /> </label> <input type="submit" value="<?php _e('Install Now', 'connections'); ?> " class="button"> </p> <?php $form->close(); ?> </td> </tr> </tbody> </table> <?php } ?> </div> <?php } }
/** * Pages page * A page with the tree. Good stuff. */ function cms_tpv_pages_page() { $post_type = cms_tpv_get_selected_post_type(); $post_type_object = get_post_type_object($post_type); if ('post' != $post_type) { $post_new_file = "post-new.php?post_type={$post_type}"; } else { $post_new_file = 'post-new.php'; } ?> <div class="wrap"> <?php echo get_screen_icon(); ?> <h2><?php $page_title = sprintf(_x('%1$s Tree View', "headline of page with tree", "cms-tree-page-view"), $post_type_object->labels->name); echo $page_title; // Add "add new" link the same way as the regular post page has if (current_user_can($post_type_object->cap->create_posts)) { echo ' <a href="' . esc_url($post_new_file) . '" class="add-new-h2">' . esc_html($post_type_object->labels->add_new) . '</a>'; } ?> </h2> <?php cms_tpv_print_common_tree_stuff($post_type); ?> </div> <?php }
/** * Settings page display. */ function render_settings_page() { ?> <div class="wrap"> <form action="options.php" method="post"> <?php echo wp_kses_post(get_screen_icon('livepress-settings')); ?> <h2><?php esc_html_e('LivePress Settings', 'livepress'); ?> </h2> <?php $this->options = get_option(LivePress_Administration::$options_name); // If the API key is blank and the show=enetr-api-key toggle is not passed, prompt the user to register if (!(isset($_GET['show']) && 'enter-api-key' == $_GET['show']) && empty($this->options['api_key']) && !isset($_POST['submit'])) { echo '<div class="updated" style="padding: 0; margin: 0; border: none; background: none;"> <div class="livepress_admin_warning"> <div class="aa_button_container" onclick="window.open(\'http://www.livepress.com/wordpress\', \'_blank\' );"> <div class="aa_button_border"> <div class="aa_button">' . esc_html__('Sign up for LivePress') . '</div> </div> </div> <div class="aa_description"> <a href = "' . esc_url(add_query_arg(array('page' => 'livepress-settings'), admin_url('options-general.php'))) . '&show=enter-api-key">' . esc_html__('I have already activated my LivePress account', 'livepress') . '</a></div> </div> </div> '; } else { // Otherwise, display the settings page as usual ?> <?php settings_fields('livepress'); ?> <?php do_settings_sections('livepress-settings'); ?> <?php wp_nonce_field('activate_license', '_lp_nonce'); ?> <?php submit_button(); ?> </form> </div> <?php } }
public function settingsHtml() { $alert = isset($_REQUEST['settings-updated']) ? '<div class="updated fade"><p><strong>Options Saved</strong></p></div>' : null; $icon = get_screen_icon(); # Print out all the settings with the functions above. print <<<S <script> (function(\$) { \t\$(function() { \t\tvar curHash = null, \t\t\t\$nav = jQuery('.nav-tab-wrapper'), \t\t\t\$navA = \$nav.find('a'), \t\t\t\$table = jQuery('.form-table'); \t\tfunction setTab(\$tab) { \t\t\tif ( \t\t\t\t\$tab === curHash \t\t\t\t|| \$tab === undefined \t\t\t) return; \t\t\tcurHash = \$tab; \t\t\t\$a = \$nav.find('[href="'+curHash+'"]'); \t\t\t\$navA.removeClass('nav-tab-active'); \t\t\t\$a.addClass('nav-tab-active'); \t\t\t\$table.find('tbody').hide(); \t\t\t\$table.find('tbody[data-tab="'+\$tab+'"]').show(); \t\t}; \t\tif (!location.hash) setTab(\$navA.eq(0).attr('href')); \t\tsetInterval(function() { \t\t\tif (hash = location.hash) setTab(hash); \t\t}, 50); \t}); })(jQuery); </script> <div class="wrap"> \t{$icon} <h2>Theme Options</h2> \t<form method="post" action="options.php"> \t\t<p class="submit"> \t\t\t<input type="submit" class="button-primary" value="Save Options" /> \t\t</p> \t\t<h2 class="nav-tab-wrapper"> \t\t\t{$this->buildTabs()} \t\t</h2> \t\t{$alert} S; # Break for the settings fields. settings_fields('nws_settings'); # Continue on! print <<<S \t\t<table class="form-table"> \t\t\t{$this->buildSettings()} \t\t</table> \t\t<p class="submit"> \t\t\t<input type="submit" class="button-primary" value="Save Options" /> \t\t</p> \t</form> </div> S; }
/** * Display a settings for for Carrington Framework * **/ function cfct_settings_form() { settings_errors(); print ' <div class="wrap"> ' . get_screen_icon() . '<h2>' . apply_filters('cfct_admin_settings_form_title', __('Carrington Theme Settings', 'carrington')) . '</h2> <form action="' . admin_url('options.php') . '" method="post"> '; do_action('cfct_settings_form_top'); do_settings_sections('cfct'); do_action('cfct_settings_form_bottom'); do_action('cfct_settings_form'); settings_fields('cfct'); print ' <p class="submit" style="padding-left: 230px;"> <input type="submit" name="submit_button" class="button-primary" value="' . __('Save', 'carrington') . '" /> </p> </form> </div> '; do_action('cfct_settings_form_after'); }
public static function showOptionsPage() { global $wpdb; $table_name = $wpdb->prefix . MLAB_DB_TABLE; $result = $wpdb->get_results("SELECT * FROM {$table_name}"); $options = unserialize($result[0]->options); // Ajout des CSS et JS wp_enqueue_style('style-name', MLAB_ROOT_URL . '/css/mlab_popup.css'); wp_enqueue_script('script-name', MLAB_ROOT_URL . '/js/mlab_popup.js', array(), '1.0.0', true); get_screen_icon('options-general'); ?> <div class="wrap"> <div id="poststuff"> <div id="post-body" class="metabox-holder columns-2"> <!-- /post-body-content --> <form method="post" action="" enctype="multipart/form-data"> <div id="postbox-container-1" class="postbox-container"> <div id="side-sortables" class="meta-box-sortables ui-sortable"> <div id="postimagediv" class="postbox "> <div class="handlediv"><br> </div> <h3 class="hndle"><span><?php _e('Action', 'mlab_popup'); ?> </span></h3> <div class="inside"> <div class="misc-pub-section misc-pub-post-status"> <label for="post_status"><?php _e('Stat', 'mlab_popup'); ?> :</label> <span id="post-status-display"><?php $options['activate'] == '1' ? _e('Active', 'mlab_popup') : _e('Inactive', 'mlab_popup'); ?> </span> <div id="post-status-select"> <select name="activate" id="activate"> <option <?php echo $options['activate'] == '1' ? 'selected="selected"' : ''; ?> value="1"> <?php _e('Active', 'mlab_popup'); ?> </option> <option <?php echo $options['activate'] == '0' ? 'selected="selected"' : ''; ?> value="0"> <?php _e('Inactive', 'mlab_popup'); ?> </option> </select> </div> <p class="submit"> <input type="submit" name="mlab_popup_submit" id="mlab_popup_submit" class="button button-primary" value="<?php _e('Save', 'mlab_popup'); ?> "> <input type="button" name="mlab_popup_preview" id="mlab_popup_preview" class="button button-primary" value="<?php _e('Preview', 'mlab_popup'); ?> "> </p> <p id="preview_help" class="description"> <?php _e('Preview is only available in text mode', 'mlab_popup'); ?> .</p> </div> </div> </div> </div> </div> <div id="postbox-container-2" class="postbox-container"> <div id="normal-sortables" class="meta-box-sortables ui-sortable"> <div id="team_metabox" class="postbox "> <div class="handlediv" title="Cliquer pour inverser."><br> </div> <h3 class="hndle"><span>Magneticlab Homepage Pop-up</span></h3> <div class="inside"> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"> <label for="popup_width"> <?php _e('Width', 'mlab_popup'); ?> </label></th> <td><input name="popup_width" type="text" id="popup_width" size="10" value="<?php echo $options['width']; ?> " > px (min 200px) </td> </tr> <tr valign="top"> <th scope="row"><label for="popup_titre"> <?php _e('Heading', 'mlab_popup'); ?> </label></th> <td><input name="popup_titre" type="text" id="popup_titre" value="<?php echo $result[0]->titre; ?> " class="regular-text"></td> </tr> <tr valign="top"> <th scope="row"><label for="popup_text"> <?php _e('Content', 'mlab_popup'); ?> </label></th> <td><?php wp_editor($result[0]->text, 'popup_text', $settings = array('teeny' => true)); ?> </td> </tr> <tr valign="top"> <th scope="row"><label for="popup_text"> <?php _e('Call to action', 'mlab_popup'); ?> </label></th> <td><input name="popup_label" type="text" id="popup_label" value="<?php echo $options['label']; ?> " class="regular-text" placeholder="<?php _e('Label', 'mlab_popup'); ?> "> <input name="popup_link" type="text" id="popup_link" value="<?php echo $options['link']; ?> " class="regular-text" placeholder="<?php _e('Link', 'mlab_popup'); ?> (http://www.example.com)"></td> </tr> </tbody> </table> </div> </div> </div> </div> </form> </div> <!-- /post-body --> <br class="clear"> <p><span>Version <?php echo get_option("mlab_db_version"); ?> </span> <?php printf(__('by %1$s | %2$s', 'mlab_popup'), '<strong>Magneticlab Sà rl</strong>', '<strong><a href="http://www.magneticlab.ch" title="Web design lab">magneticlab.ch</a></strong>'); ?> </p> </div> </div> <?php // Preview // Largeur minimum autorisée = 200 $max_width = $options['width'] <= 199 ? '200' : $options['width']; print '<div class="modal fades in "tabindex="-1" role="dialog" style="display: none;"> <div class="modal-dialog" style="width:' . $max_width . 'px;"> <div class="modal-content"> <div class="modal-header"> <img class="close" src="' . MLAB_ROOT_URL . '/images/close_pop.png" title="' . __('Close Window', 'mlab_popup') . '" alt="Close" width="25" height="25"> <h4 class="modal-title">' . $result[0]->titre . '</h4> </div> <div class="modal-body"> </div> <div class="modal-footer" style="display:none"> <a href="" class="modal-link"><input type="button" class="button button-primary modal-label" value=""></a> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div>'; }
function optionsframework_page() { $return = optionsframework_fields(); settings_errors(); ?> <div class="wrap"> <?php echo get_screen_icon($screen = 'settings'); ?> <h2 class="themeoptions"> Theme Options</h2> <div class="extern-links"> <a class="icon-a icon-gallery" href='http://themeforest.net/user/2winFactor/portfolio?ref=2winfactor' target="_blank" ><span class="icon"><span>Themes</span></span></a> <a class="icon-a icon-support" href='http://www.themewich.com' target="_blank" ><span class="icon"><span>Support Forum</span></span></a> <a class="icon-a icon-documentation" href='<?php echo get_template_directory_uri(); ?> /pdf/documentation.pdf' target="_blank" ><span class="icon"><span>Documentation</span></span></a> </div> <br class="clear" /> <h2 class="nav-tab-wrapper"> <?php echo $return[1]; ?> </h2> <div class="metabox-holder"> <div id="optionsframework" class="postbox"> <form action="options.php" method="post"> <?php settings_fields('optionsframework'); ?> <?php /* Top buttons */ ?> <div id="optionsframework-submit"> <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e('Save Options'); ?> " /> <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e('Restore Defaults'); ?> " onclick="return confirm( '<?php print esc_js(__('Click OK to reset. Any theme settings will be lost!', 'framework')); ?> ' );" /> <div class="clear"></div> </div> <?php echo $return[0]; /* Settings */ ?> <?php /* Bottom buttons */ ?> <div id="optionsframework-submit"> <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e('Save Options'); ?> " /> <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e('Restore Defaults'); ?> " onclick="return confirm( '<?php print esc_js(__('Click OK to reset. Any theme settings will be lost!', 'framework')); ?> ' );" /> <div class="clear"></div> </div> </form> </div> <!-- / #container --> </div> </div> <!-- / .wrap --> <?php }
function connectionsShowRolesPage() { /* * Check whether user can edit roles */ if (!current_user_can('connections_change_roles')) { wp_die('<p id="error-page" style="-moz-background-clip:border; -moz-border-radius:11px; background:#FFFFFF none repeat scroll 0 0; border:1px solid #DFDFDF; color:#333333; display:block; font-size:12px; line-height:18px; margin:25px auto 20px; padding:1em 2em; text-align:center; width:700px">' . __('You do not have sufficient permissions to access this page.', 'connections') . '</p>'); } else { global $connections, $wp_roles; $form = new cnFormObjects(); ?> <div class="wrap cn-roles"> <?php echo get_screen_icon('connections'); ?> <h2>Connections : <?php _e('Roles & Capabilities', 'connections'); ?> </h2> <?php $attr = array('action' => '', 'method' => 'post'); $form->open($attr); $form->tokenField('update_role_settings'); ?> <div id="poststuff" class="metabox-holder has-right-sidebar"> <div class="inner-sidebar" id="side-info-column"> <div id="submitdiv" class="postbox"> <h3 class="hndle" style="cursor: auto;"> <span><?php _e('Save Changes or Reset', 'connections'); ?> </span> </h3> <div class="inside"> <div id="minor-publishing"> <label for="reset_all_roles"> <input type="checkbox" id="reset_all_roles" name="reset_all" value="true"> <?php _e('Reset All Role Capabilities', 'connections'); ?> </label> </div> <div id="major-publishing-actions"> <div id="publishing-action"> <input type="hidden" name="cn-action" value="update_role_capabilities"/> <input class="button-primary" type="submit" value="<?php _e('Update', 'connections'); ?> " name="save" /> </div> <div class="clear"></div> </div> </div> </div> </div> <div class="has-sidebar" id="post-body"> <div class="has-sidebar-content" id="post-body-content"> <?php $editable_roles = get_editable_roles(); foreach ($editable_roles as $role => $details) { $name = translate_user_role($details['name']); // the admininistrator should always have all capabilities if ($role == 'administrator') { continue; } $capabilies = cnRole::capabilities(); echo '<div class="postbox">'; echo '<h3 class="hndle" style="cursor: auto;"><span>', $name, '</span></h3>'; echo '<div class="inside">'; foreach ($capabilies as $capability => $capabilityName) { // if unregistered users are permitted to view the entry list there is no need for setting this capability if ($capability == 'connections_view_public' && $connections->options->getAllowPublic() == true) { continue; } echo '<span style="display: block;"><label for="' . $role . '_' . $capability . '">'; echo '<input type="hidden" name="roles[' . $role . '][capabilities][' . $capability . ']" value="false" />'; echo '<input type="checkbox" id="' . $role . '_' . $capability . '" name="roles[' . $role . '][capabilities][' . $capability . ']" value="true" '; if (cnRole::hasCapability($role, $capability)) { echo 'CHECKED '; } // the admininistrator should always have all capabilities if ($role == 'administrator') { echo 'DISABLED '; } echo '/> ' . $capabilityName . '</label></span>' . "\n"; } echo '<span style="display: block;"><label for="' . $role . '_reset_capabilities">'; echo '<input type="checkbox" id="' . $role . '_reset_capabilities" name="reset[' . $role . ']" value="' . $name . '" /> '; echo sprintf(__('Reset %s Capabilities', 'connections'), $name) . '</label></span>' . "\n"; echo '</div>'; echo '</div>'; } ?> </div> </div> </div> <?php $form->close(); ?> </div> <div class="clear"></div> <?php } }
function screen_icon() { echo '<a target="_blank" href="http://dedepress.com">' . get_screen_icon('themes') . '</a>'; }
/** * Displays a screen icon. * * @uses get_screen_icon() * @since 2.7.0 * * @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object) * which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID. */ function screen_icon($screen = '') { echo get_screen_icon($screen); }
function optionsframework_page() { $return = optionsframework_fields(); settings_errors(); ?> <div class="wrap"> <?php echo get_screen_icon($screen = 'settings'); ?> <div class="extern-links"> <a class="icon-a icon-gallery" href='#' ><span class="icon"><span>Themes gallery</span></span></a> <a class="icon-a icon-support" href='#' ><span class="icon"><span>Support</span></span></a> <a class="icon-a icon-documentation" href='#' ><span class="icon"><span>Documentation</span></span></a> </div> <br class="clear" /> <h2 class="nav-tab-wrapper"> <?php echo $return[1]; ?> </h2> <div class="metabox-holder"> <div id="optionsframework" class="postbox"> <form action="options.php" method="post"> <?php settings_fields('optionsframework'); ?> <?php /* Top buttons */ ?> <div id="optionsframework-submit"> <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e('Save Options'); ?> " /> <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e('Restore Defaults'); ?> " onclick="return confirm( '<?php print esc_js(__('Click OK to reset. Any theme settings will be lost!')); ?> ' );" /> <div class="clear"></div> </div> <?php echo $return[0]; /* Settings */ ?> <?php /* Bottom buttons */ ?> <div id="optionsframework-submit"> <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e('Save Options'); ?> " /> <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e('Restore Defaults'); ?> " onclick="return confirm( '<?php print esc_js(__('Click OK to reset. Any theme settings will be lost!')); ?> ' );" /> <div class="clear"></div> </div> </form> </div> <!-- / #container --> </div> </div> <!-- / .wrap --> <?php }
/** * admin_screen() * * Load the admin screen. * * @since 1.0.0 */ function admin_screen() { $export_type = 'all'; if (isset($_POST['export-type'])) { $export_type = esc_attr($_POST['export-type']); } ?> <div class="wrap"> <?php echo get_screen_icon($screen = 'import-export'); ?> <h2><?php esc_html_e('Import / Export'); ?> </h2> <?php wp_register_style('general', get_template_directory_uri() . 'inc/admin/css/admin-style.css', array(), '', 'screen'); ?> <div id="of_container"> <div class="custom-toggle" style="background-color: #9afaa3;"> <h4><?php esc_html_e('Import Settings'); ?> </h4> </div> <div class="inner-toggle" style="display: block; background-color: #cefad2;"> <div class="import"> <h4><?php esc_html_e('Import Theme Options Value Settings'); ?> </h4> <p><?php esc_html_e('If you have settings in a backup file on your computer, the Import / Export system can import those into this site. To get started, upload your backup file to import from below.'); ?> </p> <form enctype="multipart/form-data" method="post" action="<?php echo admin_url('admin.php?page=' . $this->token); ?> "> <?php wp_nonce_field('OptionsFramework-backup-import'); ?> <label for="OptionsFramework-import-file"><?php printf(esc_html_e('Upload File: (Maximum Size: 800M)'), ini_get('post_max_size')); ?> </label> <input type="file" id="OptionsFramework-import-file" name="OptionsFramework-import-file" size="25" /> <input type="hidden" name="OptionsFramework-backup-import" value="1" /> <input type="submit" class="button" value="<?php esc_html_e('Upload File and Import'); ?> " /> </form> </div> <div id="of_container" style="width: 820px;"> <div class="inner-toggle" style="display: block; background-color: #fcfbe8;"> <div class="export"> <h4><?php esc_html_e('Export Theme Options Value Settings'); ?> </h4> <p><?php esc_html_e('When you click the button below, the Import / Export system will create a text file for you to save to your computer.'); ?> </p> <p><?php echo sprintf(__('This text file can be used to restore your settings here on "%s", or to easily setup another website with the same settings".'), get_bloginfo('name')); ?> </p> <form method="post" action="<?php echo admin_url('admin.php?page=' . $this->token); ?> "> <?php wp_nonce_field('OptionsFramework-backup-export'); ?> <input type="hidden" name="OptionsFramework-backup-export" value="1" /> <input type="submit" class="button" value="<?php _e('Download Export File', 'OptionsFramework'); ?> " /> </form> </div> </div> </div> </div> </div> </div><!--/.wrap--> <div id="of_container"> <div class="custom-toggle" style="background-color: #9adffa;"> <h4><?php echo __('Import Wordpress Post', 'wordpress-importer'); ?> </h4> </div> <div class="inner-toggle" style="display: block; background-color: #e2f3fa;"> <?php echo '<div class="narrow">'; echo '<h4>' . __('Import Wordpress Post', 'wordpress-importer') . '</h4>'; echo '<p>' . __('Choose a WXR (.xml) file to upload, then click Upload file and import.', 'wordpress-importer') . '</p>'; wp_import_upload_form('admin.php?import=wordpress&step=1'); echo '</div>'; ?> </div> </div> <?php }
function optionsframework_page() { //$return = optionsframework_fields(); ?> <div class="options_wrap"> <div class="wrap"> <div class="clear"></div> <form method="post"> <?php /* Top buttons */ ?> <div id="optionsframework-submit"> <div class="optionsframework-submit-inner"> <span><?php echo get_screen_icon($screen = 'settings'); ?> <div class="options-title">Theme Options</div> <input type="submit" class="button-primary topbutton-right" name="update" value="<?php esc_attr_e('Save Options'); ?> " /> </span> <div class="clear"></div> <?php settings_errors(); ?> </div> </div> <div class="nav-tab-wrapper"> <?php echo optionsframework_tabs(); ?> </div> <div class="metabox-holder"> <div id="optionsframework" class="postbox"> <?php settings_fields('optionsframework'); ?> <?php optionsframework_fields(); /* Settings */ ?> <?php /* Bottom buttons */ ?> <div id="optionsframework-reset"> <?php echo '<input type="hidden" name="mtheme_options_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />'; ?> <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e('Save Options'); ?> " /> <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e('Restore Defaults'); ?> " onclick="return confirm( '<?php print esc_js(__('Click OK to reset. Any theme settings will be lost!', 'mthemelocal')); ?> ' );" /> <div class="clear"></div> </div> </div> <!-- / #container --> </div> </form> </div> </div> <!-- / .wrap --> <?php }
function screen_icon() { echo get_screen_icon(); }
function main() { global $mf_domain, $mf_pt_register; $posttypes = $this->mf_get_post_types(); $custom_taxonomies = $this->get_custom_taxonomies(); print '<div class="wrap">'; // print screen icon print get_screen_icon('magic-fields'); print '<h2>' . __('Magic Fields', $mf_domain) . '</h2>'; print '<h3>' . __('Post Types', $mf_domain) . '<a href="admin.php?page=mf_dispatcher&mf_section=mf_posttype&mf_action=add_post_type" class="add-new-h2 button mf-btn-add">' . __('Add new Post Type', $mf_domain) . '</a></h3>'; ?> <table class="widefat fixed" cellspacing="0"> <thead> <tr> <th scope="col" id="title" class="manage-column column-title" width="40%"><?php _e('Label ', $mf_domain); ?> <small>(<?php _e('Menu name', $mf_domain); ?> )</small></th> <th scope="col" id="type_name" class="manage-column column-title" width="30%"><?php _e('Type', $mf_domain); ?> </th> <th scope="col" id="type_desc" class="manage-column column-title" width="30%"><?php _e('Description', $mf_domain); ?> </th> </tr> </thead> <tfoot> <tr> <th scope="col" id="title" class="manage-column column-title" width="40%"><?php _e('Label ', $mf_domain); ?> <small>(<?php _e('Menu name', $mf_domain); ?> )</small></th> <th scope="col" id="type_name" class="manage-column column-title" width="30%"><?php _e('Type', $mf_domain); ?> </th> <th scope="col" id="type_desc" class="manage-column column-title" width="30%"><?php _e('Description', $mf_domain); ?> </th> </tr> </tfoot> <tbody> <?php $counter = 0; foreach ($posttypes as $pt) { $alternate = $counter % 2 ? "alternate" : ""; $counter++; ?> <tr class="<?php print $alternate; ?> iedit"> <td> <strong><?php echo $pt->label; ?> </strong><small> ( <?php echo $pt->labels->menu_name; ?> )</small> <div class="row-actions"> <span class="edit"> <a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_fields&mf_action=fields_list&post_type=<?php print $pt->name; ?> ">Edit Fields/Groups</a> </span> <?php if (in_array($pt->name, $mf_pt_register)) { ?> |<span class="edit"> <a href="admin.php?page=mf_dispatcher&mf_section=mf_posttype&mf_action=edit_post_type&post_type=<?php echo $pt->name; ?> ">Edit Post Type</a> | </span> <span class="delete"> <?php //nonce $link = "admin.php?page=mf_dispatcher&init=true&mf_section=mf_posttype&mf_action=delete_post_type&post_type={$pt->name}"; $link = wp_nonce_url($link, "delete_post_type_mf_posttype"); ?> <a class="mf_confirm" alt="<?php _e("This action can't be undone, are you sure?", $mf_domain); ?> " href="<?php print $link; ?> ">Delete</a> <?php } else { ?> | <a href="admin.php?page=mf_dispatcher&init=false&mf_section=mf_posttype&mf_action=set_categories&post_type=<?php echo $pt->name; ?> &TB_iframe=1&width=640&height=541" title="default categories" class="thickbox" onclick="return false;" >Set default categories</a> <?php } ?> </span> </div> </td> <td><?php echo $pt->name; ?> </td> <td><?php echo $pt->description; ?> </td> </tr> <?php } ?> </tbody> </table> <?php print '<h3>' . __(' Custom Taxonomy', $mf_domain) . '<a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_taxonomy&mf_action=add_custom_taxonomy" class="add-new-h2 button mf-btn-add">' . __('Add new Custom Taxonomy', $mf_domain) . '</a></h3>'; if (empty($custom_taxonomies)) { ?> <div class="message-box info"> <p> ooh, you do haven't created any Custom Taxonomy, try creating one <a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_taxonomy&mf_action=add_custom_taxonomy">here</a> </p> </div> <?php } else { ?> <table class="widefat fixed" cellspacing="0"> <thead> <tr> <th scope="col" id="title" class="manage-column column-title" width="40%"><?php _e('Label ', $mf_domain); ?> <small>(<?php _e('Menu name', $mf_domain); ?> )</small></th> <th scope="col" id="type_name" class="manage-column column-title" width="30%"><?php _e('Type', $mf_domain); ?> </th> <th scope="col" id="type_desc" class="manage-column column-title" width="30%"><?php _e('Description', $mf_domain); ?> </th> </tr> </thead> <tfoot> <tr> <th scope="col" id="title" class="manage-column column-title" width="15%"><?php _e('Label ', $mf_domain); ?> <small>(<?php _e('Menu name', $mf_domain); ?> )</small></th> <th scope="col" id="type_name" class="manage-column column-title" width="40%"><?php _e('Type', $mf_domain); ?> </th> <th scope="col" id="type_desc" class="manage-column column-title" width="40%"><?php _e('Description', $mf_domain); ?> </th> </tr> </tfoot> <tbody> <?php if ($custom_taxonomies) { ?> <?php $counter = 0; foreach ($custom_taxonomies as $tax) { $alternate = $counter % 2 ? "alternate" : ""; $counter++; $tmp = unserialize($tax['arguments']); ?> <tr class="<?php print $alternate; ?> iedit"> <td> <strong><?php echo $tax['name']; ?> </strong> <small>( <?php echo $tmp['label']['menu_name']; ?> )</small> <div class="row-actions"> <span class="edit"> <a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_taxonomy&mf_action=edit_custom_taxonomy&custom_taxonomy_id=<?php echo $tax['id']; ?> ">Edit Custom Taxonomy</a> | </span> <span class="delete"> <?php $link = "admin.php?page=mf_dispatcher&init=true&mf_section=mf_custom_taxonomy&mf_action=delete_custom_taxonomy&custom_taxonomy_id={$tax['id']}"; $link = wp_nonce_url($link, "delete_custom_taxonomy_mf_custom_taxonomy"); ?> <a href="<?php print $link; ?> " class="mf_confirm" alt="<?php _e("This action can't be undone, are you sure?", $mf_domain); ?> ">Delete</a> </span> </div> </td> <td> <?php echo $tax['type']; ?> </td> <td><?php echo $tax['description']; ?> </td> </tr> <?php } ?> <?php } ?> </tbody> </table> <?php } print '</div>'; }