function weaverii_facebook_action()
{
    ?>
   <div class="wvr-option-subheader"><span style="color:blue;font-size:larger;"><b>Preferred Image for Facebook</b></span></div><br />
    <p>Facebook and other sites will display a possibly arbitrarily chosen thumbnail for your site when it is used in a
    link on those sites. If <em>you</em> specify an image to use here, then that image, plus other OpenGraph site information
    for Facebook, will be added to your site's &lt;head&gt; using the proper &lt;meta&gt; tags. We recommend you do this as
    it gives you control, and helps when someone links to your site on Facebook. (<em>Note: some SEO plugins will perform
    this same function, so you might want to leave this blank and use the SEO features instead.</em>) Facebook says:
    The image must be at least 50px by 50px, although a minimum 200px by 200px is preferred and 1500px by 1500px
    is recommended for the best possible user experience. The image can have a maximum aspect ratio of 3:1.
    (Note: image sizes must be no more than 5MB in size.) <small>After saving settings,
    enter this site's URL on <?php 
    weaverii_site('/tools/debug', 'http://developers.facebook.com');
    ?>
this page</a> to have Facebook update the information it saves for your site.</small> &diams;</p>
    <p>

<?php 
    $imgsrc = weaverii_getopt('_wii_imgsrc_url');
    if ($imgsrc != '') {
        echo '<img src="' . $imgsrc . '" height="40px" alt="imgsrc" />&nbsp;';
    }
    ?>
<strong>Image URL: </strong>
    <textarea name="<?php 
    weaverii_sapi_main_name('_wii_imgsrc_url');
    ?>
" id="_wii_imgsrc_url" rows=1 style="width: 350px"><?php 
    echo esc_textarea(weaverii_getopt('_wii_imgsrc_url'));
    ?>
</textarea><?php 
    weaverii_media_lib_button('_wii_imgsrc_url');
    ?>
&nbsp;&nbsp;Full path to Site's preferred image
    </p><br />
<?php 
}
Example #2
0
function weaverii_form_row_select_id($value)
{
    ?>
	<tr>
		<th scope="row" align="right"><?php 
    weaverii_echo_name($value);
    ?>
:&nbsp;</th>
		<td>
		<select name="<?php 
    weaverii_sapi_main_name($value['id']);
    ?>
" id="<?php 
    echo $value['id'];
    ?>
">
<?php 
    foreach ($value['value'] as $option) {
        ?>
			<option value="<?php 
        echo $option['val'];
        ?>
" <?php 
        if (weaverii_getopt($value['id']) == $option['val']) {
            echo ' selected="selected"';
        }
        ?>
><?php 
        echo $option['desc'];
        ?>
</option>
<?php 
    }
    ?>
		</select>
		</td>
<?php 
    weaverii_form_row_info($value);
    ?>
		</tr>
<?php 
}
Example #3
0
function weaverii_mainopts_widgets()
{
    $opts = array(array('type' => 'submit'), array('name' => 'Widget Areas', 'id' => 'maintab5', 'type' => 'header', 'info' => 'Settings affecting widget areas', 'help' => 'help.html#WidgetAreas'), array('name' => 'Individual Widgets', 'id' => 'wii_widget_widget', 'type' => 'widget_area', 'info' => 'Properties for individual widgets (e.g., Text, Recent Posts, etc.)'), array('name' => 'Widget Padding', 'id' => 'wii_widget_widget_padding_int', 'type' => '=val_px', 'info' => 'Padding used around all sides of individual widgets. Not usually needed unless widgets have bg color.'), array('name' => 'Widget Title', 'id' => 'wii_widget_title_color', 'type' => 'ctext', 'info' => 'Color for Widget titles and labels.'), array('name' => 'Bar under Widget Titles', 'id' => 'wii_widget_header_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.'), array('name' => 'Widget Area Text', 'id' => 'wii_widget_color', 'type' => 'ctext', 'info' => 'Color for widget area content (text color).'), array('name' => '<small>Widget Area Font size</small>', 'id' => 'wii_widget_size_int', 'type' => 'val_percent', 'info' => 'Font size for widgets. (Default: 120%)'), array('name' => 'Widget List Bullet', 'id' => 'wii_widgetlist_bullet', 'type' => '=select_id', 'info' => 'Bullet used for Unorderd Lists in Widget areas', 'value' => array(array('val' => 'disc', 'desc' => 'Filled Disc (default)'), array('val' => 'circle', 'desc' => 'Circle'), array('val' => 'square', 'desc' => 'Square'), array('val' => 'none', 'desc' => 'None'), array('val' => 'custom', 'desc' => 'Custom bullet'))), array('name' => '<small>Custom Bullet URL</small>', 'id' => 'wii_widgetlist_bullet_custom_url', 'type' => '+textmedia', 'info' => 'URL for "Custom" bullet image (&#9679;Pro)'), array('type' => 'submit'), array('name' => 'Sidebar Widths:', 'type' => 'note', 'info' => 'Widths of Sidebars set under Layout tab.'), array('name' => 'Primary Widget Area', 'id' => 'wii_widget_primary', 'type' => 'widget_area', 'info' => 'Properties for the Primary Sidebar Widget Area. (Applies to Mobile Widget area also.)'), array('name' => 'Upper/Right Widget Area', 'id' => 'wii_widget_right', 'type' => 'widget_area', 'info' => 'Properties for the Upper/Right Sidebar Widget Area.'), array('name' => 'Lower/Left Widget Area', 'id' => 'wii_widget_left', 'type' => 'widget_area', 'info' => 'Properties for the Lower/Left Sidebar Widget Area.'), array('name' => 'Primary, Right, Left Margins', 'type' => 'subheader_alt', 'info' => 'Left and Right margins for Primary, Upper/Right, and Lower/Left Widget areas'), array('name' => 'Left/Right Margins', 'id' => 'wii_sidbar_widget_margins', 'type' => 'text_lr', 'info' => 'Left and right margins for the sidebar widget areas.'), array('name' => 'Top Widget Areas', 'id' => 'wii_widget_top', 'type' => 'widget_area', 'info' => 'Properties for all Top Widget areas (Sitewide, Pages, Blog, Archive).'), array('name' => 'Left/Right indent', 'id' => 'wii_widget_top_indent_int', 'type' => 'val_percent', 'info' => 'Top Widget Areas: Set the left and right indents - centers widget area in content area'), array('name' => 'Bottom Widget Areas', 'id' => 'wii_widget_bottom', 'type' => 'widget_area', 'info' => 'Properties for all Bottom Widget areas (Sitewide, Pages, Blog, Archive).'), array('name' => 'Left/Right indent', 'id' => 'wii_widget_bottom_indent_int', 'type' => 'val_percent', 'info' => 'Bottom Widget Areas: Set the left and right indents - centers widget area in content area'), array('name' => 'Footer Widget Areas', 'id' => 'wii_widget_footer', 'type' => 'widget_area', 'info' => 'Properties for all Footer Widget areas.'), array('name' => 'All Widget Areas', 'type' => 'subheader_alt', 'info' => 'Properties that apply to all widget areas.'), array('name' => 'Widget Area Padding', 'id' => 'wii_widget_padding_int', 'type' => 'val_px', 'info' => 'Padding used around all sides of widget areas.'));
    ?>
<p>
Options affecting <strong>Widget Areas</strong>. This includes properties of <strong>Widgets</strong>, as well as
properties of various <strong>Widget Areas</strong>. This is also where you can define new
<strong>Per Page Widget Areas</strong>.
</p>
<?php 
    weaverii_form_show_options($opts);
    ?>
<span style="color:blue;"><b>Define Per Page Widget Areas</b></span>
<?php 
    weaverii_help_link('help.html#PPWidgets', weaverii_t_('Help for Per Page Widget Areas'));
    ?>
	<br/>
	<small>You may define extra widget areas that can then be used in the <em>Per Page</em> settings. 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 II Options For This Page" box on the Edit Page screen.</small>
	<br />
	<textarea name="<?php 
    weaverii_sapi_main_name('wii_perpagewidgets');
    ?>
" rows=1 style="width: 95%"><?php 
    echo esc_textarea(weaverii_getopt('wii_perpagewidgets'));
    ?>
</textarea>
	<br />
	<small>These extra widget areas are also used by the Weaver II Pro Widget Area shortcode.</small>
<?php 
    ?>

<p style="color:green;"><strong>Note: Specify the layout of sidebar widget areas on the Layout tab.
</strong></p>
<?php 
}
function weaverii_repeat_row($rid)
{
    if (!weaverii_init_base()) {
        echo '<div style="display:none;>';
    }
    ?>
    <tr>
	<th scope="row" align="right">&nbsp;</th>
	<td colspan="2" style="font-size:80%;">
	    <input type="radio" name="<?php 
    weaverii_sapi_main_name($rid);
    ?>
"
                value="repeat" <?php 
    echo weaverii_getopt($rid) == 'repeat' ? 'checked' : '';
    ?>
 /> repeat &nbsp;
	    <input type="radio" name="<?php 
    weaverii_sapi_main_name($rid);
    ?>
"
                value="repeat-x" <?php 
    echo weaverii_getopt($rid) == 'repeat-x' ? 'checked' : '';
    ?>
 /> repeat-x &nbsp;
	    <input type="radio" name="<?php 
    weaverii_sapi_main_name($rid);
    ?>
"
                value="repeat-y" <?php 
    echo weaverii_getopt($rid) == 'repeat-y' ? 'checked' : '';
    ?>
 /> repeat-y &nbsp;
	    <input type="radio" name="<?php 
    weaverii_sapi_main_name($rid);
    ?>
"
                value="no-repeat" <?php 
    echo weaverii_getopt($rid) == 'no-repeat' ? 'checked' : '';
    ?>
 /> no-repeat
	</td>
    </tr>
<?php 
    if (!weaverii_init_base()) {
        echo '</div>';
    }
}
function weaverii_adv_seo_opts()
{
    ?>
		<a name="siteopts" id="siteopts"></a>
		<div class="wvr-option-header">SEO
		<?php 
    weaverii_help_link('help.html#SEO', 'Help on SEO');
    ?>
</div>
		<p>Weaver II has been designed to follow the latest SEO (Search Engine Optimization) 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.</p>
		<p>If you want optimal SEO for your site, we recommend using an SEO plugin such as
		<em>WordPress SEO by Yoast.</em>
		<hr />

		<!-- ======== -->
		<div class="wvr-option-subheader">SEO/Meta Tags (legacy support)</div><br/>
		<p>Previous versions of Weaver II supported two &lt;meta&gt; tags: "description" and "keywords". This is no
		longer supported. If you want these values in your site, you can use the <em>Advanced Options : &lt;HEAD&gt;
		Section</em> option to add them.</p>

<input name="<?php 
    weaverii_sapi_main_name('_wii_metainfo');
    ?>
" id="<?php 
    echo '_wii_metainfo';
    ?>
" type="hidden" value="<?php 
    echo esc_textarea(addslashes(weaverii_getopt('_wii_metainfo')));
    ?>
" />

<?php 
    $oldmeta = weaverii_getopt('_wii_metainfo');
    if ($oldmeta != '') {
        ?>
		<p>You have a value for this meta information saved in your settings - probably from a previous
		version of Weaver II. If you had set these to something other than the default, you might want
		to copy/paste these into the <em>Advanced Options : &lt;HEAD&gt; Section</em> option. Otherwise,
		you should consider using an SEO plugin.</p>

		<p style="background:#ddd;">
			<?php 
        echo esc_textarea($oldmeta);
        ?>
		</p>
<?php 
    }
}
Example #6
0
function weaverii_admin_admin()
{
    ?>
<h3>Basic Administrative Options <?php 
    weaverii_help_link('help.html#AdminOptions', 'Help for Admin Options');
    ?>
</h3>
<?php 
    weaverii_sapi_submit('', '<br /><br />');
    ?>
	These options control some administrative options and appearance features.

<br /><br />

	<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_donate');
    ?>
" id="wii_hide_donate" <?php 
    checked(weaverii_getopt_checked('_wii_hide_donate'));
    ?>
 />
		I've Donated - </label><small>Thank you for donating to the Weaver II theme.
This will hide the Donate button. Purchasing Weaver II Pro also hides the Donate button.</small> &diams;<br />

<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_subtheme_link');
    ?>
" id="wii_hide_subtheme_link" <?php 
    checked(weaverii_getopt_checked('_wii_hide_subtheme_link'));
    ?>
 />
		Hide Subthemes Banner - </label><small>This will hide the Premium Subthemes Banner.</small> &diams;<br />
<br />

<?php 
    weaverii_hide_advanced('begin');
    ?>
	<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_editor_style');
    ?>
" id="_wii_hide_editor_style" <?php 
    checked(weaverii_getopt_checked('_wii_hide_editor_style'));
    ?>
 />
		Disable Page/Post Editor Styling - </label><small>Checking this box will disable the Weaver 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> &diams;<br />

		<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_disable_shortcodes');
    ?>
" id="_wii_disable_shortcodes" <?php 
    checked(weaverii_getopt_checked('_wii_disable_shortcodes'));
    ?>
 />
		Disable <em>all</em> theme shortcode support</label> - <small>Disables all shortcodes provide by the theme ([weaver_show_posts], etc.).
		Useful to check how your site would look without Weaver II options.</small> &diams;<br />

	<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_updatemsg');
    ?>
" id="wii_hide_updatemsg" <?php 
    checked(weaverii_getopt_checked('_wii_hide_updatemsg'));
    ?>
 />
		Hide Update Messages - </label><small>Checking this box will hide the Weaver version update announcements on the Weaver Admin page.</small> &diams;<br />



	<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_auto_css_rules');
    ?>
" id="wii_hide_auto_css_rules" <?php 
    checked(weaverii_getopt_checked('_wii_hide_auto_css_rules'));
    ?>
 />
		Don't auto-display CSS rules - </label><small>Checking this box will disable the auto-display of Main Option elements that have CSS settings.</small> &diams;<br />

	<label><input name="<?php 
    weaverii_sapi_main_name('_wii_css_rows');
    ?>
" id="wii_css_rows" type="text" style="width:30px;height:20px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_getopt('_wii_css_rows'));
    ?>
