function form($instance)
    {
        $title = isset($instance['title']) ? $instance['title'] : '';
        ?>
				<p>
						<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        echo 'Title:';
        ?>
</label>
						<input type="text" class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        weaverii_esc_textarea($title);
        ?>
" />
				</p>
				<p><em>Select Social Buttons to display from the Weaver II Pro Shortcodes menu. You can style with '.weaver-social'.</em>
				</p>
<?php 
    }
function weaveriip_disclaimer_admin()
{
    ?>
<p class='wvr-option-section'>Weaver II Pro Comment Policy / Disclaimer <?php 
    weaveriip_help_link('pro-help.html#comment_policy', 'Comment Policy help');
    ?>
</p>


<p>Weaver II Pro Comment Disclaimer allows you to display a disclaimer, other comment policy, or any thing else (including
shortcodes) right under the Post Comment button. Nothing will be displayed if the text box below is empty.</p>

	<form name="weaveriip_options_form" method="post">
		<input class="button-primary" type="submit" name="weaverii_pro_save_pro" value="Save Comment Disclaimer Text"/>
		<br /><br />
		<fieldset class="options">
		<span style="font-weight:bold; color:blue;">Weaver II Pro Comment Policy / Disclaimer</span><br />
		<p>
			Enter text for you disclaimer. You can use basic HTML to format your disclaimer text. The HTML
			will be wrapped with &lt;div class="weaver-comment-disclaimer"> so you can add style
			using Weaver's &lt;HEAD> Section. While designed to
			add comment policy text, you can add anything you want, including shortcodes. Need a widget area after
			a comment block? Use the [weaver_widget_area] short code to add one.
		</p>
		<p>
			<textarea name="wvr_disclaimer" rows=10 style="width: 90%"><?php 
    weaverii_esc_textarea(weaverii_pro_getopt('wvr_disclaimer'));
    ?>
</textarea>
		</p>

		</fieldset>
		<br />
		<input class="button-primary" type="submit" name="weaverii_pro_save_pro" value="Save Comment Disclaimer Text"/>
		<input type="hidden" name="weaveriip_save_disclaimer" value="Weaver II Pro Posts Options Saved" />
		<?php 
    weaverii_nonce_field('weaverii_pro_save_pro');
    ?>
	</form>
	<hr />
<?php 
}
Beispiel #3
0
function weaverii_form_row_text_xy($value, $x = 'X', $y = 'Y', $units = 'px')
{
    $xid = $value['id'] . '_' . $x;
    $yid = $value['id'] . '_' . $y;
    ?>
	<tr>
		<th scope="row" align="right"><?php 
    weaverii_echo_name($value);
    ?>
:&nbsp;</th>
		<td>
			<?php 
    echo $x;
    ?>
:<input name="<?php 
    weaverii_sapi_main_name($xid);
    ?>
" id="<?php 
    echo $xid;
    ?>
" type="text" style="width:40px;height:20px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_getopt($xid));
    ?>
" /> <?php 
    echo $units;
    ?>
			&nbsp;<?php 
    echo $y;
    ?>
:<input name="<?php 
    weaverii_sapi_main_name($yid);
    ?>
" id="<?php 
    echo $yid;
    ?>
" type="text" style="width:40px;height:20px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_getopt($yid));
    ?>
" /> <?php 
    echo $units;
    ?>
		</td>
<?php 
    weaverii_form_row_info($value);
    ?>
	</tr>
