function themeoptions_page()
{
    if ($_POST['update_themeoptions'] == 'true') {
        themeoptions_update();
    }
    ?>
<div class="wrap">
<div id="icon-themes" class="icon32"><br /></div>
<h2 style="text-shadow:1px 1px 1px #ccc">Simple Notes Menu Management</h2>
<form method="POST" action="">
<input type="hidden" name="update_themeoptions" value="true" />
<h3 style="text-shadow:3px 3px 1px #ccc;font-size:2em;text-align:center">Setting Social Menu</h3>
<table width="100%" border="0">
<tr>
	<td valign="top" width="33%">
<p><label for="feed">RSS Feed</label><br /><input type="text" name="feed" id="feed" size="32" value="<?php 
    echo get_option('simple_feed');
    ?>
"/></p><p><small><strong>Example : </strong><em>http://www.nurulimam.info/feed/</em></small></p>
	</td>
	<td valign="top" width="33%">
<p><label for="twitter">Twitter</label><br /><input type="text" name="twitter" id="twitter" size="32" value="<?php 
    echo get_option('simple_twitter');
    ?>
"/></p>
<p><small><strong>Example : </strong><em>http://twitter.com/nurulimamnotes</em></small></p>
	</td>
	<td valign="top" width="33%">
<p><label for="fb">Facebook</label><br /><input type="text" name="fb" id="fb" size="32" value="<?php 
    echo get_option('simple_fb');
    ?>
"/></p><p><small><strong>Example : </strong><em>http://www.facebook.com/IamStevenTylers</em></small></p>
	</td>
</tr>
</table>
<p><input type="submit" name="search" value="Save" class="button button-primary" /></p></form></div>

	<?php 
}
Пример #2
0
function themeoptions_page()
{
    // here is the main function that will generate our options page
    if ($_POST['update_themeoptions'] == 'true') {
        themeoptions_update();
    }
    ?>
	<div class="wrap">
		<div id="icon-themes" class="icon32"><br /></div>
		<h2>Opcions de l'aparença</h2>

		<form method="POST" action="">
			<input type="hidden" name="update_themeoptions" value="true" />
			
			<h4>Estil personalitzat</h4>
			<select name ="colour">
				<?php 
    $colour = get_option('xtec_encurs_colour');
    ?>
				<option value="dark_cyan" <?php 
    if ($colour == 'dark_cyan') {
        echo 'selected';
    }
    ?>
 >Dark Cyan Stylesheet</option>
				<option value="yellow_2" <?php 
    if ($colour == 'yellow_2') {
        echo 'selected';
    }
    ?>
 >Yellow 2 Stylesheet</option>
				<option value="yellow_green" <?php 
    if ($colour == 'yellow_green') {
        echo 'selected';
    }
    ?>
>Yellow Green Stylesheet</option>
				<option value="dark_slate_gray" <?php 
    if ($colour == 'dark_slate_gray') {
        echo 'selected';
    }
    ?>
>Dark Slate Gray Stylesheet</option>
				<option value="clear_cyan" <?php 
    if ($colour == 'clear_cyan') {
        echo 'selected';
    }
    ?>
>Clear Cyan Stylesheet</option>
			</select>

			<h4>Imatge de la capçalera</h4>
			<p><input type="text" name="imageurl" id="imageurl" size="96" value="<?php 
    echo get_option('xtec_encurs_imageurl');
    ?>
"/> URL de la imatge</p>

			<h4>Bloc principal</h4>
			<p><input type="text" name="mainurl" id="mainurl" size="96" value="<?php 
    echo get_option('xtec_encurs_mainurl');
    ?>
"/> URL del bloc</p>

			<h4>Nom de la pàgina d'inici</h4>
			<p><input type="text" name="homename" id="homename" size="32" value="<?php 
    echo get_option('xtec_encurs_homename');
    ?>
"/></p>

			<p><input type="submit" name="search" value="Desa els canvis" class="button" /></p>
		</form>

	</div>
	<?php 
}
Пример #3
0
function themeoptions_page()
{
    if ($_POST['update_themeoptions'] == 'true') {
        themeoptions_update();
    }
    //check options update
    // here's the main function that will generate our options page
    ?>
	<div class="wrap">
		<div id="icon-themes" class="icon32"><br /></div>
		<h2>IMBALANCE Theme Options</h2>

		<form method="POST" action="">
			<input type="hidden" name="update_themeoptions" value="true" />

			<h3>Your social links</h3>
			
			
<table width="90%" border="0">
  <tr>
    <td valign="top" width="50%"><p><label for="fbkurl"><strong>Facebook URL</strong></label><br /><input type="text" name="fbkurl" id="fbkurl" size="32" value="<?php 
    echo get_option('imbalance_fbkurl');
    ?>
"/></p><p><small><strong>example:</strong><br /><em>http://www.facebook.com/wpshower</em></small></p></td>
    <td valign="top"width="50%"><p><label for="twturl"><strong>Twitter URL</strong></label><br /><input type="text" name="twturl" id="twturl" size="32" value="<?php 
    echo get_option('imbalance_twturl');
    ?>
"/></p><p><small><strong>example:</strong><br /><em>http://twitter.com/wpshower</em></small></p>
</td>
  </tr>
</table>

			<h3>Custom logo</h3>
			
			
<table width="90%" border="0">
  <tr>
    <td valign="top" width="50%"><p><label for="custom_logo"><strong>URL to your custom logo</strong></label><br /><input type="text" name="custom_logo" id="custom_logo" size="32" value="<?php 
    echo get_option('imbalance_custom_logo');
    ?>
"/></p><p><small><strong>Usage:</strong><br /><em><a href="<?php 
    bloginfo("url");
    ?>
/wp-admin/media-new.php">Upload your logo</a> (461 x 70px) using WordPress Media Library and insert its URL here</em></small></p></td>
    <td valign="top"width="50%"><p>
    	        <?php 
    ob_start();
    ob_implicit_flush(0);
    echo get_option('imbalance_custom_logo');
    $my_logo = ob_get_contents();
    ob_end_clean();
    if ($my_logo == '') {
        ?>
        		<a href="<?php 
        bloginfo("url");
        ?>
/">
				<img src="<?php 
        bloginfo('template_url');
        ?>
/images/logo.png" alt="<?php 
        bloginfo('name');
        ?>
"></a>
        		<?php 
    } else {
        ?>
        		<a href="<?php 
        bloginfo("url");
        ?>
/"><img src="<?php 
        echo get_option('imbalance_custom_logo');
        ?>
"></a>       		
        		<?php 
    }
    ?>
    </p>
</td>
  </tr>
</table>

			<h3>Advanced options</h3>
			
			
<table width="90%" border="0">
<tr>
    <td valign="top" width="50%"><p><label for="excln"><strong>Excerpt lenght (in words)</strong></label><br /><input type="text" name="excln" id="excln" size="32" value="<?php 
    echo get_option('imbalance_excln');
    ?>
"/><p><small><strong>Dafault value:</strong><em>35<br />- clean the field to disable excerpt completely<br />- automatically disabled if advanced-excerpt plugin is installed</em></small></p>
    </td>

    <td valign="top"width="50%">
	<p><input type="checkbox" name="gallery_off" id="gallery_off" <?php 
    echo get_option('imbalance_gallery_off');
    ?>
 />
	<label for="gallery_off"><strong>Disable jQuery Gallery?</strong><br /></label>
	</p>
	<p><small><em>Select the checkbox to disable jQuery Photo-Galleria<br />on your posts and pages in favour of WordPress photo gallery</em></small></p>
	<br />
	<p><input type="checkbox" name="sidebar_off" id="sidebar_off" <?php 
    echo get_option('imbalance_sidebar_off');
    ?>
 />
	<label for="sidebar_off"><strong>Disable Featured Posts on top of Sidebar?</strong><br /></label></p>
	<p><small><em>Select the checkbox to disable featured posts display on top of your sidebar</em></small></p>	
	</td>

  </tr>
</table>
			
			
			
			<p><input type="submit" name="search" value="Update Options" class="button button-primary" /></p>
		</form>

	</div>
	<?php 
}
Пример #4
0
function themeoptions_page()
{
    if (isset($_POST['update_themeoptions'])) {
        themeoptions_update();
    }
    //check options update
    ?>
	<div class="wrap">
		<div id="icon-themes" class="icon32"><br /></div>
		<h2><?php 
    _e('Theme Options', 'ari');
    ?>
</h2>

		<form method="POST" action="">
			<input type="hidden" name="update_themeoptions" value="true" />
			
			<table class="form-table" style="margin-bottom: 50px;">
			<h3><?php 
    _e('Switch to the dark theme version', 'ari');
    ?>
</h3>
			<tr valign="top">
				<th scope="row"><label for="dark-style"><?php 
    _e('Ari dark theme version', 'ari');
    ?>
</label></th>
				<td><input type="checkbox" name="dark-style" id="dark-style" <?php 
    echo get_option('ari_dark-style');
    ?>
 /><?php 
    _e(' check the box, if you want to use the dark theme version', 'ari');
    ?>
</h4></td>
			</tr>
 			</table>
			
			<table class="form-table" style="margin-bottom: 50px;">
			<h3><?php 
    _e('Change the Theme Colors', 'ari');
    ?>
</h3>
			<p class="description"><?php 
    _e('(You can find out the HEX value of any color with the <a href="http://chir.ag/projects/name-that-color/" target="_blank">Name that Color</a> online-tool)', 'ari');
    ?>
</p>
			<tr valign="top">
				<th scope="row"><label for="background-color"><?php 
    _e('Background Color', 'ari');
    ?>
</label></th>
				<td><input type="text" name="background-color" id="background-color" size="32" value="<?php 
    echo get_option('ari_background-color');
    ?>
"/> <span class="description"><?php 
    _e(' e.g. #FFFFFF or white (default color: white)', 'ari');
    ?>
</span></td>
			</tr>
  			<tr valign="top">
				<th scope="row"><label for="linkcolor-1"><?php 
    _e('First Link Color', 'ari');
    ?>
</label></th>
				<td><input type="text" name="linkcolor-1" id="linkcolor-1" size="32" value="<?php 
    echo get_option('ari_linkcolor-1');
    ?>
"/> <span class="description"><?php 
    _e(' e.g. #0000FF or blue (default green link color: #88C34B)', 'ari');
    ?>
</span></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="linkcolor-2"><?php 
    _e('Second Link Color', 'ari');
    ?>
</label></th>
				<td><input type="text" name="linkcolor-2" id="linkcolor-2" size="32" value="<?php 
    echo get_option('ari_linkcolor-2');
    ?>
"/> <span class="description"><?php 
    _e(' e.g. #FF0000 or red (default grey link color: #999999)', 'ari');
    ?>
</span></td>
			</tr>			
			<tr valign="top">
				<th scope="row"><label for="text-color"><?php 
    _e('Text Color', 'ari');
    ?>
</label></th>
				<td><input type="text" name="text-color" id="text-color" size="32" value="<?php 
    echo get_option('ari_text-color');
    ?>
"/> <span class="description"><?php 
    _e(' e.g. #4C4C4C (default text color: #4C4C4C)', 'ari');
    ?>
</span></td>
			</tr>
 			</table>
			
			<table class="form-table" style="margin-bottom: 10px;">
			<h3><?php 
    _e('Use an image as your logo', 'ari');
    ?>
</h3>
			<tr valign="top">
				<th scope="row"><label for="logo-image"><?php 
    _e('Logo Image URL', 'ari');
    ?>
</label></th>
				<td><input type="text" name="logo-image" id="logo-image" size="70" value="<?php 
    echo get_option('ari_logo-image');
    ?>
"/><br/><span
                            class="description"> <a href="<?php 
    echo home_url();
    ?>
/wp-admin/media-new.php" target="_blank"><?php 
    _e('Upload your logo image', 'ari');
    ?>
</a> <?php 
    _e(' using the WordPress Media Library and insert the URL here<br/>(the maximum logo image size is: 240 x 75 Pixel)', 'ari');
    ?>
 </span><br/><br/><img src="<?php 
    echo get_option('logo-image') ? get_option('logo-image') : get_template_directory_uri() . '/images/logo.png';
    ?>
"
                     alt=""/></td>
			</tr>
			</table>
			
			<p><input type="submit" name="search" value="<?php 
    _e('Update Options', 'ari');
    ?>
" class="button button-primary" /></p>
		</form>

	</div>
	<?php 
}
Пример #5
0
<?php

