/**
  * Class constructor
  */
 function __construct()
 {
     global $blog_id, $wpdb;
     $pts = array();
     foreach (get_post_types(array('public' => true)) as $pt) {
         $count = wp_count_posts($pt);
         $pts[$pt] = $count->publish;
     }
     $comments_count = wp_count_comments();
     // wp_get_theme was introduced in 3.4, for compatibility with older versions, let's do a workaround for now.
     if (function_exists('wp_get_theme')) {
         $theme_data = wp_get_theme();
         $theme = array('name' => $theme_data->display('Name', false, false), 'theme_uri' => $theme_data->display('ThemeURI', false, false), 'version' => $theme_data->display('Version', false, false), 'author' => $theme_data->display('Author', false, false), 'author_uri' => $theme_data->display('AuthorURI', false, false));
     } else {
         $theme_data = (object) get_theme_data(get_stylesheet_directory() . '/style.css');
         $theme = array('version' => $theme_data->Version, 'name' => $theme_data->Name, 'author' => $theme_data->Author, 'template' => $theme_data->Template);
     }
     $plugins = array();
     foreach (get_option('active_plugins') as $plugin_path) {
         if (!function_exists('get_plugin_data')) {
             require_once ABSPATH . 'wp-admin/includes/admin.php';
         }
         $plugin_info = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin_path);
         $slug = str_replace('/' . basename($plugin_path), '', $plugin_path);
         $plugins[$slug] = array('version' => $plugin_info['Version'], 'name' => $plugin_info['Name'], 'plugin_uri' => $plugin_info['PluginURI'], 'author' => $plugin_info['AuthorName'], 'author_uri' => $plugin_info['AuthorURI']);
     }
     $data = array('site' => array('hash' => site_url(), 'version' => get_bloginfo('version'), 'multisite' => is_multisite(), 'users' => $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM {$wpdb->users} INNER JOIN {$wpdb->usermeta} ON ({$wpdb->users}.ID = {$wpdb->usermeta}.user_id) WHERE 1 = 1 AND ( {$wpdb->usermeta}.meta_key = %s )", 'wp_' . $blog_id . '_capabilities')), 'lang' => get_locale()), 'theme' => $theme, 'plugins' => $plugins, 'email' => get_option('admin_email'), 'param' => 'class_tracking', 'action' => 'license_validator');
     $url = get_option("gallery-bank-updation-check-url");
     $response = wp_remote_post($url, array('method' => 'POST', 'timeout' => 45, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => $data));
 }
Beispiel #2
0
function get_theme_intro(){
	
	$theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
	
	define('THEMEDESC', $theme_data['Description']);
		
	$intro = '<div class="admin_billboard fix"><div class="admin_theme_screenshot"><img class="" src="'.THEME_ROOT.'/screenshot.png" /></div>' .
		'<div class="admin_billboard_content"><div class="admin_header"><h3 class="admin_header_main">Welcome to '.THEMENAME.'!</h3></div>'.
		'<div class="admin_billboard_text" style="width:400px;">'.THEMEDESC.'</div>'.
		'</div></div>'.
		'<ul class="admin_feature_list">'.
		'<li class="feature_settings"><div class="feature_icon"></div><strong>E-Panel Theme Configuration &amp; Setup</strong> <p>This panel is where you will start the customization of your website. Any options applied through this interface will make changes to your website.</p></li>' .
		'<li class="feature_requirements"><div class="feature_icon"></div><strong>Hosting Requirements</strong> <p>In order to get this theme up an running without problems, your host needs these requirements.</p>
		<ul>
			<li>MySQL 5+</li>
			<li>PHP 5.2 or better</li>
			<li>PHP cURL Library w/SSL support</li>
			<li>PHP GD 2 Library</li>
		</ul>
		</li>'.
		'</ul>'
		;

		return apply_filters('epanel_theme_intro', $intro);
	}
Beispiel #3
0
function upfw_generate_theme_data()
{
    $get_up_theme = get_theme_data(TEMPLATEPATH . '/style.css');
    $theme_title = $get_up_theme['Title'];
    $theme_shortname = strtolower(preg_replace('/ /', '_', $theme_title));
    $theme_version = $get_up_theme['Version'];
    $theme_template = $get_up_theme['Template'];
    define('UPTHEMES_NAME', $theme_title);
    define('TEMPLATENAME', $theme_title);
    define('UPTHEMES_SHORT_NAME', $theme_shortname);
    define('UPTHEMES_THEME_VER', $theme_version);
    if (file_exists(TEMPLATEPATH . '/admin/admin.php')) {
        define('THEME_PATH', TEMPLATEPATH);
        define('THEME_DIR', get_template_directory_uri());
    } elseif (file_exists(STYLESHEETPATH . '/admin/admin.php')) {
        define('THEME_PATH', STYLESHEETPATH);
        define('THEME_DIR', get_stylesheet_directory_uri());
    }
    // Detect child theme info
    if (STYLESHEETPATH != TEMPLATEPATH) {
        $get_up_theme = get_theme_data(STYLESHEETPATH . '/style.css');
        $theme_title = $get_up_theme['Title'];
        $theme_shortname = strtolower(preg_replace('/ /', '_', $theme_title));
        $theme_version = $get_up_theme['Version'];
        $theme_template = $get_up_theme['Template'];
        define('CHILD_NAME', $theme_title);
        define('CHILD_SHORT_NAME', $theme_shortname);
        define('CHILD_THEME_VER', $theme_version);
        define('CHILD_PATH', STYLESHEETPATH);
    }
}
 public function avia_check_xml()
 {
     //get user ID to store user meta data
     $this->set_user_id();
     //let's check if we already downloaded the xml lately - if yes return because we don't need to download the update xml on every page load
     $latestversiondata = get_transient('avia_theme_latest_version');
     $updatecheckfailed = get_transient('avia_update_check_failed');
     if (empty($latestversiondata) && empty($updatecheckfailed)) {
         $xml = @simplexml_load_file($this->xmlurl);
         if ($xml === false) {
             $failed_to_load_xml = true;
             //error - we couldn't load the file
         } else {
             //convert SimpleXML object back to xml to store the xml data into the database
             $latestversiondata = $xml->asXML();
         }
         //set transient option - otherwise we'd check for an update everytime the user reloads the page
         if (!empty($latestversiondata)) {
             set_transient('avia_theme_latest_version', $latestversiondata, $this->check_for_update_interval);
         } else {
             if ($failed_to_load_xml) {
                 set_transient('avia_update_check_failed', $failed_to_load_xml, $this->check_for_update_interval);
             }
         }
     } else {
         if (!empty($updatecheckfailed)) {
             return;
             //stop here because we have no data (latest theme version number, etc.)
         }
     }
     // get themedata version wp 3.4+
     if (function_exists('wp_get_theme')) {
         $theme = wp_get_theme();
         if (is_child_theme()) {
             $theme = wp_get_theme($theme->get('Template'));
         }
         $this->themeversion = $theme->get('Version');
     } else {
         //wp older than 3.4
         $theme = get_theme_data(AVIA_BASE . 'style.css');
         $this->themeversion = $theme['Version'];
     }
     //retrieve xml string from database and convert it back into a SimpleXML object
     $this->latestversiondata = simplexml_load_string($latestversiondata);
     if (!empty($this->latestversiondata) && !empty($this->latestversiondata->LatestVersion)) {
         $this->latestversion = (string) $this->latestversiondata->LatestVersion->version;
     }
     if (!empty($this->themeversion) && !empty($this->latestversion)) {
         //compare versions - version_compare() returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.
         if (version_compare($this->themeversion, $this->latestversion) < 0) {
             add_action('admin_notices', array($this, 'avia_update_notice'));
         } else {
             //delete user meta otherwise user won't see a notice for the next update
             delete_user_meta($this->userid, 'avia_ignore_update_message');
         }
     } else {
         return;
         //something went wrong - close the case
     }
 }
Beispiel #5
0
function my_t_define_constants()
{
    if (!defined('MY_ISDEV')) {
        define('MY_ISDEV', in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1')));
    }
    if (!defined('DS')) {
        define('DS', DIRECTORY_SEPARATOR);
    }
    if (!defined('EOL')) {
        define('EOL', PHP_EOL);
    }
    define('MY_ISADMIN', is_admin() or basename($_SERVER['PHP_SELF'], '.php') == 'wp-login');
    // based on CI
    define('MY_BASEFILE', __FILE__);
    define('MY_BASEPATH', realpath(dirname(MY_BASEFILE)));
    // better than TEMPLATEPATH
    define('MY_BASEURL', get_bloginfo('template_directory'));
    define('MY_APPPATH', MY_BASEPATH . DS . 'library');
    // update WP
    add_filter('theme_root', create_function('$path', 'return MY_BASEPATH;'));
    // MY_TNAME, MY_TVERSION, MY_TAUTHOR
    $t_data = get_theme_data(MY_BASEPATH . DS . 'style.css');
    foreach (array('name', 'version', 'author') as $field) {
        define('MY_T' . strtoupper($field), $t_data[ucwords($field)]);
    }
}
/**
 * Add the Framework to the menu
 */
function zilla_menu()
{
    $zilla_options = get_option('zilla_framework_options');
    $icon = ZILLA_URL . '/images/favicon.png';
    // Theme Options page
    add_object_page($zilla_options['theme_name'], $zilla_options['theme_name'], 'update_core', 'zillaframework', 'zilla_options_page', $icon);
    add_submenu_page('zillaframework', __('Theme Options', 'zilla'), __('Theme Options', 'zilla'), 'update_core', 'zillaframework', 'zilla_options_page');
    // Update Theme page
    $menu_title = __('Theme Updates', 'zilla');
    if ($xml = zilla_get_theme_changelog()) {
        $theme_version = '';
        if (function_exists('wp_get_theme')) {
            if (is_child_theme()) {
                $temp_obj = wp_get_theme();
                $theme_obj = wp_get_theme($temp_obj->get('Template'));
            } else {
                $theme_obj = wp_get_theme();
            }
            $theme_version = $theme_obj->get('Version');
        } else {
            $template_path = get_template_directory();
            $theme_data = get_theme_data($template_path . '/style.css');
            $theme_version = $theme_data['Version'];
        }
        if (version_compare($theme_version, $xml->latest) == -1) {
            $menu_title = __('Theme Updates <span class="update-plugins count-1"><span class="update-count">1</span></span>', 'zilla');
        }
    }
    add_submenu_page('zillaframework', __('Theme Updates', 'zilla'), $menu_title, 'update_core', 'zillaframework-update', 'zilla_update_page');
    // Theme Collection page
    //	add_submenu_page( 'zillaframework', __( 'More Themes', 'zilla' ), __( 'More Themes', 'zilla' ), 'update_core', 'zillaframework-themes', 'zilla_themes_page' );
    // Support link/page
    add_submenu_page('zillaframework', __('Support Forums', 'zilla'), __('Support Forums', 'zilla'), 'update_core', 'zillaframework-support', 'zilla_support_page');
}
 function wdp_options()
 {
     // VARIABLES
     $theme_data = get_theme_data(STYLESHEETPATH . '/style.css');
     $themename = $theme_data['Name'];
     $themeversion = $theme_data['Version'];
     $shortname = "tz";
     // Populate option in array for use in theme
     global $wdp_options;
     $wdp_options = get_option('wdp_options');
     $GLOBALS['template_path'] = wdp_DIRECTORY;
     //Access the WordPress Categories via an Array
     $wdp_categories = array();
     $wdp_categories_obj = get_categories('hide_empty=0');
     foreach ($wdp_categories_obj as $wdp_cat) {
         $wdp_categories[$wdp_cat->cat_ID] = $wdp_cat->cat_name;
     }
     $categories_tmp = array_unshift($wdp_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $wdp_pages = array();
     $wdp_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($wdp_pages_obj as $wdp_page) {
         $wdp_pages[$wdp_page->ID] = $wdp_page->post_name;
     }
     $wdp_pages_tmp = array_unshift($wdp_pages, "Select a page:");
     // Image Alignment radio box
     $options_thumb_align = array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center");
     // Image Links to Options
     $options_image_link_to = array("image" => "The Image", "post" => "The Post");
     //Stylesheets Reader
     $alt_stylesheet_path = wdp_FILEPATH . '/css/';
     $alt_stylesheets = array();
     if (is_dir($alt_stylesheet_path)) {
         if ($alt_stylesheet_dir = opendir($alt_stylesheet_path)) {
             while (($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false) {
                 if (stristr($alt_stylesheet_file, ".css") !== false) {
                     $alt_stylesheets[] = $alt_stylesheet_file;
                 }
             }
         }
     }
     //More Options
     $uploads_arr = wp_upload_dir();
     $all_uploads_path = '';
     if (isset($uploads_arr['path'])) {
         $all_uploads_path = $uploads_arr['path'];
     }
     $all_uploads = get_option('wdp_uploads');
     $other_entries = array("Select a number:", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19");
     // Set the Options Array
     $options = array();
     $options[] = array("name" => __('Background Images', 'framework'), "type" => "heading");
     $options[] = array("name" => "", "message" => __('Here, you can change the background images. Use an image resolution of 1280px X 800px ~ 200 KB, if possible.', 'framework'), "type" => "intro");
     $options[] = array("name" => __('Background Image 1', 'framework'), "desc" => __('Upload a logo for your theme, or specify the image address of your online logo. (http://example.com/logo.png)', 'framework'), "id" => $shortname . "_bg_image_1", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Background Image 2', 'framework'), "desc" => __('Upload a logo for your theme, or specify the image address of your online logo. (http://example.com/logo.png)', 'framework'), "id" => $shortname . "_bg_image_2", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Background Image 3', 'framework'), "desc" => __('Upload a logo for your theme, or specify the image address of your online logo. (http://example.com/logo.png)', 'framework'), "id" => $shortname . "_bg_image_3", "std" => "", "type" => "upload");
     update_option('wdp_template', $options);
     update_option('wdp_themename', $themename);
     update_option('wdp_shortname', $shortname);
 }
 function launch()
 {
     $theme_options = _WSH()->option();
     $theme_options_url = admin_url('themes.php?page=' . SH_NAME . '_option');
     $this->purchase_code = sh_set($theme_options, 'sh_purchase_code');
     $this->purchase_user = sh_set($theme_options, 'sh_purchase_user');
     if (function_exists('wp_get_theme')) {
         $this->theme_data = wp_get_theme(get_option('template'));
         $this->theme_version = $this->theme_data->Version;
     } else {
         $this->theme_data = get_theme_data(get_template_directory() . '/style.css');
         $this->theme_version = $this->theme_data['Version'];
     }
     $this->theme_base = get_option('template');
     if (!$this->purchase_code && !$this->purchase_user) {
         $this->errors[] = sprintf(__('<strong>%s Theme Notice:</strong> Please enter a valid <a href="%s">purchase code and themeforest username</a> to get automatic theme update', SH_NAME), $this->theme_data['Name'], $theme_options_url);
     }
     add_action('admin_notices', array($this, '_admin_notice'));
     if ($this->errors) {
         return;
     }
     /**************************************************/
     //Uncomment below to find the theme slug that will need to be setup on the api server
     //var_dump($theme_base);
     add_filter('pre_set_site_transient_update_themes', array($this, 'check_for_update'));
     // Take over the Theme info screen on WP multisite
     add_filter('themes_api', array($this, 'my_theme_api_call'), 10, 3);
     if (is_admin()) {
         $this->current = get_transient('update_themes');
     }
 }
 function display()
 {
     $browser = new SendPress_Browser();
     if (get_bloginfo('version') < '3.4') {
         $theme_data = get_theme_data(get_stylesheet_directory() . '/style.css');
         $theme = $theme_data['Name'] . ' ' . $theme_data['Version'];
     } else {
         $theme_data = wp_get_theme();
         $theme = $theme_data->Name . ' ' . $theme_data->Version;
     }
     // Try to identify the hosting provider
     $host = false;
     if (defined('WPE_APIKEY')) {
         $host = 'WP Engine';
     } elseif (defined('PAGELYBIN')) {
         $host = 'Pagely';
     }
     $request['cmd'] = '_notify-validate';
     $params = array('sslverify' => false, 'timeout' => 60, 'body' => $request);
     $response = wp_remote_post('https://www.paypal.com/cgi-bin/webscr', $params);
     if (!is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
         $WP_REMOTE_POST = 'wp_remote_post() works' . "\n";
     } else {
         $WP_REMOTE_POST = 'wp_remote_post() does not work' . "\n";
     }
     return $this->display_output($browser, $theme, $host, $WP_REMOTE_POST);
 }
Beispiel #10
0
function remove_footer_admin()
{
    $themename = get_theme_data(get_stylesheet_directory() . '/style.css');
    $version = "version " . $themename['Version'];
    $themename = $themename['Name'];
    echo "<b><a href=http://www.site5.com>{$themename} - {$version}</a></b> - Wordpress Bar &amp; Restaurant Theme | <a href=http://www.site5.com/>Designed by Site5.com</a> ";
}
function update_notifier()
{
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    // Read theme current version from the style.css
    ?>
	
	<style>
		.update-nag { display: none; }
		#instructions {max-width: 670px;}
		h3.title {margin: 30px 0 0 0; padding: 30px 0 0 0; border-top: 1px solid #ddd;}
	</style>

	<div class="wrap">
	
		<div id="icon-tools" class="icon32"></div>
		<h2><?php 
    echo NOTIFIER_THEME_NAME;
    ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo NOTIFIER_THEME_NAME;
    ?>
 theme available.</strong> You have version <?php 
    echo $theme_data['Version'];
    ?>
 installed. Update to version <?php 
    echo $xml->latest;
    ?>
.</p></div>

		<img style="float: left; margin: 0 20px 20px 0; border: 1px solid #ddd;" src="<?php 
    echo get_bloginfo('template_url') . '/screenshot.png';
    ?>
" />
		
		<div id="instructions">
		    <h3>Update Download and Instructions</h3>
		    <p><strong>Please note:</strong> make a <strong>backup</strong> of the Theme inside your WordPress installation folder <strong>/wp-content/themes/<?php 
    echo NOTIFIER_THEME_FOLDER_NAME;
    ?>
/</strong></p>
		    <p>To update the Theme, login to <a href="http://www.themeforest.net/">ThemeForest</a>, head over to your <strong>downloads</strong> section and re-download the theme like you did when you bought it.</p>
		    <p>Extract the zip's contents, look for the extracted theme folder, and after you have all the new files upload them using FTP to the <strong>/wp-content/themes/<?php 
    echo NOTIFIER_THEME_FOLDER_NAME;
    ?>
/</strong> folder overwriting the old ones (this is why it's important to backup any changes you've made to the theme files).</p>
		    <p>If you didn't make any changes to the theme files, you are free to overwrite them with the new ones without the risk of losing theme settings, pages, posts, etc, and backwards compatibility is guaranteed.</p>
		</div>
	    
	    <h3 class="title">Changelog</h3>
	    <?php 
    echo $xml->changelog;
    ?>

	</div>
    
<?php 
}
 function after()
 {
     $update_actions = array();
     if (!empty($this->upgrader->result['destination_name']) && ($theme_info = $this->upgrader->theme_info()) && !empty($theme_info)) {
         $name = $theme_info['Name'];
         $stylesheet = $this->upgrader->result['destination_name'];
         $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
         $template = $this->installed_theme_key;
         $stylesheet = $this->installed_theme_key;
         $theme_info = get_theme_data(trailingslashit(WP_CONTENT_DIR) . 'themes/' . $stylesheet);
         if (!empty($theme_info['Template'])) {
             $template = $theme_info['Template'];
         }
         // End IF Statement
         $preview_link = htmlspecialchars(add_query_arg(array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true'), trailingslashit(esc_url(get_option('home')))));
         $activate_link = wp_nonce_url("themes.php?action=activate&amp;template=" . urlencode($template) . "&amp;stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
         $update_actions['preview'] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;', 'woothemes'), $name)) . '">' . __('Preview', 'woothemes') . '</a>';
         $update_actions['activate'] = '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr(sprintf(__('Activate &#8220;%s&#8221;', 'woothemes'), $name)) . '">' . __('Activate', 'woothemes') . '</a>';
         if (!$this->result || is_wp_error($this->result) || $stylesheet == get_stylesheet()) {
             unset($update_actions['preview'], $update_actions['activate']);
         }
         $update_actions['themes_page'] = '<a href="' . admin_url('themes.php?page=woo-installer') . '" title="' . esc_attr(__('Install other WooThemes', 'woothemes')) . '" target="_parent">' . __('Install other WooThemes', 'woothemes') . '</a>';
     }
     $update_actions = apply_filters('update_theme_complete_actions', $update_actions, $this->installed_theme_key);
     if (!empty($update_actions)) {
         $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array) $update_actions));
     }
 }
 /**
  * Construct
  *
  * @since 1.0
  */
 public function __construct()
 {
     // Get theme info
     if (function_exists('wp_get_theme')) {
         $theme = wp_get_theme();
         $this->theme['authorURI'] = $theme->{'Author URI'};
     } else {
         $theme = get_theme_data(get_stylesheet_directory() . '/style.css');
         $this->theme['authorURI'] = $theme['AuthorURI'];
     }
     // Set constants for theme info
     $this->theme['name'] = $theme['Name'];
     $this->theme['nicename'] = strtolower(str_replace(" ", "-", $this->theme['name']));
     $this->theme['version'] = $theme['Version'];
     $this->theme['author'] = $theme['Author'];
     $this->theme['textdomain'] = strtolower(str_replace(" ", "_", $this->theme['name']));
     $this->theme['uri'] = $this->theme['authorURI'] . "themes/" . $this->theme['nicename'];
     $this->theme['support'] = $this->theme['authorURI'] . 'support/';
     $this->theme['readme'] = get_template_directory_uri() . '/readme.txt';
     // This will keep track of the checkbox options for the formHandler function.
     $this->checkboxes = array();
     $this->settings = array();
     $this->getSettings();
     add_action('admin_menu', array(&$this, 'addPages'));
     add_action('admin_init', array(&$this, 'registerSettings'));
     add_action('admin_notices', array(&$this, 'updateNotice'));
     add_action('wp_ajax_readme', array(&$this, 'displayReadme'));
     add_action('wp_ajax_fonts', array(&$this, 'displayFonts'));
     /* if ( ! get_option( 'fullscreen_options' ) )
     			$this->initializeSettings(); */
 }
 function __construct()
 {
     /* GET INFORMATIONS FROM STYLE.CSS */
     // get themedata version wp 3.4+
     if (function_exists('wp_get_theme')) {
         $tc_theme = wp_get_theme();
         $tc_base_data['prefix'] = $tc_base_data['Title'] = $tc_theme->get('Name');
         $tc_base_data['Version'] = $tc_theme->get('Version');
     } else {
         $tc_base_data = get_theme_data(TC_BASE . 'style.css');
         $tc_base_data['prefix'] = $tc_base_data['Title'];
     }
     /* CUSTOMIZR_VER is the Version */
     if (!defined('CUSTOMIZR_VER')) {
         define('CUSTOMIZR_VER', $tc_base_data['Version']);
     }
     /* TC_BASE is the root server path */
     if (!defined('TC_BASE')) {
         define('TC_BASE', get_template_directory() . '/');
     }
     /* TC_BASE_URL http url of the loaded template */
     if (!defined('TC_BASE_URL')) {
         define('TC_BASE_URL', get_template_directory_uri() . '/');
     }
     /* THEMENAME contains the Name of the currently loaded theme */
     if (!defined('THEMENAME')) {
         define('THEMENAME', $tc_base_data['Title']);
     }
     /* theme class groups instanciation */
     $groups = array('fire', 'main', 'header', 'content');
     foreach ($groups as $g) {
         tc__($g);
     }
 }
function presstrends()
{
    // Add your PressTrends and Theme API Keys
    $api_key = 'fwaauw8aofwq21vgs1mw8b8g87q9x0rrezv4';
    $auth = 'kzsc8b4g65i3j88rsu3oix8dkmufi5gbp';
    // NO NEED TO EDIT BELOW
    $data = get_transient('presstrends_data');
    if (!$data || $data == '') {
        $api_base = 'http://api.presstrends.io/index.php/api/sites/add/auth/';
        $url = $api_base . $auth . '/api/' . $api_key . '/';
        $data = array();
        $count_posts = wp_count_posts();
        $comments_count = wp_count_comments();
        $theme_data = get_theme_data(get_template_directory() . '/style.css');
        $plugin_count = count(get_option('active_plugins'));
        $data['url'] = stripslashes(str_replace(array('http://', '/', ':'), '', site_url()));
        $data['posts'] = $count_posts->publish;
        $data['comments'] = $comments_count->total_comments;
        $data['theme_version'] = $theme_data['Version'];
        $data['theme_name'] = str_replace(' ', '', get_bloginfo('name'));
        $data['plugins'] = $plugin_count;
        $data['wpversion'] = get_bloginfo('version');
        foreach ($data as $k => $v) {
            $url .= $k . '/' . $v . '/';
        }
        $response = wp_remote_get($url);
        set_transient('presstrends_data', $data, 60 * 60 * 24);
    }
}
Beispiel #16
0
 public function __construct()
 {
     global $shortname;
     // Get theme info
     if (function_exists('wp_get_theme')) {
         $theme = wp_get_theme();
         $this->theme['authorURI'] = $theme->{'Author URI'};
     } else {
         $theme = get_theme_data(get_stylesheet_directory() . '/style.css');
         $this->theme['authorURI'] = $theme['AuthorURI'];
     }
     $this->theme['name'] = $theme['Name'];
     $this->theme['nicename'] = strtolower(str_replace(" ", "-", $this->theme['name']));
     $this->theme['textdomain'] = strtolower(str_replace(" ", "_", $this->theme['name']));
     $this->theme['version'] = $theme['Version'];
     $this->theme['author'] = $theme['Author'];
     $this->theme['uri'] = $this->theme['authorURI'] . "/themes/" . $this->theme['nicename'];
     $this->theme['support'] = $this->theme['authorURI'] . '/support/';
     $this->theme['readme'] = get_template_directory_uri() . '/readme.txt';
     // This will keep track of the checkbox options for the validate_settings function.
     $this->checkboxes = array();
     $this->settings = array();
     add_action('admin_menu', array(&$this, 'add_pages'));
     add_action('admin_init', array(&$this, 'register_settings'));
     add_action('wp_ajax_readme', array(&$this, 'displayReadme'));
     //	Load Theme Options
     require_once get_template_directory() . '/includes/icore/theme-options.php';
     if (!get_option($shortname . '_options')) {
         $this->initialize_settings();
     }
 }
Beispiel #17
0
 function bizway_options()
 {
     // VARIABLES
     $themename = get_theme_data(get_template_directory() . '/style.css');
     $themename = $themename['Name'];
     $shortname = "of";
     // Populate OptionsFramework option in array for use in theme
     global $of_options;
     $of_options = bizway_get_option('of_options');
     // Background Defaults
     $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll');
     //Front page on/off
     $file_rename = array("on" => "On", "off" => "Off");
     //Stylesheet Reader
     $alt_stylesheets = array("default" => "default", "blue" => "blue", "coffee" => "coffee", "green" => "green", "brown" => "brown", "pink" => "pink", "orange" => "orange", "purple" => "purple", "red" => "red", "forrest-green" => "forrest-green", "yellow" => "yellow");
     // Pull all the categories into an array
     $options_categories = array();
     $options_categories_obj = get_categories();
     foreach ($options_categories_obj as $category) {
         $options_categories[$category->cat_ID] = $category->cat_name;
     }
     // Pull all the pages into an array
     $options_pages = array();
     $options_pages_obj = get_pages('sort_column=post_parent,menu_order');
     $options_pages[''] = 'Select a page:';
     foreach ($options_pages_obj as $page) {
         $options_pages[$page->ID] = $page->post_title;
     }
     // If using image radio buttons, define a directory path
     $imagepath = get_stylesheet_directory_uri() . '/images/';
     $options = array(array("name" => "General Settings", "type" => "heading"), array("name" => "Custom Logo", "desc" => "Choose your own logo. Optimal Size: 300px Wide by 90px Height.", "id" => "bizway_logo", "type" => "upload"), array("name" => "Custom Favicon", "desc" => "Specify a 16px x 16px image that will represent your website's favicon.", "id" => "bizway_favicon", "type" => "upload"), array("name" => "Tracking Code", "desc" => "Paste your Google Analytics (or other) tracking code here.", "id" => "bizway_analytics", "std" => "", "type" => "textarea"), array("name" => "Homepage Settings", "type" => "heading"), array("name" => "First Heading", "desc" => "Enter your text for first heading.", "id" => "bizway_first_head", "std" => "", "type" => "textarea"), array("name" => "Second Heading", "desc" => "Enter your text for second heading.", "id" => "bizway_second_head", "std" => "", "type" => "textarea"), array("name" => "Slider Settings", "type" => "heading"), array("name" => "Slider Image1", "desc" => "Choose your image for first slider. Optimal size is 950px wide and 350px height.", "id" => "bizway_slideimage1", "std" => "", "type" => "upload"), array("name" => "Slide 1 Link", "desc" => "Enter your link url for slide1", "id" => "bizway_slidelink1", "std" => "", "type" => "text"), array("name" => "Slider Image2", "desc" => "Choose your image for second slider. Optimal size is 950px wide and 350px height.", "id" => "bizway_slideimage2", "std" => "", "type" => "upload"), array("name" => "Slide 2 Link", "desc" => "Enter your link url for slide2", "id" => "bizway_slidelink2", "std" => "", "type" => "text"), array("name" => "Homepage Feature Area", "type" => "heading"), array("name" => "Homepage Feature Area First Image", "desc" => "Choose your image for homepage feature area first image.", "id" => "bizway_featureimg1", "std" => "", "type" => "upload"), array("name" => "First Feature Heading", "desc" => "Enter your text for first col heading.", "id" => "bizway_firsthead", "std" => "", "type" => "textarea"), array("name" => "First Feature Description", "desc" => "Enter your text for first col description.", "id" => "bizway_firstdesc", "std" => "", "type" => "textarea"), array("name" => "First Feature Link URL", "desc" => "Enter your link url for fourth feature section.", "id" => "bizway_link1", "std" => "", "type" => "text"), array("name" => "Second Feature Starts From Here.", "type" => "saperate", "class" => "saperator"), array("name" => "Homepage Feature Area Second Image", "desc" => "Choose your image for homepage Feature area second image.", "id" => "bizway_featureimg2", "std" => "", "type" => "upload"), array("name" => "Second Feature Heading", "desc" => "Enter your text for second col heading.", "id" => "bizway_secondhead", "std" => "", "type" => "textarea"), array("name" => "Second Col Description", "desc" => "Enter your text for second col description.", "id" => "bizway_seconddesc", "std" => "", "type" => "textarea"), array("name" => "Second Feature Link URL", "desc" => "Enter your link url for fourth feature section.", "id" => "bizway_link2", "std" => "", "type" => "text"), array("name" => "Third Feature Starts From Here.", "type" => "saperate", "class" => "saperator"), array("name" => "Homepage Third Feature  Image", "desc" => "Choose your image for homepage Feature area third image.", "id" => "bizway_featureimg3", "std" => "", "type" => "upload"), array("name" => "Third Feature Heading", "desc" => "Enter your text for second col heading.", "id" => "bizway_thirdhead", "std" => "", "type" => "textarea"), array("name" => "Third Feature Description", "desc" => "Enter your text for Third Feature description.", "id" => "bizway_thirddesc", "std" => "", "type" => "textarea"), array("name" => "Third Feature Link URL", "desc" => "Enter your link url for fourth feature section.", "id" => "bizway_link3", "std" => "", "type" => "text"), array("name" => "Styling Options", "type" => "heading"), array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => "bizway_customcss", "std" => "", "type" => "textarea"));
     bizway_update_option('of_template', $options);
     bizway_update_option('of_themename', $themename);
     bizway_update_option('of_shortname', $shortname);
 }
Beispiel #18
0
/**
 *
 */
function get_documentation_data()
{
    $docs = array('wordpress-com-themes' => array('name' => 'WordPress.com Themes', 'type' => 'general', 'related' => array('wordpress-com-vs-wordpress-org', 'transfer-from-wordpress-com')), 'support-vs-customization' => array('name' => 'Support vs. Customization', 'type' => 'general'), 'transfer-from-wordpress-com' => array('name' => 'WordPress.com theme Transfer', 'type' => 'general', 'related' => array('wordpress-com-vs-wordpress-org', 'wordpress-com-themes', 'refunds')), 'theme-installation' => array('name' => 'Theme Installation', 'type' => 'general'), 'child-theme-installation' => array('name' => 'Child Theme Installation', 'type' => 'general'), 'demo-content' => array('name' => 'Theme Demo Content', 'type' => 'general', 'description' => 'Demo content to help you get started with your theme.'), 'refunds' => array('name' => 'Refunds', 'type' => 'general', 'related' => array('transfer-from-wordpress-com')), 'affiliates' => array('name' => 'Affiliates', 'type' => 'general'), 'translating-your-website-content' => array('name' => 'Translating Your Website Content', 'type' => 'general'), 'license' => array('name' => 'Software License', 'type' => 'general'), 'localization' => array('name' => 'Localization', 'type' => 'general', 'description' => 'View your theme in your native language.', 'icon' => 'language'), 'theme-customization' => array('name' => 'Theme Customization', 'type' => 'general', 'description' => 'Some basic information on how to customize your theme purchase'), 'wordpress-com-vs-wordpress-org' => array('name' => 'The Difference Between WordPress.com and WordPress.org', 'type' => 'general', 'related' => array('transfer-from-wordpress-com', 'wordpress-com-themes')), 'theme-updates' => array('name' => 'Theme Updates', 'type' => 'general'), 'wordpress-requirements' => array('name' => 'Theme Requirements', 'type' => 'general'), 'keeping-website-up-to-date' => array('name' => 'Keeping Your Website Up To Date', 'type' => 'general'), 'speeding-up-your-wordpress-site' => array('name' => 'Speeding Up Your WordPress Website', 'type' => 'general', 'related' => array('image-resizing', 'jetpack')), 'posts-vs-pages' => array('name' => 'The Difference Between Posts and Pages', 'type' => 'general'), 'theme-previews' => array('name' => 'Theme Previews', 'type' => 'general'), 'payment-methods' => array('name' => 'Payment Methods', 'type' => 'general'), 'featured-content' => array('name' => 'Featured Content', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Select your best content to appear in a Slider or other special area on the homepage.', 'related' => array('customizer', 'featured-image'), 'icon' => 'thumb-tack'), 'custom-front-page' => array('name' => 'Custom Front Page', 'type' => 'feature', 'description' => 'Change the design of your front page to make it exactly as you want.', 'related' => array('custom-page-templates', 'customizer'), 'icon' => 'home'), 'custom-page-templates' => array('name' => 'Custom Page Templates', 'type' => 'feature', 'description' => 'Different page layouts for static WordPress pages.', 'related' => array('custom-front-page')), 'portfolio' => array('name' => 'Portfolio and Projects', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Show off your Portfolio of work.', 'related' => array('testimonials'), 'icon' => 'folder-open'), 'infinite-scroll' => array('name' => 'Infinite Scroll', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Continuosly loading content to encourage your readers to stick around.', 'icon' => 'arrow-down'), 'site-logo' => array('name' => 'Site Logo', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Add a logo to make your site your own.', 'related' => array('customizer')), 'search-engine-optimization' => array('name' => 'SEO', 'type' => 'feature', 'description' => 'Search Engine Optimization to improve your sites rankings.', 'icon' => 'line-chart'), 'social-menu' => array('name' => 'Social Menu', 'type' => 'feature', 'description' => 'Display links to your social media channels.', 'icon' => 'share-alt'), 'custom-colours-fonts' => array('name' => 'Custom Colours and Fonts', 'type' => 'feature', 'requires' => 'styleguide', 'description' => 'Tweak the fonts and colours on your site without touching any code.', 'related' => array('custom-css', 'customizer'), 'icon' => 'paint-brush'), 'featured-image' => array('name' => 'Featured Images', 'type' => 'feature', 'description' => 'Image thumbnails for your blog posts and pages.', 'related' => array('image-resizing'), 'icon' => 'camera'), 'custom-css' => array('name' => 'Custom CSS', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Edit the CSS on your website.', 'related' => array('custom-colours-fonts', 'customizer'), 'icon' => 'css3'), 'image-resizing' => array('name' => 'Image Resizing (Photon)', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Resizes all of your images to fit the thumbnails used.', 'related' => array('featured-image', 'speeding-up-your-wordpress-site'), 'icon' => 'picture-o'), 'website-uptime-monitor' => array('name' => 'Website Uptime Monitor', 'type' => 'feature', 'description' => 'Monitor your websites availability', 'requires' => 'jetpack', 'icon' => 'shield'), 'contact-form' => array('name' => 'Contact Form', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Add a simple contact form to your website or blog.', 'icon' => 'envelope-o'), 'sticky-post' => array('name' => 'Sticky Posts', 'type' => 'feature', 'description' => 'Stick posts to the top of your blog.', 'icon' => 'sticky-note'), 'testimonials' => array('name' => 'Testimonials', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Display comments from your users/ customers showing how much your product/ service benefits them.', 'related' => array('portfolio', 'customizer'), 'icon' => 'comment'), 'social-sharing' => array('name' => 'Social Sharing Buttons', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Display social buttons that encourage readers to share your content.', 'icon' => 'share-alt'), 'related-content' => array('name' => 'Related Content', 'type' => 'feature', 'requires' => 'jetpack', 'description' => 'Display content, related to the current blog post, to give your readers something to look at next.', 'icon' => 'arrows-h'), 'customizer' => array('name' => 'Customizer', 'type' => 'feature', 'related' => array('site-logo', 'testimonials', 'custom-front-page', 'custom-css', 'custom-colours-fonts'), 'description' => 'Edit site settings and get a live preview of the changes.', 'icon' => 'cogs'), 'widget-visibility' => array('name' => 'Widget Visibility', 'type' => 'feature', 'related' => array('customizer'), 'description' => 'Show and hide widgets on different pages according to rules you set', 'requires' => 'jetpack', 'icon' => 'eye-slash'));
    // merge in the themes
    $themes = get_theme_data();
    foreach ($themes as $key => $theme) {
        $theme['type'] = 'theme';
        $docs[$key] = $theme;
    }
    // merge in plugins
    $plugins = get_plugin_data();
    foreach ($plugins as $key => $plugin) {
        $plugin['type'] = 'plugin';
        $docs[$key] = $plugin;
    }
    // process them
    $processed = array();
    foreach ($docs as $key => $doc) {
        $doc['url'] = path('documentation/' . $doc['type'] . '/' . $key . '/');
        // ensure required list is array
        if (!empty($doc['requires']) && !is_array($doc['requires'])) {
            $doc['requires'] = array($doc['requires']);
        }
        $processed[$key] = $doc;
    }
    return $processed;
}
/**
 * Put together some debug info to send to SimpleReach when support
 * is requested.
 *
 * @author Eric Lubow <*****@*****.**>
 * @param None
 * @return String Debug info
 */
function srslide_create_debug_info()
{
    $attrs = array();
    $attrs['pid'] = get_option('srslide_pid');
    $attrs['email'] = get_option('srslide_sr_login');
    $attrs['website'] = get_option('siteurl');
    $attrs['account'] = get_option('blogname');
    $attrs['user_api_key'] = get_option('srslide_api_key');
    $attrs['wp_version'] = get_bloginfo('version');
    $attrs['plugin_version'] = SRSLIDE_PLUGIN_VERSION;
    $attrs['show_slide_logo'] = get_option('srslide_show_logo');
    $attrs['header_text'] = get_option('srslide_header_text');
    $attrs['use_wp_pages'] = get_option('srslide_use_pages');
    $attrs['styles'] = serialize(get_option('srslide_styles'));
    $attrs['account'] = get_option('blogname');
    $attrs['php_version'] = phpversion();
    $attrs['curl_version'] = _srslide_get_curl_version();
    $attrs['curl_ssl'] = _srslide_get_curl_ssl();
    $attrs['curl_https_enabled'] = _srslide_get_curl_ssl_enabled();
    $attrs['wp_plugins'] = _srslide_get_wp_plugins();
    if ($theme_name = get_current_theme()) {
        $attrs['theme'] = $theme_name;
        $theme_data = get_theme_data(get_stylesheet_directory() . '/style.css');
        if (is_array($theme_data)) {
            foreach ($theme_data as $k => $v) {
                $attrs['theme_' . $k] = $v;
            }
        }
    }
    $str = '';
    foreach ($attrs as $attr => $value) {
        $str .= $attr . ': ' . $value . "\n";
    }
    return $str;
}
 /**
  * Setup the data that is going to be tracked
  *
  * @access private
  * @return void
  */
 private function setup_data()
 {
     $data = array();
     // Retrieve current theme info
     if (get_bloginfo('version') < '3.4') {
         $theme_data = get_theme_data(get_stylesheet_directory() . '/style.css');
         $theme = $theme_data['Name'] . ' ' . $theme_data['Version'];
     } else {
         $theme_data = wp_get_theme();
         $theme = $theme_data->Name . ' ' . $theme_data->Version;
     }
     $data['url'] = home_url();
     $data['theme'] = $theme;
     $data['email'] = get_bloginfo('admin_email');
     // Retrieve current plugin information
     if (!function_exists('get_plugins')) {
         include ABSPATH . '/wp-admin/includes/plugin.php';
     }
     $plugins = array_keys(get_plugins());
     $active_plugins = get_option('active_plugins', array());
     foreach ($plugins as $key => $plugin) {
         if (in_array($plugin, $active_plugins)) {
             // Remove active plugins from list so we can show active and inactive separately
             unset($plugins[$key]);
         }
     }
     $data['active_plugins'] = $active_plugins;
     $data['inactive_plugins'] = $plugins;
     $data['products'] = wp_count_posts('download')->publish;
     $this->data = $data;
 }
Beispiel #21
0
 /**
  * Define all of the constants for our theme, framework including 
  * version numbers, paths, etc.
  *
  * @author Richard Tape
  * @package Incipio
  * @since 1.0
  * @param None
  * @return None
  */
 function constants()
 {
     //Define our framework version
     define('INCIPIO_VERSION', '1.0');
     //Define theme-related constants with support for WP < 3.4
     if (function_exists('wp_get_theme')) {
         //We're using WordPress version 3.4+
         $theme_data = wp_get_theme();
         if (!defined('THEMENAME')) {
             define('THEMENAME', $theme_data->Template);
         }
         if (!defined('THEMEVERSION')) {
             define('THEMEVERSION', $theme_data->Version);
         }
     } else {
         //We're using WP < 3.4 so don't have access to the wp_get_theme class
         $theme_data = get_theme_data(get_template_directory() . '/style.css');
         if (!defined('THEMENAME')) {
             define('THEMENAME', $theme_data['Template']);
         }
         if (!defined('THEMEVERSION')) {
             define('THEMEVERSION', $theme_data['Version']);
         }
     }
 }
Beispiel #22
0
function thesis_version()
{
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    #wp
    $version = trim($theme_data['Version']);
    return $version;
}
Beispiel #23
0
function remove_footer_admin()
{
    $themedata = get_theme_data(get_template_directory() . '/style.css');
    $themename = $themedata['Name'];
    $version = $themedata['Version'];
    echo "<b><a href=http://www.s5themes.com>{$themename} - {$version}</a></b> - Simple Wordpress Resume & Portfolio Theme | <a href=www.s5themes.com/>Designed by S5themes.com</a> ";
}
function update_notifier()
{
    $xml = get_latest_theme_version(21600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    if (function_exists('wp_get_theme')) {
        $theme_data = wp_get_theme();
        // Get theme data from style.css (current version is what we want)
    } else {
        $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
        // Get theme data from style.css (current version is what we want)
    }
    ?>
	
	<style>
		.update-nag {display: none;}
		#mono_info { float:left; width:400px; margin:0 20px 20px 0; border:1px solid #ccc; -moz-border-radius:5px; -khtml-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; }
		#mono_theme_thumbnail { float:left; display:block; border:1px solid #ccc; }
                #mono_info h3 { margin:0 0 15px 0; font-size:14px; background:#f2f2f2; padding:15px 15px 12px; -moz-border-radius:5px 5px 0 0; -khtml-border-radius:5px 5px 0 0; -webkit-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0; border-bottom:1px solid #ccc; background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee)); background: -moz-linear-gradient(top, #fff, #eee); }
                #mono_info dt { font-weight:bold; margin:0 0 2px 0; font-size:12px; }
                #mono_info dd { margin:0 0 15px 0; font-size:12px; }
                #mono_info dl { margin:0 15px 5px 15px; font-size:12px; }
	</style>

        <div class="wrap">
         <div id="icon-tools" class="icon32"></div>
         <h2><?php 
    echo $theme_data['Name'];
    ?>
 テーマ更新情報</h2>
         <div id="message" class="updated below-h2">
          <p><strong><?php 
    echo $theme_data['Name'];
    ?>
の最新版が公開されています。</strong> 現在利用しているバージョンは「<?php 
    echo $theme_data['Version'];
    ?>
」です。 「<?php 
    echo $xml->latest;
    ?>
」に更新する事ができます。</p>
         </div>
         <div id="mono_instructions">
          <h3>注意事項:最新版にアップデートする際は、必ずテーマの<strong>バックアップ</strong> をしてください。</h3>
          <p style="font-size:16px;">【 <a href="http://wp-dp.com/dl015/grider/grider_tcd015.zip">最新版のテーマをダウンロードする</a> 】</p>
          <div id="mono_info">
	   <h3>更新情報</h3>
	   <?php 
    echo $xml->changelog;
    ?>
          </div>
          <img id="mono_theme_thumbnail" src="<?php 
    echo get_bloginfo('template_url') . '/screenshot.png';
    ?>
" />
         </div>
	</div>
    
<?php 
}
Beispiel #25
0
function woo_version()
{
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    $theme_version = $theme_data['Version'];
    $woo_framework_version = get_option('woo_framework_version');
    echo '<meta name="generator" content="' . get_option('woo_themename') . ' ' . $theme_version . '" />' . "\n";
    echo '<meta name="generator" content="Woo Framework Version ' . $woo_framework_version . '" />' . "\n";
}
Beispiel #26
0
/**
 * theme_version() - Returns the current theme version.
 * 
 * @since 2.0
 * @return string
 */
function theme_version()
{
    $themedata = get_theme_data(TEMPLATEPATH . '/style.css');
    $version = trim($themedata['Version']);
    if (strlen($version) > 0) {
        return $version;
    }
}
Beispiel #27
0
 /**
  * Return theme data for active theme
  *
  * @param string $theme_slug
  * @return array
  */
 private function get_theme_data($theme_slug)
 {
     if (null === $this->theme_data) {
         $stylesheet = get_theme_root($theme_slug) . '/' . $theme_slug . '/style.css';
         $this->theme_data = get_theme_data($stylesheet);
     }
     return $this->theme_data;
 }
function photography_version()
{
    $photography_framework_version = "1.0.7";
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    $theme_version = $theme_data['Version'];
    echo '<meta name="generator" content="' . get_option('photography_themename') . ' ' . $theme_version . '" />' . "\n";
    echo '<meta name="generator" content="photography Framework Version ' . $photography_framework_version . '" />' . "\n";
}
Beispiel #29
0
 function responsive_theme_data()
 {
     if (is_child_theme()) {
         $theme_data = get_theme_data(STYLESHEETPATH . '/style.css');
         $responsive_theme_name = $theme_data['Name'];
         $responsive_theme_version = $theme_data['Version'];
         echo '<meta name="theme" content="' . $responsive_theme_name . ' ' . $responsive_theme_version . '" />' . "\n";
     }
 }
Beispiel #30
0
function woo_version()
{
    $theme_data = get_theme_data(get_template_directory() . '/style.css');
    $theme_version = $theme_data['Version'];
    $woo_framework_version = get_option('woo_framework_version');
    echo "\n<!-- Theme version -->\n";
    echo '<meta name="generator" content="' . esc_attr(get_option('woo_themename')) . ' ' . $theme_version . '" />' . "\n";
    echo '<meta name="generator" content="WooFramework ' . esc_attr($woo_framework_version) . '" />' . "\n";
}