<?php 
}
    function form($instance)
    {
        $title = isset($instance['title']) ? $instance['title'] : '';
        $nav_menu = isset($instance['nav_menu']) ? $instance['nav_menu'] : '';
        $menu_style = isset($instance['menu_style']) ? $instance['menu_style'] : '';
        // Get menus
        $menus = get_terms('nav_menu', array('hide_empty' => false));
        $styles = array('Vertical' => 'vertical', 'Pop Out to Left' => 'left', 'Pop Out to Right' => 'right', 'Horizontal' => 'horizontal');
        // If no menus exists, direct the user to go and create some.
        if (!$menus) {
            echo '<p>' . sprintf(weaverii_t_('No menus have been created yet. <a href="%s">Create some</a>.'), admin_url('nav-menus.php')) . '</p>';
            return;
        }
        ?>
		<p>
		<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        echo 'Title:';
        ?>
</label>
		<input type="text" class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        weaverii_esc_textarea($title);
        ?>
" />
		</p>
		<p>
		<label for="<?php 
        echo $this->get_field_id('nav_menu');
        ?>
"><?php 
        echo 'Select Menu:';
        ?>
</label>
		<select id="<?php 
        echo $this->get_field_id('nav_menu');
        ?>
" name="<?php 
        echo $this->get_field_name('nav_menu');
        ?>
">
<?php 
        foreach ($menus as $menu) {
            $selected = $nav_menu == $menu->term_id ? ' selected="selected"' : '';
            echo '<option' . $selected . ' value="' . $menu->term_id . '">' . $menu->name . '</option>';
        }
        ?>
		</select>
		</p>
		<p>
		<label for="<?php 
        echo $this->get_field_id('menu_style');
        ?>
"><?php 
        echo 'Select Menu Style:';
        ?>
</label>
		<select id="<?php 
        echo $this->get_field_id('menu_style');
        ?>
" name="<?php 
        echo $this->get_field_name('menu_style');
        ?>
">
<?php 
        foreach ($styles as $style => $val) {
            $selected = $menu_style == $val ? ' selected="selected"' : '';
            echo '<option' . $selected . ' value="' . $val . '">' . $style . '</option>';
        }
        ?>
		</select>
		</p>
<?php 
    }