function themeoptions_admin_menu()
{
    add_theme_page("主题选项", "主题选项", 'edit_themes', basename(__FILE__), 'themeoptions_page');
}
if ($_POST['update_themeoptions'] == 'true') {
    themeoptions_update();
}
function themeoptions_update()
{
    update_option('blog_keywords', $_POST['blog_keywords']);
    update_option('blog_description', $_POST['blog_description']);
    update_option('blog_sinaweibo', $_POST['blog_sinaweibo']);
    update_option('blog_tencentweibo', $_POST['blog_tencentweibo']);
    update_option('blog_qq', $_POST['blog_qq']);
    update_option('blog_rss', $_POST['blog_rss']);
    update_option('blog_about', stripslashes($_POST['blog_about']));
    update_option('blog_copyright', stripslashes($_POST['blog_copyright']));
    update_option('blog_stats', stripslashes($_POST['blog_stats']));
    update_option('blog_mail_host', $_POST['blog_mail_host']);
    update_option('blog_mail_port', $_POST['blog_mail_port']);
    update_option('blog_mail_username', $_POST['blog_mail_username']);
    update_option('blog_mail_password', $_POST['blog_mail_password']);
    update_option('blog_mail_from', $_POST['blog_mail_from']);
    update_option('blog_protection_name', $_POST['blog_protection_name']);
    update_option('blog_protection_mail', $_POST['blog_protection_mail']);
    update_option('blog_slider_img1', $_POST['blog_slider_img1']);
    update_option('blog_slider_txt1', $_POST['blog_slider_txt1']);
    update_option('blog_slider_url1', $_POST['blog_slider_url1']);
    update_option('blog_slider_img2', $_POST['blog_slider_img2']);
Пример #6
0
function themeoptions_page()
{
    if ($_POST['update_themeoptions'] == 'true') {
        themeoptions_update();
    }
    //check options update
    // here's the main function that will generate our options page
    ?>
	<div class="wrap">
		<div id="icon-themes" class="icon32"><br /></div>
		<h2>PARAGRAMS Theme Options</h2>

		<form method="POST" action="">
			<input type="hidden" name="update_themeoptions" value="true" />

			<h3>Your social links</h3>
			
			
<table width="90%" border="0">
  <tr>
    <td valign="top" width="50%"><p><label for="fbkurl">Facebook URL</label><br /><input type="text" name="fbkurl" id="fbkurl" size="32" value="<?php 
    echo get_option('paragrams_fbkurl');
    ?>
"/></p><p><small><strong>example:</strong><br /><em>http://www.facebook.com/wpshower</em></small></p></td>
    <td valign="top" width="50%"><p><label for="twturl">Twitter URL</label><br /><input type="text" name="twturl" id="twturl" size="32" value="<?php 
    echo get_option('paragrams_twturl');
    ?>
"/></p><p><small><strong>example:</strong><br /><em>http://twitter.com/wpshower</em></small></p>
</td>
  </tr>
</table>
			
			<h3>Custom logo</h3>
			
			
<table width="90%" border="0">
  <tr>
    <td valign="top" width="50%"><p><label for="custom_logo"><strong>URL to your custom logo</strong></label><br /><input type="text" name="custom_logo" id="custom_logo" size="32" value="<?php 
    echo get_option('paragrams_custom_logo');
    ?>
"/></p><p><small><strong>Usage:</strong><br /><em><a href="<?php 
    bloginfo("url");
    ?>
/wp-admin/media-new.php">Upload your logo</a> (483 x 100px) using WordPress Media Library and insert its URL here</em></small></p></td>
    <td valign="top"width="50%"><p>
    	        <?php 
    ob_start();
    ob_implicit_flush(0);
    echo get_option('paragrams_custom_logo');
    $my_logo = ob_get_contents();
    ob_end_clean();
    if ($my_logo == '') {
        ?>
        		<a href="<?php 
        bloginfo("url");
        ?>
/">
				<img src="<?php 
        bloginfo('template_url');
        ?>
/images/logo.png" alt="<?php 
        bloginfo('name');
        ?>
"></a>
        		<?php 
    } else {
        ?>
        		<a href="<?php 
        bloginfo("url");
        ?>
/"><img src="<?php 
        echo get_option('paragrams_custom_logo');
        ?>
"></a>       		
        		<?php 
    }
    ?>
    </p>
</td>
  </tr>
</table>			
			
			<p><input type="submit" name="search" value="Update Options" class="button button-primary" /></p>
		</form>

	</div>
	<?php 
}
Пример #7
0
function themeoptions_page()
{
    if ($_POST['update_themeoptions'] == 'true') {
        themeoptions_update();
    }
    // check options update
    // here's the main function that will generate our options page
    ?>

  <div class="wrap">
    <div id="icon-themes" class="icon32">
      <br />
    </div>
    <h2>TCS Theme Options</h2>

    <form method="POST" action="" enctype="multipart/form-data">
      <input type="hidden" name="update_themeoptions" value="true" />
      <h3>TopCoder API settings</h3>
      <table width="100%">
        <tr>
          <?php 
    $field = 'forumPostPerPage';
    ?>
          <td width="150"><label for="<?php 
    echo $field;
    ?>
">Forum post per page:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
      </table>
      <br />
      <h3>Blog</h3>
      <table width="100%">
        <tr>
          <?php 
    $field = 'blog_page_title';
    ?>
          <td width="150"><label for="<?php 
    echo $field;
    ?>
">Blog Page Title:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
        <tr>
          <?php 
    $field = 'case_studies_per_page';
    ?>
          <td width="150"><label for="<?php 
    echo $field;
    ?>
">Case studies post per page:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
      </table>
      <br />
      <h3>Social Media Links</h3>
      <table width="100%">
        <tr>
          <?php 
    $field = 'facebookURL';
    ?>
          <td width="150"><label for="<?php 
    echo $field;
    ?>
">Facebook URL:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
        <tr>
          <?php 
    $field = 'twitterURL';
    ?>
          <td><label for="<?php 
    echo $field;
    ?>
">Twitter URL:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
        <tr>
          <?php 
    $field = 'linkedInURL';
    ?>
          <td><label for="<?php 
    echo $field;
    ?>
">LinkedIn URL:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
        <tr>
          <?php 
    $field = 'gPlusURL';
    ?>
          <td><label for="<?php 
    echo $field;
    ?>
">Google Plus URL:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
      </table>
      <br />
      <h3>Twitter OAuth Tokens</h3>
      <table width="100%">
        <tr>
          <?php 
    $field = 'twConsumerKey';
    ?>
          <td width="150"><label for="<?php 
    echo $field;
    ?>
">Consumer key:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
        <tr>
          <?php 
    $field = 'twConsumerSecret';
    ?>
          <td><label for="<?php 
    echo $field;
    ?>
">Consumer secret:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
        <tr>
          <?php 
    $field = 'twAccessToken';
    ?>
          <td><label for="<?php 
    echo $field;
    ?>
">Access token:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
        <tr>
          <?php 
    $field = 'twAccessTokenSecret';
    ?>
          <td><label for="<?php 
    echo $field;
    ?>
">Access token secret:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
      </table>
      <br />

      <h3>Challenge Pages Configuration</h3>
      <table width="100%">
        <tr>
          <?php 
    $field = 'tcoTooltipTitle';
    ?>
          <td width="150"><label for="<?php 
    echo $field;
    ?>
">TCO Tooltip Title:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
        <tr>
          <?php 
    $field = 'tcoTooltipMessage';
    ?>
          <td><label for="<?php 
    echo $field;
    ?>
">TCO Tooltip Message:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" value="<?php 
    echo get_option($field);
    ?>
" /></td>
        </tr>
      </table>
      <br />

      <h3>JS/CSS Optimations and Config cache</h3>
      <table width="100%">
        <tr>
          <p>Settings have been moved to config.json.</p>
        </tr>
        <tr>
          <?php 
    $field = "jssCssReset";
    ?>
          <td width="150"><label for="<?php 
    $field;
    ?>
">Reset JS/CSS Registry and Config cache:</label></td>
          <td>
            <input type="radio" name="<?php 
    echo $field;
    ?>
" value="1" <?php 
    if (get_option($field) == 1) {
        ?>
checked="checked"<?php 
    }
    ?>
 /> Yes
            <input type="radio" name="<?php 
    echo $field;
    ?>
" value="0" <?php 
    if (get_option($field) != 1) {
        ?>
checked="checked"<?php 
    }
    ?>
 /> No
          </td>
        </tr>
      </table>

      <h3>Post Domain Copy</h3>
      <table width="100%">
        <tr>
          <?php 
    $field = "postCopy";
    ?>
          <td width="150"><label for="<?php 
    $field;
    ?>
">Preform Post Domain Copy Steps:</label></td>
          <td>
            <input type="radio" name="<?php 
    echo $field;
    ?>
" value="1" <?php 
    if (get_option($field) == 1) {
        ?>
checked="checked"<?php 
    }
    ?>
 /> Yes
            <input type="radio" name="<?php 
    echo $field;
    ?>
" value="0" <?php 
    if (get_option($field) != 1) {
        ?>
checked="checked"<?php 
    }
    ?>
 /> No
          </td>
        </tr>
        <tr>
          <?php 
    $field = 'newURL';
    ?>
          <td><label for="<?php 
    echo $field;
    ?>
">New Site URL:</label></td>
          <td><input type="text" id="<?php 
    echo $field;
    ?>
" name="<?php 
    echo $field;
    ?>
" size="100" /></td>
        </tr>
      </table>
      <p>
        <input type="submit" name="submit" value="Update Options" class="button button-primary" />
      </p>
    </form>

  </div>
<?php 
}
Пример #8
0
function themeoptions_page()
{
    // here's the main function that will generate our options page
    if ($_POST['update_themeoptions'] == 'true') {
        themeoptions_update();
    }
    //if ( get_option() == "checked"
    ?>
    <div class="wrap">
        <div id="icon-themes" class="icon32"><br /></div>
        <h2>Theme Options</h2>

        <form method="POST" action="">
            <input type="hidden" name="update_themeoptions" value="true" />

            <h4>Home Icon in Nav</h4>
            <select name ="homeIcon">
                <?php 
    $showHome = get_option('mytheme_display_home');
    ?>
                <option value="visable" <?php 
    if ($showHome == 'display') {
        echo 'selected';
    }
    ?>
 >Display</option>
                <option value="hidden" <?php 
    if ($showHome == 'hidden') {
        echo 'selected';
    }
    ?>
>Hide</option>
            </select>

            <h4>Contact Us Icon in Nav <span style="color:red;">* Contact page must be called "Contact Us".</span></h4>
            <select name ="contactIcon">
                <?php 
    $showContactUs = get_option('mytheme_display_contact');
    ?>
                <option value="visable" <?php 
    if ($showContactUs == 'display') {
        echo 'selected';
    }
    ?>
 >Display</option>
                <option value="hidden" <?php 
    if ($showContactUs == 'hidden') {
        echo 'selected';
    }
    ?>
>Hide</option>
            </select>

            <h4>Menu Type</h4>
            <select name ="menu">
                <?php 
    $menuType = get_option('mytheme_menu_type');
    ?>
                <!--<option value="mega" <?php 
    //if ($menuType=='mega') { echo 'selected'; }
    ?>
 >Mega Menu</option>-->
                <option value="dropdown" <?php 
    if ($menuType == 'dropdown') {
        echo 'selected';
    }
    ?>
>Drop-Down Menu</option>
                <option value="single" <?php 
    if ($menuType == 'single') {
        echo 'selected';
    }
    ?>
>Single Menu</option>
            </select>

            <hr>

            <h4>Color Scheme</h4>
            <select name ="color">
                <?php 
    $color = get_option('mytheme_color');
    ?>
                <option value="oceanside" <?php 
    if ($color == 'oceanside') {
        echo 'selected';
    }
    ?>
 >Oceanside Stylesheet</option>
                <option value="orangecounty" <?php 
    if ($color == 'orangecounty') {
        echo 'selected';
    }
    ?>
>Orange County Stylesheet</option>
                <option value="pasorobles" <?php 
    if ($color == 'pasorobles') {
        echo 'selected';
    }
    ?>
>Paso Robles Stylesheet</option>
                <option value="santabarbara" <?php 
    if ($color == 'santabarbara') {
        echo 'selected';
    }
    ?>
 >Santa Barbara Stylesheet</option>
                <option value="sierra" <?php 
    if ($color == 'sierra') {
        echo 'selected';
    }
    ?>
 >Sierra Stylesheet</option>
            </select>

            <hr>

            <h4>Enable Governor Banner</h4>
            <select name ="govBanner">
                <?php 
    $showGovBanner = get_option('mytheme_display_govBanner');
    ?>
                <option value="visable" <?php 
    if ($showGovBanner == 'display') {
        echo 'selected';
    }
    ?>
 >Display</option>
                <option value="hidden" <?php 
    if ($showGovBanner == 'hidden') {
        echo 'selected';
    }
    ?>
>Hide</option>
            </select>

            <hr>

            <h4>Enable Homepage Header Slider</h4>
            <select name ="homeSlider">
                <?php 
    $showHomepageSlider = get_option('mytheme_display_homepageSlider');
    ?>
                <option value="visable" <?php 
    if ($showHomepageSlider == 'display') {
        echo 'selected';
    }
    ?>
 >Display</option>
                <option value="hidden" <?php 
    if ($showHomepageSlider == 'hidden') {
        echo 'selected';
    }
    ?>
>Hide</option>
            </select>

            <hr>

            <h4>Social Media</h4>
            <p><input type="text" name="facebook_info" id="facebook_info" size="15" value="<?php 
    echo get_option('mytheme_facebook_info');
    ?>
" /> Facebook ID<br><a href="http://findmyfbid.com/" title="Find My Facebook ID">How to find my Facebook ID?</a></p>

            <p><input type="text" name="twitter_username" id="twitter_username" size="31" value="<?php 
    echo get_option('mytheme_twitter_username');
    ?>
" placeholder="@TwitterHandle" /> Twitter Username</p>

            <p><input type="text" name="instagram_username" id="instagram_username" size="31" value="<?php 
    echo get_option('mytheme_instagram_username');
    ?>
" placeholder="@InstagramHandle" /> Instagram Username</p>

            <p><input type="text" name="google_username" id="google_username" value="<?php 
    echo get_option('mytheme_google_username');
    ?>
" placeholder="http://google.com/" /> Google+ URL</p>

            <hr>

            <h4>Google Analytics</h4>
            <p><input type="text" name="googleanalytics" id="googleanalytics" size="14" value="<?php 
    echo get_option('mytheme_googleanalytics');
    ?>
" placeholder="UA-XXXXXXXX-XX"/> Google Analytics Tracking ID</p>

            <p><input type="text" name="mydomain" id="mydomain" value="<?php 
    echo get_option('mytheme_mydomain');
    ?>
" placeholder="yourdomain.com"/> Your Domain</p>

            <p><input type="submit" name="search" value="Update Options" class="button" /></p>
        </form>

    </div>
    <?php 
}
Пример #9
0
function theme_options_do_page()
{
    ?>
	<div class="buttons"><input type="button" id="social_btn" value="Social Links"/><input type="button" id="favicon_btn" value="FavIcon"/><input type="button" id="custom_css_btn" value="Custom Css"/></div>
	<div class="social_tab" <?php 
    if (isset($_POST['fav_submit']) || isset($_POST['custom_css'])) {
        ?>
  style="display:none;"<?php 
    } elseif (isset($_POST['req_submit'])) {
        ?>
 style="display:block;" <?php 
    }
    ?>
 >
	<?php 
    if (isset($_POST['update_themeoptions']) == 'true') {
        themeoptions_update();
    }
    ?>
	
	<div class="wrap">
	<div id="social_options">
		<h2>Social Icon Links</h2>
		<form method="post" action="" name="social_form" id="social_form" >
			<input type="hidden" name="update_themeoptions" value="true" />
			<label>Facebook URL</label><br />
			<input type="text" name="facebook_url" size="40" id="fb" value="<?php 
    echo get_option('facebook_url');
    ?>
"/><br />
			<label>Twitter URL</label><br />
			<input type="text" name="twitter_url" size="40" id="tw"  value="<?php 
    echo get_option('twitter_url');
    ?>
"/><br />
			<label>LinkedIn URL</label><br />
			<input type="text" name="linked_url" size="40" id="in"  value="<?php 
    echo get_option('linked_url');
    ?>
"/><br />
			<label>Plannen URL</label><br />
			<input type="text" name="plannen_url" size="40" id="pl"  value="<?php 
    echo get_option('plannen_url');
    ?>
"/><br />
			<input id="btn" type="submit" value="Save" name="req_submit" />	
		</form>
	</div>
</div>
	<style>
	#social_options{
		width: 50%;
		}
	#social_options label {
    font-size: 15px;
    font-weight: bold;
    padding: 0 0 12px;
	}
	#social_options input {
    margin: 0 0 25px;
	}
	#social_options form {
    margin-left: 25px;
	margin-top:35px;
	}	
	#social_options #btn {
    cursor: pointer;
    width: 100px;
	}
	
	</style>	
	
	</div><!--social_tab-->
	
	<div class="favicon_tab" <?php 
    if (isset($_POST['fav_submit'])) {
        ?>
 style="display:block;"<?php 
    } else {
        ?>
 style="display:none;"<?php 
    }
    ?>
