function bearded_social_meta_box() { ?> <table class="form-table"> <!-- Add custom form elements below here. --> <!-- Text input box --> <?php $socials = bearded_get_social_lists(); ?> <?php foreach ($socials as $key => $val) { ?> <tr> <th> <label for="<?php echo hybrid_settings_field_id('bearded_social_' . $key); ?> "> <?php printf(__('%1$s URL', 'bearded'), ucwords(str_replace('-', ' ', $key))); ?> </label> </th> <td> <p> <input type="text" id="<?php echo hybrid_settings_field_id('bearded_social_' . $key); ?> " name="<?php echo hybrid_settings_field_name('bearded_social_' . $key); ?> " size="80" value="<?php echo $val; ?> " /> </p> </td> </tr> <?php } ?> <!-- End custom form elements. --> </table><!-- .form-table --> <?php }
/** * Creates a meta box that allows users to customize their footer. * * @since 1.2.0 * @uses wp_editor() Creates an instance of the WordPress text/content editor. * @return void */ function hybrid_meta_box_theme_display_footer() { /* Add a textarea using the wp_editor() function to make it easier on users to add custom content. */ wp_editor(esc_textarea(hybrid_get_setting('footer_insert')), hybrid_settings_field_id('footer_insert'), array('tinymce' => false, 'textarea_name' => hybrid_settings_field_name('footer_insert'))); ?> <p> <span class="description"><?php _e('You can add custom <acronym title="Hypertext Markup Language">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme.', 'hybrid-core'); ?> </span> </p> <?php }
/** * Creates a settings box that allows users to customize their footer. A basic textarea is given that * allows HTML and shortcodes to be input. * * @since 1.2.0 */ function hybrid_meta_box_theme_display_footer() { $domain = hybrid_get_textdomain(); ?> <p> <span class="description"><?php _e('You can add custom <acronym title="Hypertext Markup Language">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme.', $domain); ?> </span> </p> <p> <textarea id="<?php echo hybrid_settings_field_id('footer_insert'); ?> " name="<?php echo hybrid_settings_field_name('footer_insert'); ?> " cols="60" rows="5"><?php echo esc_textarea(hybrid_get_setting('footer_insert')); ?> </textarea> </p> <?php if (current_theme_supports('hybrid-core-shortcodes')) { ?> <p> <?php printf(__('Shortcodes: %s', $domain), '<code>[the-year]</code>, <code>[site-link]</code>, <code>[wp-link]</code>, <code>[theme-link]</code>, <code>[child-link]</code>, <code>[loginout-link]</code>, <code>[query-counter]</code>'); ?> </p> <?php } }
/** * Function for displaying the meta box * * @return void * @since Cakifo 1.0 */ function cakifo_theme_meta_box() { ?> <table class="form-table"> <tr> <th><label for="<?php echo hybrid_settings_field_id('link_color'); ?> "><?php _e('Link Color', 'cakifo'); ?> </label></th> <td> <fieldset> <legend class="screen-reader-text"><span><?php _e('Link Color', 'cakifo'); ?> </span></legend> <input type="text" name="<?php echo hybrid_settings_field_name('link_color'); ?> " id="link-color" value="<?php echo esc_attr(hybrid_get_setting('link_color')); ?> " /> <a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a> <input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e('Select a Color', 'cakifo'); ?> " /> <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> <br /> <span><?php printf(__('Default color: %s', 'cakifo'), '<span id="default-color">' . cakifo_get_default_link_color() . '</span>'); ?> </span> </fieldset> </td> </tr> <tr> <th> <label for="<?php echo hybrid_settings_field_id('featured_show'); ?> "><?php _e('Show "Featured Content" slider?', 'cakifo'); ?> </label> </th> <td> <p><input id="featured_show" name="<?php echo hybrid_settings_field_name('featured_show'); ?> " type="checkbox" value="1" <?php checked(hybrid_get_setting('featured_show'), 1); ?> /></p> <p><?php _e('Check to display the "Featured Content" slider', 'cakifo'); ?> </p> </td> </tr> <tr> <th> <label for="<?php echo hybrid_settings_field_id('featured_category'); ?> "><?php _e('Featured Category:', 'cakifo'); ?> </label> </th> <td> <?php $categories = get_categories(); ?> <p> <select id="<?php echo hybrid_settings_field_id('featured_category'); ?> " name="<?php echo hybrid_settings_field_name('featured_category'); ?> "> <option value="" <?php selected(hybrid_get_setting('featured_category'), ''); ?> ></option> <?php foreach ($categories as $cat) { ?> <option value="<?php echo $cat->term_id; ?> " <?php selected(hybrid_get_setting('featured_category'), $cat->term_id); ?> ><?php echo esc_attr($cat->name); ?> </option> <?php } ?> </select> </p> <p><?php _e('Leave blank to use sticky posts', 'cakifo'); ?> </p> </td> </tr> <tr> <th> <label for="<?php echo hybrid_settings_field_id('featured_posts'); ?> "><?php _e('Featured Posts:', 'cakifo'); ?> </label> </th> <td> <p><input type="number" min="-1" id="<?php echo hybrid_settings_field_id('featured_posts'); ?> " name="<?php echo hybrid_settings_field_name('featured_posts'); ?> " value="<?php echo esc_attr(hybrid_get_setting('featured_posts')); ?> " class="small-text" /></p> <p><?php _e('How many featured posts should be shown? <code>-1</code> will show all posts in the category.', 'cakifo'); ?> <?php printf(__('%s is the default', 'cakifo'), '<code>5</code>'); ?> </p> </td> </tr> <tr> <th> <label for="<?php echo hybrid_settings_field_id('headlines_category'); ?> "><?php _e('Headline Categories:', 'cakifo'); ?> </label> </th> <td> <p> <label for="<?php echo hybrid_settings_field_id('headlines_category'); ?> "><?php _e('Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting.', 'cakifo'); ?> </label> <br /> <select id="<?php echo hybrid_settings_field_id('headlines_category'); ?> " name="<?php echo hybrid_settings_field_name('headlines_category'); ?> []" multiple="multiple" style="height:150px;"> <?php foreach ($categories as $cat) { ?> <option value="<?php echo $cat->term_id; ?> " <?php if (is_array(hybrid_get_setting('headlines_category')) && in_array($cat->term_id, hybrid_get_setting('headlines_category'))) { echo ' selected="selected"'; } ?> ><?php echo esc_html($cat->name); ?> </option> <?php } ?> </select> </p> </td> </tr> <tr> <th><label for="<?php echo hybrid_settings_field_id('headlines_num_posts'); ?> "><?php _e('Headlines Posts:', 'cakifo'); ?> </label></th> <td> <p><input type="number" min="1" id="<?php echo hybrid_settings_field_id('headlines_num_posts'); ?> " name="<?php echo hybrid_settings_field_name('headlines_num_posts'); ?> " value="<?php echo esc_attr(hybrid_get_setting('headlines_num_posts')); ?> " class="small-text" /></p> <p><?php _e('How many posts should be shown per headline category?', 'cakifo'); ?> <?php printf(__('%s is the default', 'cakifo'), '<code>4</code>'); ?> </p></p> </td> </tr> <tr> <?php $current_user = wp_get_current_user(); ?> <th> <label for="<?php echo hybrid_settings_field_id('twitter_username'); ?> "><?php _e('Twitter username:'******'cakifo'); ?> </label> </th> <td> <p><input type="text" id="<?php echo hybrid_settings_field_id('twitter_username'); ?> " name="<?php echo hybrid_settings_field_name('twitter_username'); ?> " value="<?php if (hybrid_get_setting('twitter_username') != '') { echo esc_attr(hybrid_get_setting('twitter_username')); } elseif (isset($current_user->twitter)) { echo esc_attr($current_user->twitter); } ?> " /></p> <p><?php _e('Your Twitter username (if you have one)', 'cakifo'); ?> </td> </tr> </table> <!-- .form-table --> <?php }
function hatch_theme_meta_box() { ?> <table class="form-table"> <!-- Favicon upload --> <tr class="favicon_url"> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('hatch_favicon_url')); ?> "><?php _e('Favicon:', 'hatch'); ?> </label> </th> <td> <input type="text" id="<?php echo esc_attr(hybrid_settings_field_id('hatch_favicon_url')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('hatch_favicon_url')); ?> " value="<?php echo esc_url(hybrid_get_setting('hatch_favicon_url')); ?> " /> <input id="hatch_favicon_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload favicon image (recommended max size: 32x32).', 'hatch'); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('hatch_favicon_url')) { ?> <p><img src="<?php echo esc_url(hybrid_get_setting('hatch_favicon_url')); ?> " alt="" /></p> <?php } ?> </td> </tr> <!-- Logo upload --> <tr class="logo_url"> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('hatch_logo_url')); ?> "><?php _e('Logo:', 'hatch'); ?> </label> </th> <td> <input type="text" id="<?php echo esc_attr(hybrid_settings_field_id('hatch_logo_url')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('hatch_logo_url')); ?> " value="<?php echo esc_url(hybrid_get_setting('hatch_logo_url')); ?> " /> <input id="hatch_logo_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload logo image (recommended max width: 200px).', 'hatch'); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('hatch_logo_url')) { ?> <p><img src="<?php echo esc_url(hybrid_get_setting('hatch_logo_url')); ?> " alt="" /></p> <?php } ?> </td> </tr> <!-- Author Description --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('hatch_author_bio')); ?> "><?php _e('Author:', 'hatch'); ?> </label> </th> <td> <?php /* Set arguments for the authors dropdown list */ $author_bio_id = hybrid_settings_field_id('hatch_author_bio'); $author_bio_name = hybrid_settings_field_name('hatch_author_bio'); $author_bio_selected = hybrid_get_setting('hatch_author_bio'); $args = array('id' => $author_bio_id, 'name' => $author_bio_name, 'selected' => $author_bio_selected); /* Display the authors dropdown list */ wp_dropdown_users($args); ?> <span class="description"><?php _e('Whose biography to display on the home page?', 'hatch'); ?> </span> </td> </tr> <!-- Font family --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('hatch_font_family')); ?> "><?php _e('Font family:', 'hatch'); ?> </label> </th> <td> <select id="<?php echo esc_attr(hybrid_settings_field_id('hatch_font_family')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('hatch_font_family')); ?> "> <option value="Arial" <?php selected(hybrid_get_setting('hatch_font_family'), 'Arial'); ?> > <?php echo __('Arial', 'hatch'); ?> </option> <option value="Verdana" <?php selected(hybrid_get_setting('hatch_font_family'), 'Verdana'); ?> > <?php echo __('Verdana', 'hatch'); ?> </option> <option value="Bitter" <?php selected(hybrid_get_setting('hatch_font_family'), 'Bitter'); ?> > <?php echo __('Bitter', 'hatch'); ?> </option> <option value="Georgia" <?php selected(hybrid_get_setting('hatch_font_family'), 'Georgia'); ?> > <?php echo __('Georgia', 'hatch'); ?> </option> <option value="Droid Serif" <?php selected(hybrid_get_setting('hatch_font_family'), 'Droid Serif'); ?> > <?php echo __('Droid Serif', 'hatch'); ?> </option> <option value="Helvetica" <?php selected(hybrid_get_setting('hatch_font_family'), 'Helvetica'); ?> > <?php echo __('Helvetica', 'hatch'); ?> </option> <option value="Istok Web" <?php selected(hybrid_get_setting('hatch_font_family'), 'Istok Web'); ?> > <?php echo __('Istok Web', 'hatch'); ?> </option> <option value="Lucida Sans Unicode" <?php selected(hybrid_get_setting('hatch_font_family'), 'Lucida Sans Unicode'); ?> > <?php echo __('Lucida Sans Unicode', 'hatch'); ?> </option> <option value="Droid Sans" <?php selected(hybrid_get_setting('hatch_font_family'), 'Droid Sans'); ?> > <?php echo __('Droid Sans', 'hatch'); ?> </option> </select> </td> </tr> <!-- Font size --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('hatch_font_size')); ?> "><?php _e('Font size:', 'hatch'); ?> </label> </th> <td> <select id="<?php echo esc_attr(hybrid_settings_field_id('hatch_font_size')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('hatch_font_size')); ?> "> <option value="16" <?php selected(hybrid_get_setting('hatch_font_size'), '16'); ?> > <?php echo __('default', 'hatch'); ?> </option> <option value="17" <?php selected(hybrid_get_setting('hatch_font_size'), '17'); ?> > <?php echo __('17', 'hatch'); ?> </option> <option value="16" <?php selected(hybrid_get_setting('hatch_font_size'), '16'); ?> > <?php echo __('16', 'hatch'); ?> </option> <option value="15" <?php selected(hybrid_get_setting('hatch_font_size'), '15'); ?> > <?php echo __('15', 'hatch'); ?> </option> <option value="14" <?php selected(hybrid_get_setting('hatch_font_size'), '14'); ?> > <?php echo __('14', 'hatch'); ?> </option> </select> <span class="description"><?php _e('The base font size in pixels.', 'hatch'); ?> </span> </td> </tr> <!-- Link color --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('hatch_link_color')); ?> "><?php _e('Link color:', 'hatch'); ?> </label> </th> <td> <input type="text" id="<?php echo esc_attr(hybrid_settings_field_id('hatch_link_color')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('hatch_link_color')); ?> " size="8" value="<?php echo hybrid_get_setting('hatch_link_color') ? esc_attr(hybrid_get_setting('hatch_link_color')) : '#64a2d8'; ?> " data-hex="true" /> <div id="colorpicker_link_color"></div> <span class="description"><?php _e('Set the theme link color.', 'hatch'); ?> </span> </td> </tr> <!-- Custom CSS --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('hatch_custom_css')); ?> "><?php _e('Custom CSS:', 'hatch'); ?> </label> </th> <td> <textarea id="<?php echo esc_attr(hybrid_settings_field_id('hatch_custom_css')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('hatch_custom_css')); ?> " cols="60" rows="8"><?php echo wp_htmledit_pre(stripslashes(hybrid_get_setting('hatch_custom_css'))); ?> </textarea> <span class="description"><?php _e('Add your custom CSS here. It would overwrite any default or custom theme settings.', 'hatch'); ?> </span> </td> </tr> <!-- End custom form elements. --> </table><!-- .form-table --><?php }
function oxygen_theme_meta_box() { ?> <table class="form-table"> <!-- Favicon upload --> <tr class="favicon_url"> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_favicon_url'); ?> "><?php _e('Favicon:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('oxygen_favicon_url'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_favicon_url'); ?> " value="<?php echo esc_attr(hybrid_get_setting('oxygen_favicon_url')); ?> " /> <input id="oxygen_favicon_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload favicon image (recommended max size: 32x32).', hybrid_get_parent_textdomain()); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('oxygen_favicon_url')) { ?> <p><img src="<?php echo hybrid_get_setting('oxygen_favicon_url'); ?> " alt=""/></p> <?php } ?> </td> </tr> <!-- Logo upload --> <tr class="logo_url"> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_logo_url'); ?> "><?php _e('Logo:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('oxygen_logo_url'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_logo_url'); ?> " value="<?php echo esc_attr(hybrid_get_setting('oxygen_logo_url')); ?> " /> <input id="oxygen_logo_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload logo image.', hybrid_get_parent_textdomain()); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('oxygen_logo_url')) { ?> <p><img src="<?php echo hybrid_get_setting('oxygen_logo_url'); ?> " alt=""/></p> <?php } ?> </td> </tr> <!-- Title font family --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_font_family'); ?> "><?php _e('Title font family:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <select id="<?php echo hybrid_settings_field_id('oxygen_font_family'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_font_family'); ?> "> <option value="Abel" <?php echo hybrid_get_setting('oxygen_font_family') == 'Abel' ? 'selected="selected"' : ''; ?> > <?php echo __('Abel', hybrid_get_parent_textdomain()); ?> </option> <option value="Oswald" <?php echo hybrid_get_setting('oxygen_font_family') == 'Oswald' ? 'selected="selected"' : ''; ?> > <?php echo __('Oswald', hybrid_get_parent_textdomain()); ?> </option> <option value="Terminal Dosis" <?php echo hybrid_get_setting('oxygen_font_family') == 'Terminal Dosis' ? 'selected="selected"' : ''; ?> > <?php echo __('Terminal Dosis', hybrid_get_parent_textdomain()); ?> </option> <option value="Bitter" <?php echo hybrid_get_setting('oxygen_font_family', 'Bitter') == 'Bitter' ? 'selected="selected"' : ''; ?> > <?php echo __('Bitter', hybrid_get_parent_textdomain()); ?> </option> <option value="Georgia" <?php echo hybrid_get_setting('oxygen_font_family') == 'Georgia' ? 'selected="selected"' : ''; ?> > <?php echo __('Georgia', hybrid_get_parent_textdomain()); ?> </option> <option value="Droid Serif" <?php echo hybrid_get_setting('oxygen_font_family') == 'Droid Serif' ? 'selected="selected"' : ''; ?> > <?php echo __('Droid Serif', hybrid_get_parent_textdomain()); ?> </option> <option value="Helvetica" <?php echo hybrid_get_setting('oxygen_font_family') == 'Helvetica' ? 'selected="selected"' : ''; ?> > <?php echo __('Helvetica', hybrid_get_parent_textdomain()); ?> </option> <option value="Arial" <?php echo hybrid_get_setting('oxygen_font_family') == 'Arial' ? 'selected="selected"' : ''; ?> > <?php echo __('Arial', hybrid_get_parent_textdomain()); ?> </option> <option value="Droid Sans" <?php echo hybrid_get_setting('oxygen_font_family') == 'Droid Sans' ? 'selected="selected"' : ''; ?> > <?php echo __('Droid Sans', hybrid_get_parent_textdomain()); ?> </option> </select> <span class="description"><?php _e('Choose a font for the titles.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- Font size --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_font_size'); ?> "><?php _e('Font size:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <select id="<?php echo hybrid_settings_field_id('oxygen_font_size'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_font_size'); ?> "> <option value="16" <?php echo hybrid_get_setting('oxygen_font_size', '16') == '16' ? 'selected="selected"' : ''; ?> > <?php echo __('default', hybrid_get_parent_textdomain()); ?> </option> <option value="17" <?php echo hybrid_get_setting('oxygen_font_size', '17') == '17' ? 'selected="selected"' : ''; ?> > <?php echo __('17', hybrid_get_parent_textdomain()); ?> </option> <option value="16" <?php echo hybrid_get_setting('oxygen_font_size', '16') == '16' ? 'selected="selected"' : ''; ?> > <?php echo __('16', hybrid_get_parent_textdomain()); ?> </option> <option value="15" <?php echo hybrid_get_setting('oxygen_font_size') == '15' ? 'selected="selected"' : ''; ?> > <?php echo __('15', hybrid_get_parent_textdomain()); ?> </option> <option value="14" <?php echo hybrid_get_setting('oxygen_font_size') == '14' ? 'selected="selected"' : ''; ?> > <?php echo __('14', hybrid_get_parent_textdomain()); ?> </option> <option value="13" <?php echo hybrid_get_setting('oxygen_font_size') == '13' ? 'selected="selected"' : ''; ?> > <?php echo __('13', hybrid_get_parent_textdomain()); ?> </option> <option value="12" <?php echo hybrid_get_setting('oxygen_font_size') == '12' ? 'selected="selected"' : ''; ?> > <?php echo __('12', hybrid_get_parent_textdomain()); ?> </option> </select> <span class="description"><?php _e('The base font size in pixels.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- Link color --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_link_color'); ?> "><?php _e('Link color:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('oxygen_link_color'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_link_color'); ?> " size="8" value="<?php echo hybrid_get_setting('oxygen_link_color') ? esc_attr(hybrid_get_setting('oxygen_link_color')) : '#0da4d3'; ?> " data-hex="true" /> <div id="colorpicker_link_color"></div> <span class="description"><?php _e('Set the theme link color.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- Slider Timeout --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_slider_timeout'); ?> "><?php _e('Slider Timeout:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('oxygen_slider_timeout'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_slider_timeout'); ?> " value="<?php echo hybrid_get_setting('oxygen_slider_timeout') ? esc_attr(hybrid_get_setting('oxygen_slider_timeout')) : '6000'; ?> " /> <span class="description"><?php _e('The time interval between slides in milliseconds.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- Custom CSS --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_custom_css'); ?> "><?php _e('Custom CSS:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <textarea id="<?php echo hybrid_settings_field_id('oxygen_custom_css'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_custom_css'); ?> " cols="60" rows="8"><?php echo wp_htmledit_pre(stripslashes(hybrid_get_setting('oxygen_custom_css'))); ?> </textarea> <span class="description"><?php _e('Add your custom CSS here. It would overwrite any default or custom theme settings.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- End custom form elements. --> </table><!-- .form-table --><?php }
/** * Display the home template meta box. * * @since 0.1.0 */ function news_home_template_theme_meta_box() { $prefix = hybrid_get_prefix(); /* Settings used. */ $category_highlight = hybrid_get_setting('home_template_categories'); /* Get categories. */ $categories = get_categories(); ?> <table class="form-table"> <tr> <th><?php _e('About:', 'news'); ?> </th> <td> <?php _e('Settings used on pages that use the "Home" page template. This template must be assigned to a page before its settings take effect.', 'news'); ?> </td> </tr> <tr> <th><label for="<?php echo hybrid_settings_field_id('home_template_categories'); ?> "><?php _e('Category Highlight:', 'news'); ?> </label></th> <td> <label for="<?php echo hybrid_settings_field_id('home_template_categories'); ?> "><?php _e('Categories to show blog posts from in the category highlight section. Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting.', 'news'); ?> </label> <br /> <select id="<?php echo hybrid_settings_field_id('home_template_categories'); ?> " name="<?php echo hybrid_settings_field_name('home_template_categories'); ?> []" multiple="multiple" style="height:150px;"> <?php foreach ($categories as $cat) { ?> <option value="<?php echo $cat->term_id; ?> " <?php if (is_array($category_highlight) && in_array($cat->term_id, $category_highlight)) { echo ' selected="selected"'; } ?> ><?php echo esc_html($cat->name); ?> </option> <?php } ?> </select> </td> </tr> </table><?php }
function dschool_banner_settings_meta_box() { foreach (array('top' => 'Top', 'bottom' => 'Bottom') as $position => $description) { ?> <h4><?php printf(__('%s Side Banner', hybrid_get_textdomain()), $description); ?> </h4> <table class="form-table"> <tr> <th> <label for="<?php echo hybrid_settings_field_id('banner_side_' . $position . '_title'); ?> "><?php _e('Title:', hybrid_get_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('banner_side_' . $position . '_title'); ?> " name="<?php echo hybrid_settings_field_name('banner_side_' . $position . '_title'); ?> " value="<?php echo esc_attr(hybrid_get_setting('banner_side_' . $position . '_title')); ?> " /> </td> </tr> <tr> <th> <label for="<?php echo hybrid_settings_field_id('banner_side_' . $position . '_copy'); ?> "><?php _e('Copy:', hybrid_get_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('banner_side_' . $position . '_copy'); ?> " name="<?php echo hybrid_settings_field_name('banner_side_' . $position . '_copy'); ?> " value="<?php echo esc_attr(hybrid_get_setting('banner_side_' . $position . '_copy')); ?> " /> </td> </tr> <tr> <th> <label for="<?php echo hybrid_settings_field_id('banner_side_' . $position . '_link'); ?> "><?php _e('Media Link:', hybrid_get_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('banner_side_' . $position . '_link'); ?> " name="<?php echo hybrid_settings_field_name('banner_side_' . $position . '_link'); ?> " value="<?php echo esc_attr(hybrid_get_setting('banner_side_' . $position . '_link')); ?> " /> <input type="checkbox" id="<?php echo hybrid_settings_field_id('banner_side_' . $position . '_link_is_video'); ?> " name="<?php echo hybrid_settings_field_name('banner_side_' . $position . '_link_is_video'); ?> " <?php checked(hybrid_get_setting('banner_side_' . $position . '_link_is_video'), 'on'); ?> /> Links to a video </td> </tr> </table><?php } }
/** * Creates a settings box that allows users to customize their footer. A basic textarea is given that * allows HTML and shortcodes to be input. * * @since 0.7.0 */ function hybrid_footer_settings_meta_box() { $domain = hybrid_get_textdomain(); ?> <table class="form-table"> <tr> <th><label for="<?php echo hybrid_settings_field_id( 'footer_insert' ); ?>"><?php _e( 'Footer Insert:', $domain ); ?></label></th> <td> <p><span class="description"><?php _e( 'You can add custom <acronym title="Hypertext Markup Language">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme.', $domain ); ?></span></p> <p><textarea id="<?php echo hybrid_settings_field_id( 'footer_insert' ); ?>" name="<?php echo hybrid_settings_field_name( 'footer_insert' ); ?>" cols="60" rows="5" style="width: 98%;"><?php echo wp_htmledit_pre( stripslashes( hybrid_get_setting( 'footer_insert' ) ) ); ?></textarea></p> <?php if ( current_theme_supports( 'hybrid-core-shortcodes' ) ) { ?> <p><?php printf( __( 'Shortcodes: %s', $domain ), '<code>[the-year]</code>, <code>[site-link]</code>, <code>[wp-link]</code>, <code>[theme-link]</code>, <code>[child-link]</code>, <code>[loginout-link]</code>, <code>[query-counter]</code>' ); ?></p> <?php } ?> </td> </tr> </table><!-- .form-table --><?php }
function origin_theme_meta_box() { ?> <table class="form-table"> <!-- Favicon upload --> <tr class="favicon_url"> <th> <label for="<?php echo hybrid_settings_field_id('origin_favicon_url'); ?> "><?php _e('Favicon:', 'origin'); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('origin_favicon_url'); ?> " name="<?php echo hybrid_settings_field_name('origin_favicon_url'); ?> " value="<?php echo esc_attr(hybrid_get_setting('origin_favicon_url')); ?> " /> <input id="origin_favicon_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload favicon image (recommended max size: 32x32).', 'origin'); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('origin_favicon_url')) { ?> <p><img src="<?php echo hybrid_get_setting('origin_favicon_url'); ?> " alt=""/></p> <?php } ?> </td> </tr> <!-- Logo upload --> <tr class="logo_url"> <th> <label for="<?php echo hybrid_settings_field_id('origin_logo_url'); ?> "><?php _e('Logo:', 'origin'); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('origin_logo_url'); ?> " name="<?php echo hybrid_settings_field_name('origin_logo_url'); ?> " value="<?php echo esc_attr(hybrid_get_setting('origin_logo_url')); ?> " /> <input id="origin_logo_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload logo image (recommended max width: 200px).', 'origin'); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('origin_logo_url')) { ?> <p><img src="<?php echo hybrid_get_setting('origin_logo_url'); ?> " alt=""/></p> <?php } ?> </td> </tr> <!-- Font family --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('origin_font_family'); ?> "><?php _e('Font family:', 'origin'); ?> </label> </th> <td> <select id="<?php echo hybrid_settings_field_id('origin_font_family'); ?> " name="<?php echo hybrid_settings_field_name('origin_font_family'); ?> "> <option value="Bitter" <?php echo hybrid_get_setting('origin_font_family', 'Bitter') == 'Bitter' ? 'selected="selected"' : ''; ?> > <?php echo __('Bitter', 'origin'); ?> </option> <option value="Georgia" <?php echo hybrid_get_setting('origin_font_family') == 'Georgia' ? 'selected="selected"' : ''; ?> > <?php echo __('Georgia', 'origin'); ?> </option> <option value="Droid Serif" <?php echo hybrid_get_setting('origin_font_family') == 'Droid Serif' ? 'selected="selected"' : ''; ?> > <?php echo __('Droid Serif', 'origin'); ?> </option> <option value="Helvetica" <?php echo hybrid_get_setting('origin_font_family') == 'Helvetica' ? 'selected="selected"' : ''; ?> > <?php echo __('Helvetica', 'origin'); ?> </option> <option value="Istok Web" <?php echo hybrid_get_setting('origin_font_family') == 'Istok Web' ? 'selected="selected"' : ''; ?> > <?php echo __('Istok Web', 'origin'); ?> </option> <option value="Arial" <?php echo hybrid_get_setting('origin_font_family') == 'Arial' ? 'selected="selected"' : ''; ?> > <?php echo __('Arial', 'origin'); ?> </option> <option value="Verdana" <?php echo hybrid_get_setting('origin_font_family') == 'Verdana' ? 'selected="selected"' : ''; ?> > <?php echo __('Verdana', 'origin'); ?> </option> <option value="Lucida Sans Unicode" <?php echo hybrid_get_setting('origin_font_family') == 'Lucida Sans Unicode' ? 'selected="selected"' : ''; ?> > <?php echo __('Lucida Sans Unicode', 'origin'); ?> </option> <option value="Droid Sans" <?php echo hybrid_get_setting('origin_font_family') == 'Droid Sans' ? 'selected="selected"' : ''; ?> > <?php echo __('Droid Sans', 'origin'); ?> </option> </select> </td> </tr> <!-- Font size --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('origin_font_size'); ?> "><?php _e('Font size:', 'origin'); ?> </label> </th> <td> <select id="<?php echo hybrid_settings_field_id('origin_font_size'); ?> " name="<?php echo hybrid_settings_field_name('origin_font_size'); ?> "> <option value="16" <?php echo hybrid_get_setting('origin_font_size', '16') == '16' ? 'selected="selected"' : ''; ?> > <?php echo __('default', 'origin'); ?> </option> <option value="17" <?php echo hybrid_get_setting('origin_font_size', '17') == '17' ? 'selected="selected"' : ''; ?> > <?php echo __('17', 'origin'); ?> </option> <option value="16" <?php echo hybrid_get_setting('origin_font_size', '16') == '16' ? 'selected="selected"' : ''; ?> > <?php echo __('16', 'origin'); ?> </option> <option value="15" <?php echo hybrid_get_setting('origin_font_size') == '15' ? 'selected="selected"' : ''; ?> > <?php echo __('15', 'origin'); ?> </option> <option value="14" <?php echo hybrid_get_setting('origin_font_size') == '14' ? 'selected="selected"' : ''; ?> > <?php echo __('14', 'origin'); ?> </option> <option value="13" <?php echo hybrid_get_setting('origin_font_size') == '13' ? 'selected="selected"' : ''; ?> > <?php echo __('13', 'origin'); ?> </option> <option value="12" <?php echo hybrid_get_setting('origin_font_size') == '12' ? 'selected="selected"' : ''; ?> > <?php echo __('12', 'origin'); ?> </option> </select> <span class="description"><?php _e('The base font size in pixels.', 'origin'); ?> </span> </td> </tr> <!-- Link color --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('origin_link_color'); ?> "><?php _e('Link color:', 'origin'); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('origin_link_color'); ?> " name="<?php echo hybrid_settings_field_name('origin_link_color'); ?> " size="8" value="<?php echo hybrid_get_setting('origin_link_color') ? esc_attr(hybrid_get_setting('origin_link_color')) : '#dd5424'; ?> " data-hex="true" /> <div id="colorpicker_link_color"></div> <span class="description"><?php _e('Set the theme link color.', 'origin'); ?> </span> </td> </tr> <!-- Custom CSS --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('origin_custom_css'); ?> "><?php _e('Custom CSS:', 'origin'); ?> </label> </th> <td> <textarea id="<?php echo hybrid_settings_field_id('origin_custom_css'); ?> " name="<?php echo hybrid_settings_field_name('origin_custom_css'); ?> " cols="60" rows="8"><?php echo wp_htmledit_pre(stripslashes(hybrid_get_setting('origin_custom_css'))); ?> </textarea> <span class="description"><?php _e('Add your custom CSS here. It would overwrite any default or custom theme settings.', 'origin'); ?> </span> </td> </tr> <!-- End custom form elements. --> </table><!-- .form-table --><?php }
function ascetica_theme_meta_box() { ?> <table class="form-table"> <!-- Favicon upload --> <tr class="favicon_url"> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('ascetica_favicon_url')); ?> "><?php _e('Favicon:', 'ascetica'); ?> </label> </th> <td> <input type="text" id="<?php echo esc_attr(hybrid_settings_field_id('ascetica_favicon_url')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('ascetica_favicon_url')); ?> " value="<?php echo esc_url(hybrid_get_setting('ascetica_favicon_url')); ?> " /> <input id="ascetica_favicon_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload favicon image (recommended max size: 32x32).', 'ascetica'); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('ascetica_favicon_url')) { ?> <p><img src="<?php echo esc_url(hybrid_get_setting('ascetica_favicon_url')); ?> " alt=""/></p> <?php } ?> </td> </tr> <!-- Logo upload --> <tr class="logo_url"> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('ascetica_logo_url')); ?> "><?php _e('Logo:', 'ascetica'); ?> </label> </th> <td> <input type="text" id="<?php echo esc_attr(hybrid_settings_field_id('ascetica_logo_url')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('ascetica_logo_url')); ?> " value="<?php echo esc_url(hybrid_get_setting('ascetica_logo_url')); ?> " /> <input id="ascetica_logo_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload logo image.', 'ascetica'); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('ascetica_logo_url')) { ?> <p><img src="<?php echo esc_url(hybrid_get_setting('ascetica_logo_url')); ?> " alt=""/></p> <?php } ?> </td> </tr> <!-- Font family --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('ascetica_font_family')); ?> "><?php _e('Font family:', 'ascetica'); ?> </label> </th> <td> <select id="<?php echo hybrid_settings_field_id('ascetica_font_family'); ?> " name="<?php echo hybrid_settings_field_name('ascetica_font_family'); ?> "> <option value="Georgia" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Georgia'); ?> > <?php echo __('Georgia', 'ascetica'); ?> </option> <option value="PT Serif" <?php selected(hybrid_get_setting('ascetica_font_family'), 'PT Serif'); ?> > <?php echo __('PT Serif', 'ascetica'); ?> </option> <option value="Bitter" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Bitter'); ?> > <?php echo __('Bitter', 'ascetica'); ?> </option> <option value="Droid Serif" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Droid Serif'); ?> > <?php echo __('Droid Serif', 'ascetica'); ?> </option> <option value="Helvetica" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Helvetica'); ?> > <?php echo __('Helvetica', 'ascetica'); ?> </option> <option value="Istok Web" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Istok Web'); ?> > <?php echo __('Istok Web', 'ascetica'); ?> </option> <option value="Arial" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Arial'); ?> > <?php echo __('Arial', 'ascetica'); ?> </option> <option value="Verdana" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Verdana'); ?> > <?php echo __('Verdana', 'ascetica'); ?> </option> <option value="Lucida Sans Unicode" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Lucida Sans Unicode'); ?> > <?php echo __('Lucida Sans Unicode', 'ascetica'); ?> </option> <option value="Droid Sans" <?php selected(hybrid_get_setting('ascetica_font_family'), 'Droid Sans'); ?> > <?php echo __('Droid Sans', 'ascetica'); ?> </option> </select> </td> </tr> <!-- Font size --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('ascetica_font_size')); ?> "><?php _e('Font size:', 'ascetica'); ?> </label> </th> <td> <select id="<?php echo hybrid_settings_field_id('ascetica_font_size'); ?> " name="<?php echo hybrid_settings_field_name('ascetica_font_size'); ?> "> <option value="16" <?php selected(hybrid_get_setting('ascetica_font_size'), '16'); ?> > <?php echo __('default', 'ascetica'); ?> </option> <option value="18" <?php selected(hybrid_get_setting('ascetica_font_size'), '18'); ?> > <?php echo __('18', 'ascetica'); ?> </option> <option value="17" <?php selected(hybrid_get_setting('ascetica_font_size'), '17'); ?> > <?php echo __('17', 'ascetica'); ?> </option> <option value="16" <?php selected(hybrid_get_setting('ascetica_font_size'), '16'); ?> > <?php echo __('16', 'ascetica'); ?> </option> <option value="15" <?php selected(hybrid_get_setting('ascetica_font_size'), '15'); ?> > <?php echo __('15', 'ascetica'); ?> </option> <option value="14" <?php selected(hybrid_get_setting('ascetica_font_size'), '14'); ?> > <?php echo __('14', 'ascetica'); ?> </option> <option value="13" <?php selected(hybrid_get_setting('ascetica_font_size'), '13'); ?> > <?php echo __('13', 'ascetica'); ?> </option> <option value="12" <?php selected(hybrid_get_setting('ascetica_font_size'), '12'); ?> > <?php echo __('12', 'ascetica'); ?> </option> </select> <span class="description"><?php _e('The base font size in pixels.', 'ascetica'); ?> </span> </td> </tr> <!-- Link color --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('ascetica_link_color')); ?> "><?php _e('Link color:', 'ascetica'); ?> </label> </th> <td> <input type="text" id="<?php echo esc_attr(hybrid_settings_field_id('ascetica_link_color')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('ascetica_link_color')); ?> " size="8" value="<?php echo hybrid_get_setting('ascetica_link_color') ? esc_attr(hybrid_get_setting('ascetica_link_color')) : '#bb2530'; ?> " data-hex="true" /> <div id="colorpicker_link_color"></div> <span class="description"><?php _e('Set the theme link color.', 'ascetica'); ?> </span> </td> </tr> <!-- Custom CSS --> <tr> <th> <label for="<?php echo esc_attr(hybrid_settings_field_id('ascetica_custom_css')); ?> "><?php _e('Custom CSS:', 'ascetica'); ?> </label> </th> <td> <textarea id="<?php echo esc_attr(hybrid_settings_field_id('ascetica_custom_css')); ?> " name="<?php echo esc_attr(hybrid_settings_field_name('ascetica_custom_css')); ?> " cols="60" rows="8"><?php echo wp_htmledit_pre(esc_html(hybrid_get_setting('ascetica_custom_css'))); ?> </textarea> <span class="description"><?php _e('Add your custom CSS here. If it\'s more than a few lines, it\'s recommended to separate your modifications in a child theme.', 'ascetica'); ?> </span> </td> </tr> <!-- End custom form elements. --> </table><!-- .form-table --><?php }