function weaverii_select($id, $list)
{
    ?>
    <select name="<?php 
    weaverii_sapi_main_name($id);
    ?>
" id="<?php 
    echo $id;
    ?>
">
<?php 
    foreach ($list as $option) {
        ?>
        <option<?php 
        if (weaverii_getopt($id) == $option) {
            echo ' selected="selected"';
        }
        ?>
><?php 
        weaverii_esc_textarea($option);
        ?>
</option>
<?php 
    }
    ?>
    </select>
<?php 
}
function weaveriip_social_show_list()
{
    global $weaveriip_social_services;
    if (!weaverii_pro_isset('social')) {
        weaveriip_init_social();
        // make sane
    }
    $soc = weaverii_pro_getopt('social');
    // fetch the sub list
    $baseurl = trailingslashit(get_template_directory_uri());
    /* from codex example */
    ?>
	<div>
		<table class='even-odd'>
			<tr>
				<td><strong><small>Use</small></strong></td>
				<td style="text-align:center;font-weight:bold;"><small>Display<br />Order</small></td>
				<td></td>
				<td style="font-weight:bold;"><small>Social Site Description</small></td>
				<td style="font-weight:bold;"><small>Full URL link to your account</</td>
				<td style="font-weight:bold;"><small>Stay<br />on page</</td>
			</tr>
<?php 
    $i = 1;
    foreach ($weaveriip_social_services as $service) {
        if ($i++ & 1) {
            $rowbg = '#eee';
        } else {
            $rowbg = 'transparent';
        }
        echo "<tr style=\"background:{$rowbg};\">\n";
        $id = $service['icon'];
        if (!isset($soc[$id . '_use'])) {
            $soc[$id . '_use'] = '';
        }
        if (!isset($soc[$id . '_url'])) {
            $soc[$id . '_url'] = '';
        }
        if (!isset($soc[$id . '_order'])) {
            $soc[$id . '_order'] = '';
        }
        if (!isset($soc[$id . '_hover'])) {
            $soc[$id . '_hover'] = '';
        }
        if (!isset($soc[$id . '_stay'])) {
            $soc[$id . '_stay'] = '';
        }
        if (!isset($soc[$id . '_custom'])) {
            $soc[$id . '_custom'] = '';
        }
        ?>
	<td style="padding:5px;">
		<input type="checkbox" name="<?php 
        echo $id;
        ?>
_use" id="<?php 
        echo $id;
        ?>
_use" <?php 
        echo $soc[$id . '_use'] ? "checked" : "";
        ?>
 />
	</td>
	<td style="padding:5px;">
		<input type="text" name="<?php 
        echo $id;
        ?>
_order" id="<?php 
        echo $id;
        ?>
_order"  style="width:50px;height:20px;" class="regular-text" value="<?php 
        weaverii_esc_textarea($soc[$id . '_order']);
        ?>
" />
	</td>
<?php 
        if ($service['icon'][0] == '_') {
            if ($soc[$id . '_custom'] == '') {
                $img = '<img src="' . apply_filters('weaverii-social-dir', $baseurl . 'includes/pro/social/1/') . 'button-white.png" height="28" width="28" alt="white button" />';
            } else {
                $img = '<img src="' . $soc[$id . '_custom'] . '" height="28" width="28" alt="custom button" />';
            }
        } else {
            $img = '<img src="' . apply_filters('weaverii-social-dir', $baseurl . 'includes/pro/social/1/') . $service['icon'] . '.png" height="28" width="28" alt="social button" />';
        }
        if ($service['site'][0] == '#') {
            // special case - no link
            echo '<td style="padding:5px;">' . $img . '</td>' . "\n";
            echo '<td style="width:340px;padding-left:10px; padding-right:10px;">';
            ?>
<input type="text" name="<?php 
            echo $id;
            ?>
_hover" id="<?php 
            echo $id;
            ?>
_hover"  style="width:340px;height:20px;" class="regular-text" value="<?php 
            weaverii_esc_textarea($soc[$id . '_hover']);
            ?>
" /></td>
<?php 
        } else {
            echo '<td style="padding:5px;"><a href="http://' . $service['site'] . '" target="_blank">' . $img . '</td>' . "\n";
            ?>
			<td style="width:340px;padding-left:10px; padding-right:10px;"><input type="text" name="<?php 
            echo $id;
            ?>
_hover" id="<?php 
            echo $id;
            ?>
_hover"  style="width:340px;height:20px;" class="regular-text" value="<?php 
            weaverii_esc_textarea($soc[$id . '_hover']);
            ?>
" /></td>
<?php 
            // echo '<td style="width:340px;padding-left:10px; padding-right:10px;">' . $service['blurb'] . "</td>\n";
        }
        ?>
	<td style="padding:5px;">
<?php 
        if ($service['site'][0] == '#') {
            // special case - no link
            echo substr($service['site'], 1) . '<br />';
        }
        ?>
		<input type="text" name="<?php 
        echo $id;
        ?>
_url" id="<?php 
        echo $id;
        ?>
_url"  style="width:280px;height:20px;" class="regular-text" value="<?php 
        weaverii_esc_textarea($soc[$id . '_url']);
        ?>
" />
	</td>
	<td style="padding:5px;">
		<input type="checkbox" name="<?php 
        echo $id;
        ?>
_stay" id="<?php 
        echo $id;
        ?>
_stay" <?php 
        echo $soc[$id . '_stay'] ? "checked" : "";
        ?>
 />
	</td>

<?php 
        if ($service['icon'][0] == '_') {
            echo "<tr style=\"background:{$rowbg};\">\n";
            ?>
<td colspan>&nbsp;</td><td colspan="2"><small>Custom Icon URL:</td><td style="width:340px;padding-left:10px; padding-right:10px;">
<input type="text" name="<?php 
            echo $id;
            ?>
_custom" id="<?php 
            echo $id;
            ?>
_custom"  style="width:300px;" class="regular-text" value="<?php 
            weaverii_esc_textarea($soc[$id . '_custom']);
            ?>
" /><?php 
            weaverii_media_lib_button($id . '_custom');
            ?>
</td><td>&nbsp;&nbsp;<small>Suggested size: 32x32 px</td></tr>
<?php 
        }
        echo "</tr>\n";
    }
    // end foreach
    ?>
		</table>
	</div>

<?php 
}
function weaverii_add_html_field($title, $name, $info, $help = '')
{
    if ($name == 'submit') {
        weaverii_sapi_submit('', "<br /><br />\n");
        return;
    }
    $pro = weaverii_fix_type($name);
    if ($name[0] == '+') {
        $name = substr($name, 1);
    }
    // fix locally
    $area_name = 'wii_' . $name . '_insert';
    $hide_front = 'wii_hide_front_' . $name;
    $hide_rest = 'wii_hide_rest_' . $name;
    $style_id = 'inject_' . $name;
    $val = array('name' => $title . ' BG', 'id' => $style_id . '_bgcolor', 'info' => 'BG Color for area', 'help' => '');
    if ($pro == 'inactive') {
        if ($title[0] == '#') {
            $title = substr($title, 4);
        }
        ?>
<div class="wvr-option-subheader"><span style="color:#999;"><b><?php 
        echo $title;
        ?>
</b> - (Pro Version)</span><br /></div><br />
<?php 
        if ($info) {
            echo '<span style="color:#999;">' . $info . "<br /> <br />\n";
        }
        weaverii_adv_hidden_opt($area_name);
        // keep it working for Pro settings, even on free version
        weaverii_adv_hidden_opt($hide_front);
        weaverii_adv_hidden_opt($hide_rest);
        if ($info) {
            echo '</span>';
        }
        return;
    }
    ?>
<div class="wvr-option-subheader"><span style="color:blue;"><b><?php 
    echo $title;
    ?>
</b></span></div><br />
<?php 
    if ($info) {
        echo $info;
    }
    if ($style_id == 'inject_postpostcontent') {
        echo " (Style with <em>class</em> <code>.{$style_id}</code>.)";
    } else {
        echo " (Style with <code>#{$style_id}</code>.)";
    }
    ?>
	<br />
	<textarea name="<?php 
    weaverii_sapi_main_name($area_name);
    ?>
" rows=3 style="width: 95%"><?php 
    weaverii_esc_textarea(weaverii_getopt($area_name));
    ?>
</textarea>
	<br />
<?php 
    echo '<table>';
    weaverii_form_row_ctext($val);
    echo '</table>';
    ?>
	<label>Hide on front page: <input type="checkbox" name="<?php 
    weaverii_sapi_main_name($hide_front);
    ?>
" id="<?php 
    echo $hide_front;
    ?>
" <?php 
    checked(weaverii_getopt_checked($hide_front));
    ?>
 /></label>
	<small>If you check this box, then the code from this area will not be displayed on the front (home) page.</small><br />
	<label>Hide on non-front pages: <input type="checkbox" name="<?php 
    weaverii_sapi_main_name($hide_rest);
    ?>
" id="<?php 
    echo $hide_rest;
    ?>
" <?php 
    checked(weaverii_getopt_checked($hide_rest));
    ?>
 /></label>
	<small>If you check this box, then the code from this area will not be displayed on non-front pages.</small>
<?php 
    if ($name == 'footer') {
        ?>
<br /><label>Move to before widget areas: <input type="checkbox" name="<?php 
        weaverii_sapi_main_name('wii_footer_inject_move');
        ?>
" id="wii_footer_inject_move" <?php 
        checked(weaverii_getopt_checked('wii_footer_inject_move'));
        ?>
 /></label>
	<small>If you check this box, then the code from this area will be inserted <em>before</em> the footer widgets instead of after.</small>
<?php 
    }
    ?>
	<br /><br />
<?php 
}
function weaveriip_value_row($th, $id, $desc, $width = '')
{
    $style = '';
    if ($width != '') {
        $style = ' style="width:' . $width . ';"';
    }
    ?>
    <tr>
	<th scope="row" align="right"<?php 
    echo $style . '>' . $th;
    ?>
:&nbsp;</th>
	<td>
	    <input type="text" style="width:60px;height:22px;" class="regular-text" name="<?php 
    echo $id;
    ?>
"
                id="<?php 
    echo $id;
    ?>
" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($id));
    ?>
" />
	</td>
	<td style="padding-left: 10px"><small><?php 
    echo $desc;
    ?>
</small></td>
    </tr>
<?php 
}
Beispiel #9
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();
}
function weaveriip_slider_sform($i)
{
    global $weaveriip_slider_opts;
    $sname = 'slider' . $i;
    if ($i & 1) {
        echo "<div style=\"width:99%;background:#eee;padding:4px;border-right:2px solid #eee;\">\n";
    } else {
        echo "<div style=\"width:99%;padding:4px;border:1px solid #ddd;\">\n";
    }
    $menus = get_terms('nav_menu', array('hide_empty' => false));
    // get defined custom menus
    $menu_selected = weaverii_pro_isset($sname . '_menu') ? weaverii_pro_getopt($sname . '_menu') : '';
    ?>
	<div><span style="color:blue;font-weight:bold;font-size:120%;">Slider <?php 
    echo $i;
    ?>
</span>
		&nbsp;&nbsp;<em>Shortcode:</em> <strong><code>[weaver_slider id=<?php 
    echo $i;
    ?>
]</code></strong>
		| <em>Note (where used, for example):</em>
		<input name="<?php 
    echo $sname;
    ?>
_note" id="<?php 
    echo $sname;
    ?>
_note" type="text" style="width:250px;height:22px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_note'));
    ?>
" />
	</div>
	<br />
	<table class="optiontable">
		<tr>
			<th scope="row" align="right" style="width:20%;">Select Menu:&nbsp;</th>
			<td>
<?php 
    // If no irect the user to go and create some.
    if (!$menus) {
        echo sprintf('No menus have been created yet. Please use <a href="$s">Appearance&rarr;Menus</a> to create some.', admin_url('nav-menus.php'));
    } else {
        ?>
					<select id="<?php 
        echo $sname . '_menu';
        ?>
" name="<?php 
        echo $sname . '_menu';
        ?>
">
<?php 
        foreach ($menus as $menu) {
            $selected = $menu_selected == $menu->term_id ? ' selected="selected"' : '';
            echo '<option' . $selected . ' value="' . $menu->term_id . '">' . $menu->name . '</option>' . "\n";
        }
    }
    ?>
					</select>
			</td>
			<td style="padding-left: 10px"><small>Select a custom menu to use for this slider. Sub-menus are not supported!.</small></td>

		</tr>
		<tr>
			<th scope="row" align="right" style="width:20%;">Hide Menu Text:&nbsp;</th>
			<td>
			<input type="checkbox" name="<?php 
    echo $sname;
    ?>
_hidetext" id="<?php 
    echo $sname;
    ?>
_hidetext" <?php 
    echo weaverii_pro_getopt($sname . '_hidetext') ? "checked" : "";
    ?>
 />
			</td>
			<td style="padding-left: 10px"><small>Hide standard Menu names over each image. Useful if your image
			contains the Menu name.</small></td>
		</tr>
		<tr>
			<th scope="row" align="right" style="width:20%;">Hide on Mobile View:&nbsp;</th>
			<td>
			<input type="checkbox" name="<?php 
    echo $sname;
    ?>
_hidemobile" id="<?php 
    echo $sname;
    ?>
_hidemobile" <?php 
    echo weaverii_pro_getopt($sname . '_hidemobile') ? "checked" : "";
    ?>
 />
			</td>
			<td style="padding-left: 10px"><small>Hide this slider on all mobile devices. Useful in combination with Main Options:
			Header: Hide Header Image on Normal View to show alternate header on mobile devices.</small></td>
		</tr>

		<tr>
			<th scope="row" align="right" style="width:20%;">Auto-Hide Primary Menu:&nbsp;</th>
			<td>
			<input type="checkbox" name="<?php 
    echo $sname;
    ?>
_hidemenu" id="<?php 
    echo $sname;
    ?>
_hidemenu" <?php 
    echo weaverii_pro_getopt($sname . '_hidemenu') ? "checked" : "";
    ?>
 />
			</td>
			<td style="padding-left: 10px"><small>Automatically hide Primary Menu on desktop or wide displays (slider on desktops,
			regular menu on mobile).</small></td>
		</tr>

		<tr>
			<th scope="row" align="right">Number of Images in Menu:&nbsp;</th>
			<td>
				<input name="<?php 
    echo $sname;
    ?>
_number_images" id="<?php 
    echo $sname;
    ?>
_number_images" type="text" style="width:60px;height:22px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_number_images'));
    ?>
" />
			<td style="padding-left: 10px"><small>Number of Images in Menu (must be between 2 and 8). Default is 7.</small></td>
			</td>
		</tr>
		<tr>
		<th scope="row" align="right">Menu Width:&nbsp;</th>
			<td>
				<input name="<?php 
    echo $sname;
    ?>
_menu_width" id="<?php 
    echo $sname;
    ?>
_menu_width" type="text" style="width:60px;height:22px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_menu_width'));
    ?>
" />
			<td style="padding-left: 10px"><small>Overall width of Slider Menu (in px). <em>(Typically matches image width for vertical menus, theme width for horizontal menus.)</em></small></td>
			</td>
		</tr>
		<tr>
			<th scope="row" align="right">Width of each image:&nbsp;</th>
			<td>
				<input name="<?php 
    echo $sname;
    ?>
_img_width" id="<?php 
    echo $sname;
    ?>
_img_width" type="text" style="width:60px;height:22px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img_width'));
    ?>
" />
			<td style="padding-left: 10px"><small>Enter the width of each image (in px). For horizontal sliders, this will affect the exact look of the slider effect.
			The default 320 works well with 7 horizontal images. For vertical sliders, this will be the width of the slider. <em>Use 210 width for
			slider in text widget with default sidebar. (130 is good matching height.)</em></small></td>
			</td>
		</tr>
		<tr>
			<th scope="row" align="right">Height of each image:&nbsp;</th>
			<td>
				<input name="<?php 
    echo $sname;
    ?>
_img_height" id="<?php 
    echo $sname;
    ?>
_img_height" type="text" style="width:60px;height:22px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img_height'));
    ?>
" />
			<td style="padding-left: 10px"><small>Enter the height of each image (in px). This will determine the height of your slider menu. Default is 200. Limits are 25 and 1000.</small></td>
			</td>
		</tr>
		<tr>
			<th scope="row" align="right" style="width:20%;">Vertical Menu:&nbsp;</th>
			<td>
			<input type="checkbox" name="<?php 
    echo $sname;
    ?>
_vertical" id="<?php 
    echo $sname;
    ?>
_vertical" <?php 
    echo weaverii_pro_getopt($sname . '_vertical') ? "checked" : "";
    ?>
 />
			</td>
			<td style="padding-left: 10px"><small>Check for vertical menu.</small> <strong>|</strong> Compressed height for each image:&nbsp;
			<input name="<?php 
    echo $sname;
    ?>
_vert_compress" id="<?php 
    echo $sname;
    ?>
_vert_compress" type="text" style="width:40px;height:20px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_vert_compress'));
    ?>
" />
			&nbsp;<small>This value, image height, and number of images interact to determine total height of vertical menu. Not used for horizontal menus.</small>
			</td>
		</tr>
		<tr>
			<th scope="row" align="right" style="width:20%;">Images Only, No Sliding:&nbsp;</th>
			<td>
			<input type="checkbox" name="<?php 
    echo $sname;
    ?>
_noeffects" id="<?php 
    echo $sname;
    ?>
_noeffects" <?php 
    echo weaverii_pro_getopt($sname . '_noeffects') ? "checked" : "";
    ?>
 />
			</td>
			<td style="padding-left: 10px"><small>Disable sliding effects. You will get an image menu only. You will have to adjust image sizes to fit.</small>
			</td>
		</tr>
		<tr>
			<th scope="row" align="right">CSS for Menu Text:&nbsp;</th>
			<td>&nbsp;</td>
			<td>
				<span style="padding-left: 10px"><small>You can control the font characteristics of the Slider Menu Text
				by editing this CSS. (Clear to blank to restore defaults.)</small></span>
				<br />
				<textarea name="<?php 
    echo $sname;
    ?>
_text_font" rows=2 style="width: 95%"><?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_text_font'));
    ?>
</textarea>
				</td>
			</td>
		</tr>
		<tr>
			<th scope="row" align="right">Slider Menu CSS:&nbsp;</th>
			<td>&nbsp;</td>
			<td>
				<span style="padding-left: 10px"><small>Edit this CSS to change menu margins, etc. Use <code>border:0;</code> for no borders. Clear to blank to restore default.</small></span>
				<br />
				<textarea name="<?php 
    echo $sname;
    ?>
_borders" rows=1 style="width: 95%"><?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_borders'));
    ?>
</textarea>
				</td>
			</td>
		</tr>
		</table>
		<h3>Slider Image Locations</h3>
		<p>
		Specify URLs for images for the menu. Each image should be
		<?php 
    echo weaveriip_default_int(weaverii_pro_getopt($sname . '_img_height'), 25, 1024, 200);
    ?>
px high and
		<?php 
    echo weaveriip_default_int(weaverii_pro_getopt($sname . '_img_width'), 25, 1024, 320);
    ?>
px wide. The most reliable place to
		keep your Slider images is in your Media Library. Click the small image icon to open the Medial Library selection dialog. Click "Insert into Post" to add URL. You can also enter any URL directly into the URL box below. If you have < 8 images, just leave the excess image links blank.</p>

		<table class="optiontable" style="padding-left:3%; padding-right:3%;">
		<tr>
			<td>
				1. Enter URL: <input type="text" name="<?php 
    echo $sname;
    ?>
_img1" id="<?php 
    echo $sname;
    ?>
_img1" size="55" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img1'));
    ?>
" /><?php 
    weaverii_media_lib_button($sname . '_img1');
    ?>
&nbsp;
			</td>
			<td>
				2. Enter URL: <input type="text" name="<?php 
    echo $sname;
    ?>
_img2" id="<?php 
    echo $sname;
    ?>
_img2" size="55" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img2'));
    ?>
" /><?php 
    weaverii_media_lib_button($sname . '_img2');
    ?>
			</td>
		</tr>
		<tr>
			<td>
				3. Enter URL: <input type="text" name="<?php 
    echo $sname;
    ?>
_img3" id="<?php 
    echo $sname;
    ?>
_img3" size="55" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img3'));
    ?>
" /><?php 
    weaverii_media_lib_button($sname . '_img3');
    ?>
&nbsp;
			</td>
			<td>
				4. Enter URL: <input type="text" name="<?php 
    echo $sname;
    ?>
_img4" id="<?php 
    echo $sname;
    ?>
_img4" size="55" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img4'));
    ?>
" /><?php 
    weaverii_media_lib_button($sname . '_img4');
    ?>
			</td>
		</tr>
		<tr>
			<td>
				5. Enter URL: <input type="text" name="<?php 
    echo $sname;
    ?>
_img5" id="<?php 
    echo $sname;
    ?>
_img5" size="55" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img5'));
    ?>
" /><?php 
    weaverii_media_lib_button($sname . '_img5');
    ?>
&nbsp;
			</td>
			<td>
				6. Enter URL: <input type="text" name="<?php 
    echo $sname;
    ?>
_img6" id="<?php 
    echo $sname;
    ?>
_img6" size="55" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img6'));
    ?>
" /><?php 
    weaverii_media_lib_button($sname . '_img6');
    ?>
			</td>
		</tr>
		<tr>
			<td>
				7. Enter URL: <input type="text" name="<?php 
    echo $sname;
    ?>
_img7" id="<?php 
    echo $sname;
    ?>
_img7" size="55" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img7'));
    ?>
" /><?php 
    weaverii_media_lib_button($sname . '_img7');
    ?>
&nbsp;
			</td>
			<td>
				8. Enter URL: <input type="text" name="<?php 
    echo $sname;
    ?>
_img8" id="<?php 
    echo $sname;
    ?>
_img8" size="55" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($sname . '_img8'));
    ?>
" /><?php 
    weaverii_media_lib_button($sname . '_img8');
    ?>
			</td>
		</tr>

		</table>
		<input class="button-primary" type="submit" name="weaverii_pro_save_pro" value="Save Slider Options"/>
</div>
<?php 
}
function weaveriip_sc_add($i)
{
    $opt_base = 'wvpsc_' . $i . '_';
    if ($i & 1) {
        echo "<div style=\"width:99%;background:#eee;padding:4px;border-right:2px solid #eee;\">\n";
    } else {
        echo "<div style=\"width:99%;padding:4px;border:1px solid #ddd;\">\n";
    }
    ?>

	<strong><em>Define Custom Shortcode</em></strong>
<?php 
    if (weaverii_pro_getopt($opt_base . 'id') != '') {
        echo '&nbsp;&nbsp;To use, add <code>[weaver_sc id="' . trim(weaverii_pro_getopt($opt_base . 'id')) . '"]</code> wherever shortcodes are supported.';
    }
    ?>
	<br /><div style="margin-left:12px;">
	<strong>Shortcode ID:</strong>
	<input name="<?php 
    echo $opt_base . 'id';
    ?>
" id="<?php 
    echo $opt_base . 'id';
    ?>
" type="text" style="width:100px;height:20px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_pro_getopt($opt_base . 'id'));
    ?>
