예제 #1
0
function woothemes_options_page()
{
    $options = get_option('woo_template');
    $themename = get_option('woo_themename');
    $shortname = get_option('woo_shortname');
    $manualurl = get_option('woo_manual');
    //Framework Version in Backend Header
    $woo_framework_version = get_option('woo_framework_version');
    //Version in Backend Header
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    $local_version = $theme_data['Version'];
    //GET themes update RSS feed and do magic
    include_once ABSPATH . WPINC . '/feed.php';
    $pos = strpos($manualurl, 'documentation');
    $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13));
    //13 for the word documentation
    //add filter to make the rss read cache clear every 4 hours
    //add_filter( 'wp_feed_cache_transient_lifetime', create_function( '$a', 'return 14400;' ) );
    //Check for latest version of the theme
    $update_message = '';
    if (get_option('framework_woo_theme_version_checker') == 'true') {
        $update_message = woothemes_version_checker($local_version);
    }
    ?>
<div class="wrap" id="woo_container">
<div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save">Options Updated</div></div>
<div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset">Options Reset</div></div>
    <form action="" enctype="multipart/form-data" id="wooform">
        <div id="header">
           <div class="logo">
				<?php 
    if (get_option('framework_woo_backend_header_image')) {
        ?>
                <img alt="" src="<?php 
        echo get_option('framework_woo_backend_header_image');
        ?>
"/>
                <?php 
    } else {
        ?>
                <img alt="WooThemes" src="<?php 
        echo bloginfo('template_url');
        ?>
/functions/images/logo.png"/>
                <?php 
    }
    ?>
            </div>
             <div class="theme-info">
				<span class="theme"><?php 
    echo $themename;
    ?>
 <?php 
    echo $local_version;
    ?>
</span>
				<span class="framework">Framework <?php 
    echo $woo_framework_version;
    ?>
</span>
			</div>
			<div class="clear"></div>
		</div>
        <?php 
    // Rev up the Options Machine
    $return = woothemes_machine($options);
    ?>
		<div id="support-links">
			<ul>
				<li class="changelog"><a title="Theme Changelog" href="<?php 
    echo $manualurl;
    ?>
#Changelog">View Changelog</a></li>
				<li class="docs"><a title="Theme Documentation" href="<?php 
    echo $manualurl;
    ?>
">View Themedocs</a></li>
				<li class="forum"><a href="http://forum.woothemes.com" target="_blank">Visit Forum</a></li>
                <li class="right"><img style="display:none" src="<?php 
    echo bloginfo('template_url');
    ?>
/functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li>
			</ul>
		</div>
        <div id="main">
	        <div id="woo-nav">
				<ul>
					<?php 
    echo $return[1];
    ?>
				</ul>		
			</div>
			<div id="content">
	         <?php 
    echo $return[0];
    /* Settings */
    ?>
	        </div>
	        <div class="clear"></div>
	        
        </div>
        <div class="save_bar_top">
        <img style="display:none" src="<?php 
    echo bloginfo('template_url');
    ?>
/functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." />
        <input type="submit" value="Save All Changes" class="button submit-button" />        
        </form>
     
        <form action="<?php 
    echo wp_specialchars($_SERVER['REQUEST_URI']);
    ?>
" method="post" style="display:inline" id="wooform-reset">
            <span class="submit-footer-reset">
            <input name="reset" type="submit" value="Reset Options" class="button submit-button reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" />
            <input type="hidden" name="woo_save" value="reset" /> 
            </span>
        </form>
       
        </div>
        <?php 
    if (!empty($update_message)) {
        echo $update_message;
    }
    ?>
    

<div style="clear:both;"></div>    
</div><!--wrap-->

 <?php 
}
예제 #2
0
 function woo_theme_update_notice()
 {
     $theme_data = get_theme_data(get_template_directory() . '/style.css');
     $local_version = $theme_data['Version'];
     $update_data = woothemes_version_checker($local_version);
     $html = '';
     if (is_array($update_data) && $update_data['is_update'] == true) {
         $html = '<div id="theme_update" class="updated fade"><p>' . sprintf(__('Theme update is available (v%s). %sDownload new version%s (%sSee Changelog%s)', 'woothemes'), $update_data['version'], '<a href="http://www.woothemes.com/products/">', '</a>', '<a href="http://www.woothemes.com/changelogs/' . $update_data['theme_name'] . '/changelog.txt" target="_blank" title="Changelog">', '</a>') . '</p></div>';
     }
     if ($html != '') {
         echo $html;
     }
 }
예제 #3
0
function woothemes_framework_settings_page()
{
    $options = get_option('woo_settings_template');
    $themename = get_option('woo_themename');
    $shortname = get_option('woo_shortname');
    $manualurl = get_option('woo_manual');
    //Version in Backend Head
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    $local_version = $theme_data['Version'];
    //GET themes update RSS feed and do magic
    include_once ABSPATH . WPINC . '/feed.php';
    $pos = strpos($manualurl, 'documentation');
    $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13));
    //13 for the word documentation
    //add filter to make the rss read cache clear every 4 hours
    add_filter('wp_feed_cache_transient_lifetime', create_function('$a', 'return 14400;'));
    //Check for latest version of the theme
    if (get_option('woo_theme_version_checker') == 'true') {
        $update_message = woothemes_version_checker($local_version);
    }
    include_once 'admin-framework-settings.php';
    // Include the page content for that
}