>
	<?php 
    if (isset($_POST['update_themeoptions1']) == 'true') {
        $upload = wp_upload_bits($_FILES["favicon_image_url"]["name"], null, file_get_contents($_FILES["favicon_image_url"]["tmp_name"]));
        $upload_path = wp_upload_dir();
        $path = $upload_path["url"];
        $name = $_FILES["favicon_image_url"]["name"];
        $image_url = $path . "/" . $name;
        themeoptions_update1($image_url);
    }
    ?>
	
	<div class="wrap">
	<div id="social_options">
		<h2>Fav Icon</h2>
		<form method="post" action="" name="social_form" id="fav_icon_form" enctype="multipart/form-data" >
			<input type="hidden" name="update_themeoptions1" value="true" />
			<label>Fav Icon</label><br />
			<input type="file" name="favicon_image_url" id="favicon_img" size="40" id="fb" value="<?php 
    echo get_option('favicon_image_url');
    ?>
"  accept="image/*"  onchange="showMyImage(this)"  /><br />
			<input id="btn1" type="submit" value="Save" name="fav_submit" />	
			 <br/>
<?php 
    if (get_option('favicon_image_url')) {
        ?>
	<img id="thumbnil"  src="<?php 
        echo get_option('favicon_image_url');
        ?>
" alt="image" height="100" width="100" />
	<?php 
    } else {
        ?>
	<img id="thumbnil" style="width:20%; margin-top:10px;display:none;"  src="" alt="image"  height="100" width="100"/>
	<?php 
    }
    ?>
		</form>
	</div>
</div>

<?php 
    ?>
	
	</div><!--favicon_tab-->
	
	<div class="custom_css_tab" <?php 
    if (isset($_POST['custom_css'])) {
        ?>
 style="display:block;"<?php 
    } else {
        ?>
 style="display:none;"<?php 
    }
    ?>
>
	
	
	<?php 
    /* custom css  start*/
    /*function custom_css_admin_page_content() {
    	?>*/
    ?>
