Example #1
0
 function test_get_theme_version()
 {
     // Only get_theme_data() way is tested
     $this->assertEqual('1.0', get_theme_version());
 }
function theme_register_javascript()
{
    wp_deregister_script('jquery');
    wp_register_script('jquery', get_jquery_dir(), '', get_theme_version(), 1);
    wp_register_script('retro_js_plugins', get_stylesheet_directory_uri() . '/js/jquery.plugins.js', '', get_theme_version(), 1);
    wp_register_script('retro_js_nivoslider', get_stylesheet_directory_uri() . '/js/jquery.nivo.slider.pack.js', '', get_theme_version(), 1);
    wp_register_script('retro_js_audio_js', get_stylesheet_directory_uri() . '/js/audio.js', '', get_theme_version(), 1);
    wp_register_script('retro_js_init', get_stylesheet_directory_uri() . '/js/retro.js', '', get_theme_version(), 1);
}
Example #3
0
function haku_theme_update_notify()
{
    $xml = haku_get_latest_theme_version();
    ?>
	
	<!-- Wrapper -->
	<div class="wrap">
		
		<!-- WP Icon -->
		<div id="icon-themes" class="icon32"></div>

		<h2 style="margin-bottom: 15px;"><?php 
    echo get_haku_var('theme_name');
    ?>
 <?php 
    echo $xml->latest;
    ?>
 <?php 
    _e('Available', 'haku');
    ?>
!</h2>
	    
	    <div class="updated"><p><strong><?php 
    printf(__('A new version of %s has just become available!', 'haku'), get_haku_var('theme_name'));
    ?>
</strong> <?php 
    printf(__('Head over %s, login into your account, switch to the "Downloads" section and re-download %s, just like you did the first time.', 'haku'), '<a href="http://themeforest.net" target="_blank">ThemeForest.net</a>', get_haku_var('theme_name'));
    ?>
</p></div>
		
		<!-- Theme picture -->
		<img style="float: left; margin: 10px 35px 0 10px;" src="<?php 
    echo get_stylesheet_directory_uri() . '/screenshot.png';
    ?>
" />
		
		<!-- Info -->
		<div style="float: left; width: 500px;">
		
			<h2 style="padding-top: 0;"><?php 
    _e('Things you should know', 'haku');
    ?>
</h2>
			<p><?php 
    printf(__('Before updating, I recommend you to perform a quick backup of your current version of %s (%s). There&rsquo;s no risk that something might corrupt your database, but you might lose any eventual change you made on the theme itself.', 'haku'), get_haku_var('theme_name'), get_theme_version());
    ?>
</p>
			<p><?php 
    _e('Your theme path:', 'haku');
    ?>
 <code><?php 
    echo TEMPLATEPATH;
    ?>
</code></p>
		    
		    <h3><?php 
    _e('How to update?', 'haku');
    ?>
</h3>
		    <p><?php 
    echo sprintf(__('Updating a theme is pretty much like installing it. Download it, extract the .zip package, find the theme folder (do not upload the entire package!). Now, if you have no idea of what a FTP connection is, simply delete the current version of %s and upload the new one. Otherwise, connect to your server, navigate to the WordPress themes folder and replace the whole theme folder.', 'haku'), get_haku_var('theme_name'));
    ?>
</p>
			
			<p><?php 
    _e('Your themes path:', 'haku');
    ?>
 <code><?php 
    echo get_theme_root();
    ?>
</code></p>
			
			<h3><?php 
    _e('I still need help.', 'haku');
    ?>
</h3>
			<p><?php 
    echo sprintf(__('If you still need help, don&rsquo;t hesitate to contact me through my ThemeForest.net %s Contact Form.', 'haku'), '<a href="http://themeforest.net/user/pacovitiello1?ref=pacovitiello1">' . __('Profile Page', 'haku') . '</a>');
    ?>
</p>
			
		</div>
		<!-- end: Info -->
		
		<div class="clear"></div>
		
	    <h3><?php 
    _e('What&rsquo;s changed?', 'haku');
    ?>
</h3>

	    <div><?php 
    echo $xml->changelog;
    ?>
</div>

	</div>
	<!-- end: Wrapper -->
	
	<?php 
}
Example #4
0
function haku_metaboxes_javascript()
{
    wp_register_script('haku_metabox_js', get_haku_var('includes_uri') . '/metabox.js', '', get_theme_version());
    wp_enqueue_script('haku_metabox_js');
}
Example #5
0
_e('Reset', 'haku');
?>
</a>
		
	</div>
	<!-- end: Popup -->
	
	<!-- Header -->
	<div class="header">
		
		<!-- Heading -->
		<h1><strong><?php 
echo get_haku_var('theme_name');
?>
 <?php 
echo get_theme_version();
?>
</strong> <?php 
_e('Control Panel', 'haku');
?>
</h1>
		
		<!-- Tools -->
		<a id="haku_save" class="haku_button" href="#"><?php 
_e('Save Settings', 'haku');
?>
 <span>0</span></a>
		
		<!-- Haku search -->
		<input type="text" id="haku_search" placeholder="<?php 
echo esc_attr(__('Search Settings', 'haku'));
Example #6
0
function haku_panel_register()
{
    $panel = add_theme_page(get_haku_var('theme_name') . ' ' . get_theme_version(), get_haku_var('theme_name'), 'switch_themes', 'haku-panel', 'haku_panel');
    add_action('admin_print_styles-' . $panel, 'haku_panel_includes');
}