" />
	lines - Set CSS+ text box height - </label><small>You can increase the default height of the CSS+ input area to a value between 1 and 25 lines.</small> &diams;
<br />
<br />
<strong>Compatibility Settings</strong> - settings that may cause compatibility issues with other plugins
<br />
<br /> <small><span style="color:red;"><b>NOTE:</b></span> Weaver II includes support for Rounded Corners and
Shadows for Internet Explorer 7/8 via an add-on script called PIE. The script has been <strong>enabled</strong> by default.
Note while PIE supports most rounded areas, it doesn't support the menu bars.
If you have difficulties or don't like the way your site renders in IE 7/8, you can disable the support.</small>
<br />
<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_PIE');
    ?>
" id="wii_hide_PIE" <?php 
    checked(weaverii_getopt_checked('_wii_hide_PIE'));
    ?>
 />
	Disable IE rounded corners support - </label><small>If you are having issues with IE and rounded corners, please disable this option.</small> &diams;<br />
 <br />
 <input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_no_final_div');
    ?>
" id="wii_no_final_div" <?php 
    checked(weaverii_getopt_checked('_wii_no_final_div'));
    ?>
 />
		Don't add #weaver-final at end - </label><small>Checking this box will prevent Weaver II from wrapping the
		very end of site pages with the #weaver-final div. This may prevent some conflicts with some plugins.</small> &diams;<br />

 <h3 class="wvr-option-subheader">Per Page and Per Post Option Panels by Roles</h3>
 <p>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. (&#9679;Pro)</p>

 <?php 
    if (!weaverii_init_base()) {
        echo '<p>&nbsp;&nbsp;<em>Weaver II Pro Option</em></p>';
    } else {
        ?>

	<label><input type="checkbox" name="<?php 
        weaverii_sapi_main_name('_wii_hide_mu_admin_per');
        ?>
" id="_wii_hide_mu_admin_per" <?php 
        checked(weaverii_getopt_checked('_wii_hide_mu_admin_per'));
        ?>
 />
		Hide Per Page/Post Options for MultiSite Admins</label> &diams;<br />
		   <label><input type="checkbox" name="<?php 
        weaverii_sapi_main_name('_wii_hide_editor_per');
        ?>
" id="_wii_hide_editor_per" <?php 
        checked(weaverii_getopt_checked('_wii_hide_editor_per'));
        ?>
 />
		Hide Per Page/Post Options for Editors</label> &diams;<br />
		   <label><input type="checkbox" name="<?php 
        weaverii_sapi_main_name('_wii_hide_author_per');
        ?>
" id="_wii_hide_author_per" <?php 
        checked(weaverii_getopt_checked('_wii_hide_author_per'));
        ?>
 />
		Hide Per Page/Post Options for Authors and Contributors</label> &diams;<br />

<?php 
    }
    ?>
<br />
 <h3 class="wvr-option-subheader">Subtheme Notes</h3>
 <p>This box may be used to keep notes and instructions about settings made for a custom subtheme. It
 will be saved in the both .w2t and .w2b settings files.</p>
 <textarea name="<?php 
    weaverii_sapi_main_name('wii_subtheme_notes');
    ?>
" rows=8 style="width: 95%"><?php 
    weaverii_esc_textarea(weaverii_getopt('wii_subtheme_notes'));
    ?>
</textarea>
<?php 
    weaverii_hide_advanced();
}