<style>
textarea {
resize: none;
}

div.msg {
border-left: 4px solid #7ad03a;
padding: 1px 12px;
background-color: #fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);

}
.media-upload-form div.error, .wrap div.error, .wrap div.msg {
margin: 5px 0 15px;
}
p {
font-size: 13px;
line-height: 1.5;
margin: 1em 0;
}
</style>
	<?php 
    if (isset($_POST['custom_css'])) {
        themeoptions_update2();
        /*echo "available	";*/
    }
    // The default message that will appear
    $custom_css_default = __('/*
Welcome to the Custom CSS editor!
 
Please add all your custom CSS here and avoid modifying the core theme files, since that\'ll make upgrading the theme problematic. Your custom CSS will be loaded after the theme\'s stylesheets, which means that your rules will take precedence. Just add your CSS here for what you want to change, you don\'t need to copy all the theme\'s style.css content.
*/');
    $custom_css = get_option('custom_css', $custom_css_default);
    ?>
    <div class="wrap">
        
 
        <form id="custom_css_form" method="post" action="" style="margin-top: 15px;">
		<?php 
    if (isset($_POST['custom_css'])) {
        ?>
<div id="message" class="msg"><p><strong> Custom CSS Updated.
		</strong></p></div>
		<?php 
    }
    ?>
		
 <!--<div id="icon-themes" class="icon32"></div>-->
        <h2><?php 
    _e('Custom CSS');
    ?>
</h2>
	
		
            <?php 
    //settings_fields( 'custom_css' );
    ?>
 
            <textarea id="custom_css_textarea" name="custom_css"  style="border: 1px solid #DFDFDF; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; width: 100%; height: 400px; position: relative;"><?php 
    echo $custom_css;
    ?>
</textarea>
            <p><input type="submit" name="custom_css_sub" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" /></p>
        </form>
    </div>
<?php 
    /*}*/
    ?>
	</div>
<?php 
}