function weaverx_mainopts_widgets() { $opts = array(array('type' => 'submit'), array('name' => __('Sidebar Options', 'weaver-xtreme'), 'id' => '-screenoptions', 'type' => 'header', 'info' => __('Settings affecting main Sidebars and individual widgets', 'weaver-xtreme'), 'help' => 'help.html#WidgetAreas'), array('name' => __('Individual Widgets', 'weaver-xtreme'), 'id' => 'widget', 'type' => 'widget_area', 'info' => __('Properties for individual widgets (e.g., Text, Recent Posts, etc.)', 'weaver-xtreme')), array('name' => __('Widget Title', 'weaver-xtreme'), 'id' => 'widget_title', 'type' => 'titles', 'info' => __('Color for Widget Titles.', 'weaver-xtreme')), array('name' => __('Bar under Widget Titles', 'weaver-xtreme'), 'id' => 'widget_title_underline_int', 'type' => 'val_px', 'info' => __('Enter size in px if you want a bar under Widget Titles. Leave blank or 0 for no bar.', 'weaver-xtreme')), array('name' => __('Widget List Bullet', 'weaver-xtreme'), 'id' => 'widgetlist_bullet', 'type' => 'select_id', 'info' => __('Bullet used for Unordered Lists in Widget areas.', 'weaver-xtreme'), 'value' => array(array('val' => 'disc', 'desc' => __('Filled Disc (default)', 'weaver-xtreme')), array('val' => 'circle', 'desc' => __('Circle', 'weaver-xtreme')), array('val' => 'square', 'desc' => __('Square', 'weaver-xtreme')), array('val' => 'none', 'desc' => __('None', 'weaver-xtreme')))), array('name' => __('Widget Links', 'weaver-xtreme'), 'id' => 'wlink', 'type' => 'link', 'info' => __('Color for links in widgets (uses Standard Link colors if left blank).', 'weaver-xtreme')), array('type' => 'submit'), array('name' => __('Primary Widget Area', 'weaver-xtreme'), 'id' => 'primary', 'type' => 'widget_area_submit', 'info' => __('Properties for the Primary (Upper/Left) Sidebar Widget Area.', 'weaver-xtreme')), array('name' => __('Secondary Widget Area', 'weaver-xtreme'), 'id' => 'secondary', 'type' => 'widget_area_submit', 'info' => __('Properties for the Secondary (Lower/Right) Sidebar Widget Area.', 'weaver-xtreme')), array('name' => __('Top Widget Areas', 'weaver-xtreme'), 'id' => 'top', 'type' => 'widget_area_submit', 'info' => __('Properties for all Top Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme')), array('name' => __('Bottom Widget Areas', 'weaver-xtreme'), 'id' => 'bottom', 'type' => 'widget_area', 'info' => __('Properties for all Bottom Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme'))); weaverx_form_show_options($opts); ?> <hr /> <span style="color:blue;"><b>Define Per Page Extra Widget Areas</b></span> <?php weaverx_help_link('help.html#PPWidgets', 'Help for Per Page Widget Areas'); ?> <br/> <small> <?php _e('You may define extra widget areas that can then be used in the <em>Per Page</em> settings, or in the <em>Weaver Xtreme Plus</em> [widget_area] shortcode. Enter a list of one or more widget area names separated by commas. Your names should include only letters, numbers, or underscores - no spaces or other special characters. The widgets areas will then appear on the Appearance->Widgets menus. They can be included on individual pages by adding the name you define here to the "Weaver Xtreme Options For This Page" box on the Edit Page screen. (♦)', 'weaver-xtreme'); ?> </small> <br /> <?php weaverx_textarea(weaverx_getopt('_perpagewidgets'), '_perpagewidgets', 1, ' ', $style = 'width:60%;', $class = 'wvrx-edit'); do_action('weaverxplus_admin', 'widget_areas'); }
function weaverx_custom_css($value = '') { $css = weaverx_getopt('add_css'); if (isset($value['id'])) { $icon = $value['id']; } if (!isset($icon) || !$icon) { $icon = ' '; } $dash = ''; if ($icon[0] == '-') { // add a leading icon $dash = '<span style="padding:.2em;" class="dashicons dashicons-' . substr($icon, 1) . '"></span>'; } ?> <tr class="atw-row-header"><td colspan="3"> <a id="custom-css-rules"></a> <span style="color:black;padding:.2em;" class="dashicons dashicons-screenoptions"></span> <span style="font-weight:bold; font-size: larger;"><em> <?php _e('Custom CSS Rules', 'weaver-xtreme'); ?> <?php weaverx_help_link('help.html#CustomCSS', __('Custom CSS Rules', 'weaver-xtreme')); ?> </em></span> </td></tr> <tr><td colspan="3"> <!-- ======== --> <p> <?php _e('Rules you add here will be the <em>last</em> CSS Rules included by Weaver Xtreme, and thus override all other Weaver Xtreme generated CSS rules. Specify complete CSS rules, but don\'t add the <style> HTML element. You can prefix your selectors with <code>.is-desktop, .is-mobile, .is-smalltablet, or .is-phone</code> to create rules for specific devices. <strong>NOTE:</strong> Because Weaver Xtreme uses classes on many of its elements, you may to need to use <em>!important</em> with your rules to force the style override. It is possible that other plugins might generate CSS that comes after these rules.', 'weaver-xtreme'); ?> </p> <?php weaverx_textarea(weaverx_getopt('add_css'), 'add_css', 12, '', 'width:95%;', 'wvrx-edit wvrx-edit-dir'); ?> </td></tr> <?php }
function weaverx_form_ctext($value, $val_only = false) { $pclass = 'color {hash:true, adjust:false}'; // starting with V 1.3, allow text in color pickers $img_css = '<img src="' . esc_url(get_template_directory_uri() . '/assets/images/theme/css.png') . '" alt="css" />'; $img_hide = esc_url(get_template_directory_uri() . '/assets/images/theme/hide.png'); $img_show = esc_url(get_template_directory_uri() . '/assets/images/theme/show.png'); $help_file = esc_url(get_template_directory_uri() . '/help/css-help.html'); $css_id = $value['id'] . '_css'; $css_id_text = weaverx_getopt($css_id); if ($css_id_text && !weaverx_getopt('_hide_auto_css_rules')) { $img_toggle = $img_hide; } else { $img_toggle = $img_show; } $add_icon = '<span class="i-left-bg dashicons dashicons-admin-appearance"></span>'; if (strpos($value['name'], ' BG') === false) { $add_icon = '<span class="i-left-fg dashicons dashicons-admin-appearance"></span>'; } if (!$val_only) { ?> <tr> <th scope="row" align="right"><?php weaverx_echo_name($value, $add_icon); ?> : </th> <td> <?php } else { echo ' <small>' . $value['info'] . '</small> '; } ?> <input class="<?php echo $pclass; ?> " name="<?php weaverx_sapi_main_name($value['id']); ?> " id="<?php echo $value['id']; ?> " type="text" style="width:90px" value="<?php if (weaverx_getopt($value['id']) != "") { weaverx_esc_textarea(weaverx_getopt($value['id'])); } else { echo ''; } ?> " /> <?php echo $img_css; ?> <a href="javascript:void(null);" onclick="weaverx_ToggleRowCSS(document.getElementById('<?php echo $css_id . '_js'; ?> '), this, '<?php echo $img_show; ?> ', '<?php echo $img_hide; ?> ')"><?php echo '<img src="' . esc_url($img_toggle) . '" alt="toggle css" />'; ?> </a> <?php if (!$val_only) { ?> </td> <?php weaverx_form_info($value); ?> </tr> <?php } $css_rows = weaverx_getopt('_css_rows'); if ($css_rows < 1 || $css_rows > 25) { $css_rows = 1; } if ($css_id_text && !weaverx_getopt('_hide_auto_css_rules')) { ?> <tr id="<?php echo $css_id . '_js'; ?> "> <th scope="row" align="right"><span style="color:#22a;"><small><?php _e('Custom CSS styling:', 'weaver-xtreme'); ?> </small></span></th> <td align="right"><small> </small></td> <td> <small> <?php _e('You can enter CSS rules, enclosed in {}\'s, and separated by <strong>;</strong>. See ', 'weaver-xtreme'); ?> <a href="<?php echo $help_file; ?> " target="_blank"><?php _e('CSS Help', 'weaver-xtreme'); ?> </a> <?php _e('for more details.', 'weaver-xtreme'); ?> </small><br /> <?php weaverx_textarea($css_id_text, $css_id, $css_rows, '{ font-size:150%; font-weight:bold; } /* for example */'); ?> </td> </tr> <?php } else { ?> <tr id="<?php echo $css_id . '_js'; ?> " style="display:none;"> <th scope="row" align="right"><span style="color:green;"><small><?php _e('Custom CSS styling:', 'weaver-xtreme'); ?> </small></span></th> <td align="right"><small> </small></td> <td> <small> <?php _e('You can enter CSS rules, enclosed in {}\'s, and separated by <strong>;</strong>. See', 'weaver-xtreme'); ?> <a href="<?php echo $help_file; ?> " target="_blank"><?php _e('CSS Help', 'weaver-xtreme'); ?> </a> for more details.</small><br /> <?php weaverx_textarea($css_id_text, $css_id, $css_rows, '{ font-size:150%; font-weight:bold; } /* for example */'); ?> </td> </tr> <?php } }
function weaverx_admin_admin() { ?> <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span> <?php _e('Basic Administrative Options', 'weaver-xtreme'); weaverx_help_link('help.html#AdminOptions', 'Help for Admin Options'); ?> </div> <p> <?php _e('These options control some administrative options and appearance features.', 'weaver-xtreme'); ?> </p> <br /> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_disable_customizer'); ?> " id="disable_customizer" <?php checked(weaverx_getopt_checked('_disable_customizer')); ?> /> <?php _e('<strong>Disable Weaver Xtreme Customizer Interface</strong> - If you have a slow host or slow computer, checking this option will disable loading the Weaver Xtreme Customizer interface. ♦', 'weaver-xtreme'); ?> </label><br /><br /> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_donate'); ?> " id="hide_donate" <?php checked(weaverx_getopt_checked('_hide_donate')); ?> /> <?php _e('I\'ve Donated - <small>Thank you for donating to the Weaver Xtreme theme. This will hide the Donate button. Purchasing Weaver Xtreme Plus also hides the Donate button.</small> ♦', 'weaver-xtreme'); ?> </label><br /><br /> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_editor_style'); ?> " id="_hide_editor_style" <?php checked(weaverx_getopt_checked('_hide_editor_style')); ?> /> <?php _e('Disable Page/Post Editor Styling - <small>Checking this box will disable the Weaver Xtreme subtheme based styling in the Page/Post editor. If you have a theme using transparent backgrounds, this option will likely improve the Post/Page editor visibility. ♦</small>', 'weaver-xtreme'); ?> </label><br /> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_auto_css_rules'); ?> " id="hide_auto_css_rules" <?php checked(weaverx_getopt_checked('_hide_auto_css_rules')); ?> /> <?php _e('Don\'t auto-display CSS rules - <small>Checking this box will disable the auto-display of Main Option elements that have CSS settings.</small> ♦', 'weaver-xtreme'); ?> </label><br /> <input name="<?php weaverx_sapi_main_name('_css_rows'); ?> " id="css_rows" type="text" style="width:30px;height:20px;" class="regular-text" value="<?php weaverx_esc_textarea(weaverx_getopt('_css_rows')); ?> " /> <?php _e('lines - Set CSS+ text box height - <small>You can increase the default height of the CSS+ input area (1 to 25 lines).</small> ♦', 'weaver-xtreme'); ?> <br /> <br /> <h3 class="atw-option-subheader"><?php _e('Per Page and Per Post Option Panels by Roles<', 'weaver-xtreme'); ?> /h3> <p> <?php _e('Single site Administrator and Multi-Site Super Administrator will always have the Per Page and Per Post options panel displayed. You may selectively disable these options for other User Roles using the check boxes below.', 'weaver-xtreme'); ?> </p> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_mu_admin_per'); ?> " id="_hide_mu_admin_per" <?php checked(weaverx_getopt_checked('_hide_mu_admin_per')); ?> /> <?php _e('Hide Per Page/Post Options for MultiSite Admins', 'weaver-xtreme'); ?> </label> ♦<br /> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_editor_per'); ?> " id="_hide_editor_per" <?php checked(weaverx_getopt_checked('_hide_editor_per')); ?> /> <?php _e('Hide Per Page/Post Options for Editors', 'weaver-xtreme'); ?> </label> ♦<br /> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_hide_author_per'); ?> " id="_hide_author_per" <?php checked(weaverx_getopt_checked('_hide_author_per')); ?> /> <?php _e('Hide Per Page/Post Options for Authors and Contributors', 'weaver-xtreme'); ?> </label> ♦<br /> <br /> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_show_per_post_all'); ?> " id="_hide_author_per" <?php checked(weaverx_getopt_checked('_show_per_post_all')); ?> /> <?php _e('Show Per Post Options for Custom Post Types ♦ - <small>Shows the Per Post options box on "Custom Post Type Editor" admin pages', 'weaver-xtreme'); ?> </small> </label> <br /> <br /><br /> <div class="atw-option-subheader"><?php _e('Theme Name and Description', 'weaver-xtreme'); ?> </div> <p> <?php _e('You can change the name and description of your current settings if you would like to create a new theme theme file for sharing with others, or for you own identification.', 'weaver-xtreme'); ?> </p> <?php _e('Theme Name:', 'weaver-xtreme'); ?> <input name="<?php weaverx_sapi_main_name('themename'); ?> " id="themename" value="<?php echo weaverx_getopt('themename'); ?> " /> <br /> <?php _e('Description:', 'weaver-xtreme'); ?> <?php weaverx_textarea(weaverx_getopt('theme_description'), 'theme_description', 2, __('Describe the theme', 'weaver-xtreme'), 'width:65%;'); ?> <br /> <br /> <h3 class="atw-option-subheader"><?php _e('Subtheme Notes', 'weaver-xtreme'); ?> </h3> <p> <?php _e('This box may be used to keep notes and instructions about settings made for a custom subtheme. It will be saved in the both \'.wxt\' and \'.wxb\' settings files.', 'weaver-xtreme'); ?> </p> <?php weaverx_textarea(weaverx_getopt('subtheme_notes'), 'subtheme_notes', 2, __('Notes about theme', 'weaver-xtreme'), 'width:75%;'); do_action('weaverxplus_admin', 'admin_options'); }
function weaverx_adv_site_opts() { ?> <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span> <?php _e('Site Options', 'weaver-xtreme'); ?> <?php weaverx_help_link('help.html#AdvSiteOptions', __('Help on Advanced Site Options', 'weaver-xtreme')); ?> </div><br /> <?php _e('These options are available to fine tune various aspects of your site. Technically, these features are not part of the theme styling, but cover other aspects of site functionality.', 'weaver-xtreme'); ?> <br /> <hr /> <!-- ======== --> <?php if (weaverx_f_file_access_available()) { ?> <h3><?php _e('Inline CSS - (Xtreme-Plus Option)', 'weaver-xtreme'); ?> </h3> <label><input type="checkbox" name="<?php weaverx_sapi_main_name('_inline_style'); ?> " id="_inline_style" <?php checked(weaverx_getopt_checked('_inline_style')); ?> /> <?php _e('Generate inline CSS code rather than using style-weaverxt.css file. By default, Weaverx Xtreme Plus will use the style-weaverxt.css file. ♦', 'weaver-xtreme'); ?> </label><br /><br /> <?php } ?> <br /> <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-format-image"></span><span style="color:blue;font-size:larger;"> <b><?php _e('FavIcon', 'weaver-xtreme'); ?> </b></span></div></br /> <p> <?php _e('You can add a FavIcon to your site with this option. The preferred FavIcon is in the <code>.ico</code> format which has the most universal browser compatibility. However, <code>.png, .gif, and .jpg</code> will work for most modern browsers. The standard sizes are 16x16, 32x32, or 48x48 px. You can alternatively load a <code>favicon.ico</code> file to the root directory of your site. ♦', 'weaver-xtreme'); ?> </p> <p> <?php $icon = weaverx_getopt('_favicon_url'); if ($icon != '') { echo '<img src="' . esc_url($icon) . '" alt="favicon" /> '; } ?> <strong><?php _e('FavIcon URL:', 'weaver-xtreme'); ?> </strong> <?php weaverx_textarea(weaverx_getopt('_favicon_url'), '_favicon_url', 1, 'URL ', $style = 'width:350px;'); ?> <?php weaverx_media_lib_button('_favicon_url'); ?> <?php _e('Full path to FavIcon', 'weaver-xtreme'); ?> </p><br /> <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-page"></span><span style="color:blue;font-size:larger;"> <b><?php _e('Exclude Pages from SiteMap', 'weaver-xtreme'); ?> </b></span></div></br /> <p> <?php _e('You can specify a comma separated list of Page IDs to be excluded from the SiteMap Page list. To exclude pages from Search results, use a plugin such as "Search Exclude". You can hide different sections of the SiteMap by adding rules to the "Custom CSS Rules" box. To hide authors, for example, add the rule <code>#sitemap-authors{display:none;}</code>. The IDs for the SiteMap sections are: <code>#sitemap-pages, #sitemap-posts, #sitemap-categories, #sitemap-tags, #sitemap-authors</code>', 'weaver-xtreme'); ?> </p> <p> <?php $exclude = weaverx_getopt('_sitemap_exclude_pages'); ?> <strong><?php _e('Exclude Pages from SiteMap', 'weaver-xtreme'); ?> : </strong> <?php weaverx_textarea(weaverx_getopt('_sitemap_exclude_pages'), '_sitemap_exclude_pages', 1, '1,2,3', $style = 'width:350px;'); ?> </p><br /> <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-hammer"></span> <span style="color:blue;font-size:larger;"> <b><?php _e('SEO - Search Engine Optimization', 'weaver-xtreme'); ?> </b> </span></div><br /> <p> <?php _e('The Weaver Xtreme Theme has been designed to follow the latest SEO guidelines. Each non-home page will use the recommended "Page Title | Site Title" format, and the site is formatted using the appropriate HTML5 tags for optimal SEO performance. An SEO plugin may help you optimize your site for SEO, but is not required. See the <em>Help</em> tab for recommended SEO plugins.', 'weaver-xtreme'); ?> </p><br /> <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-home"></span> <span style="color:blue;font-size:larger;"> <b><?php _e('Home Page', 'weaver-xtreme'); ?> </b> </span></div> <p> <?php _e('WordPress allows you to specify what page is used for your home page - either the standard WordPress blog, or a static page (which can be a Weaver Xtreme "Page with Posts" page). Please see the Weaver Xtreme Help topic for a more complete explanation.', 'weaver-xtreme'); ?> </p> <p> <?php _e('You can set the front page on the Dashboard <em>Settings→Reading panel</em>:', 'weaver-xtreme'); ?> <a href="<?php echo esc_url(home_url('/') . 'wp-admin/options-reading.php'); ?> "> <strong><?php _e('Set Front Page Displays', 'weaver-xtreme'); ?> </strong></a></p><br /> <div class="atw-option-subheader"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-users"></span> <span style="color:blue;font-size:larger;"> <b><?php _e('Author Avatars', 'weaver-xtreme'); ?> </b> </span></div> <p> <?php _e('For the best look, your site should support Avatars - a small image associated with a contributors e-mail address. Gravatar.com is probably the most popular Avatar support, and is closely associated with WordPress. You should set up a Gravatar for the main authors of your blog. For contributors without any avatar, WordPress will automatically generate an avatar. See the <strong>Settings → Discussion</strong> admin page for avatar settings.', 'weaver-xtreme'); ?> </p> <hr /> <?php do_action('weaverxplus_admin', 'site_opts'); do_action('weaverx_child_siteoptions'); }