" />
	&nbsp;<small>Enter an ID name for your shortcode - your choice (will be filtered to valid format)</small><br />
	<strong>Shortcode definition:</strong><br />
	<textarea name="<?php 
    echo $opt_base . 'text';
    ?>
" rows=4 style="width: 600px"><?php 
    weaverii_esc_textarea(weaverii_pro_getopt($opt_base . 'text'));
    ?>
</textarea>

	<br>
	</div>
<?php 
    echo "</div>\n";
}
    function form($instance)
    {
        $title = isset($instance['title']) ? $instance['title'] : '';
        $start = isset($instance['start']) ? absint($instance['start']) : 1;
        $end = isset($instance['end']) ? absint($instance['end']) : 64;
        $list = isset($instance['list']) ? $instance['list'] : '';
        ?>
			  <p>
			  <label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        echo 'Title:';
        ?>
</label>
			  <input type="text" class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        weaverii_esc_textarea($title);
        ?>
" />
			  </p>
			  <p><label for="<?php 
        echo $this->get_field_id('start');
        ?>
">Start number:</label>
			  <input id="<?php 
        echo $this->get_field_id('start');
        ?>
" name="<?php 
        echo $this->get_field_name('start');
        ?>
" type="text" value="<?php 
        weaverii_esc_textarea($start);
        ?>
" size="3" />
			  </p>
			  <p><label for="<?php 
        echo $this->get_field_id('end');
        ?>
">End number:</label>
			  <input id="<?php 
        echo $this->get_field_id('end');
        ?>
" name="<?php 
        echo $this->get_field_name('end');
        ?>
" type="text" value="<?php 
        weaverii_esc_textarea($end);
        ?>
" size="3" />
			  </p>
			  <p style="text-align:center;"><em>- or -</em></p>
			  <p><label for="<?php 
        echo $this->get_field_id('list');
        ?>
">Comma separated list of numbers:</label>
			  <input id="<?php 
        echo $this->get_field_id('list');
        ?>
" name="<?php 
        echo $this->get_field_name('list');
        ?>
" type="text" value="<?php 
        weaverii_esc_textarea($list);
        ?>
" size="24" />
			  </p>

			  <p><em>Select Buttons to display from the Weaver II Pro Shortcodes menu. You can style with '.weaver-buttons'.</em>
			  </p>
<?php 
    }
