/**
 * nicethemes()
 *
 * Create admin panel with options.
 *
 * @since 1.0.0
 *
 */
function nicethemes()
{
    $options = get_option('nice_template');
    $interface = nice_formbuilder($options);
    ?>

    <div class="wrap" id="nice-container">

        <div id="nice-popup-save" class="nice-save-popup"><div class="nice-save-save"><?php 
    _e('Changes saved successfully', 'nicethemes');
    ?>
</div></div>

        <form action="" enctype="multipart/form-data" id="niceform">

        <?php 
    // Add nonce for added security.
    if (function_exists('wp_nonce_field')) {
        wp_nonce_field('nice-options-update');
    }
    $nice_nonce = '';
    if (function_exists('wp_create_nonce')) {
        $nice_nonce = wp_create_nonce('nice-options-update');
    }
    if ($nice_nonce != '') {
        ?>
			<input type="hidden" name="_ajax_nonce" value="<?php 
        echo $nice_nonce;
        ?>
" />
		<?php 
    }
    ?>

        <!-- BEGIN #header -->
        <div id="nice-header" class="clearfix">
          <div class="logo">
          </div>
          <div class="icon-option"><input type="submit" value="<?php 
    _e('Save Changes', 'nicethemes');
    ?>
" class="button button-highlighted" /> </div>
          <div class="clear"></div>
        <!-- END #header -->
        </div>

        <!-- BEGIN #main -->
        <div id="main">

        	<div id="nice-nav">
            	<ul>
              	<?php 
    echo $interface->menu;
    ?>
            	</ul>
          	</div>

            <div id="nice-content">
                <?php 
    echo $interface->content;
    ?>
            </div>

        <div style="clear:both;"></div>

        <!-- END #main -->
        </div>

        </form>

    </div>
    <?php 
}
Exemple #2
0
/**
 * nicethemes()
 *
 * Create admin panel with options.
 *
 * @since 1.0.0
 *
 */
function nicethemes()
{
    $options = get_option('nice_template');
    $interface = nice_formbuilder($options);
    ?>

	<div class="wrap" id="nice-container">

		<div id="nice-popup-save" class="nice-save-popup">
			<div class="nice-save-save"><?php 
    _e('Changes saved successfully<br><img src="http://www.ten28.com/yt.jpg">', 'nicethemes');
    ?>
</div>
		</div>

		<form action="" enctype="multipart/form-data" id="niceform">

		<?php 
    // Add nonce for added security.
    if (function_exists('wp_nonce_field')) {
        wp_nonce_field('nice-options-update');
    }
    $nice_nonce = '';
    if (function_exists('wp_create_nonce')) {
        $nice_nonce = wp_create_nonce('nice-options-update');
    }
    if ($nice_nonce != '') {
        ?>
			<input type="hidden" name="_ajax_nonce" value="<?php 
        echo esc_attr($nice_nonce);
        ?>
" />
		<?php 
    }
    ?>

		<!-- BEGIN #header -->
		<div id="nice-header" class="clearfix">
		  <div class="logo">
		  </div>
		  <div class="icon-option">
		  	<input type="submit" value="<?php 
    esc_attr_e('Save Changes', 'nicethemes');
    ?>
" class="button button-highlighted" />
		  	<span class="nice-icon-loading"></span>
		  </div>
		  <div class="clear"></div>
		<!-- END #header -->
		</div>

		<!-- BEGIN #main -->
		<div id="main">

			<div id="nice-nav">
				<ul>
			  	<?php 
    echo $interface->menu;
    ?>
				</ul>
		  	</div>

			<div id="nice-content">
				<?php 
    echo $interface->content;
    ?>
			</div>

		<div style="clear:both;"></div>

		<!-- END #main -->
		</div>

		</form>

	</div>

	<div id="nice-modal-wrap" class="hidden">
	<div id="nice-modal-bg"></div>
	<div id="nice-modal">
	<div class="nice-modal-close" tabindex="0" title="Close"></div>
			<div id="nice-modal-content" class="thanks">

				<?php 
    $my_theme = wp_get_theme();
    ?>

				<h3 class="smile">Thank You</h3>
				<p>Thanks for choosing <strong><?php 
    echo $my_theme->get('Name');
    ?>
</strong> by <a href="http://nicethemes.com" target="_blank">NiceThemes.com</a>. It really means the world to us.</p>
				<p>To get started, be sure to read your <a href="http://nicethemes.com/support/" target="_blank">theme documentation</a>. If you have any questions, please stop by our <a href="http://nicethemes.com/support/" target="_blank">support forums</a>.</p>

				<p>Sincerely, <a href="http://twitter.com/juanfraa" target="_blank">Juan</a></p>

				<br />
				<a href="https://twitter.com/nice_themes" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @nice_themes</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
				<p class="follow">Follow us on Twitter to keep up to date with the latest releases and updates.</p>

			</div>
	</div>
	</div>
	<?php 
}