function weaveriip_css_row($row)
{
    // echo a CSS row
    if ($row['id'][0] == '_') {
        ?>
	<tr><th scope="row" align="left" style="color:blue"><br /><a name="<?php 
        echo $row['id'];
        ?>
"></a><?php 
        weaverii_esc_textarea($row['tag']);
        ?>
&nbsp;&nbsp;</th>
		<td ><br /><?php 
        weaverii_esc_textarea($row['info']);
        ?>
&nbsp;&nbsp;&nbsp;<a href="#total_css_top"><strong>Top</strong></a>
		<span style="float:right;"><input class="button-primary" type="submit" name="weaverii_pro_save_pro" value="Save Total CSS Options"/></span>
		</td>
	</tr>
<?php 
    } else {
        $rows = weaverii_pro_getopt('css_edit_lines');
        if (!$rows) {
            $rows = 1;
        }
        ?>
	<tr><th scope="row" align="right" style="width:220px"><?php 
        weaverii_esc_textarea($row['tag']);
        ?>
:&nbsp;</th>
		<td ><textarea name="<?php 
        echo $row['id'];
        ?>
" rows=<?php 
        echo $rows;
        ?>
 style="width: 300px"><?php 
        weaverii_esc_textarea(weaverii_pro_getopt($row['id']));
        ?>
</textarea> <small><?php 
        weaverii_esc_textarea($row['info']);
        ?>
</small></td>
	</tr>
<?php 
    }
}