本文整理汇总了PHP中wooframework_get_theme_version_data函数的典型用法代码示例。如果您正苦于以下问题:PHP wooframework_get_theme_version_data函数的具体用法?PHP wooframework_get_theme_version_data怎么用?PHP wooframework_get_theme_version_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wooframework_get_theme_version_data函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: woo_version
function woo_version()
{
$data = wooframework_get_theme_version_data();
echo "\n<!-- Theme version -->\n";
if (isset($data['is_child']) && true == $data['is_child']) {
echo '<meta name="generator" content="' . esc_attr($data['child_theme_name'] . ' ' . $data['child_theme_version']) . '" />' . "\n";
}
echo '<meta name="generator" content="' . esc_attr($data['theme_name'] . ' ' . $data['theme_version']) . '" />' . "\n";
echo '<meta name="generator" content="WooFramework ' . esc_attr($data['framework_version']) . '" />' . "\n";
}
示例2: register_settings_screen
/**
* Register the WooFramework admin menu.
* @access public
* @since 6.0.0
* @return void
*/
public function register_settings_screen()
{
$theme_data = wooframework_get_theme_version_data();
$ct = wp_get_theme();
$theme_name = apply_filters('wf_branding_menu_label', $ct->__get('Name'));
$icon = apply_filters('wf_branding_icon', '');
add_object_page(__('Settings', 'woothemes'), esc_html($theme_name), 'edit_theme_options', 'woothemes', array($this, 'settings_screen'), $icon);
$wf_settings_screen_hook = add_submenu_page('woothemes', esc_html($theme_name), __('Settings', 'woothemes'), 'edit_theme_options', 'woothemes', array($this, 'settings_screen'));
// Default
// Load validation and save logic for the settings screen.
add_action('load-' . $wf_settings_screen_hook, array($this, 'settings_screen_logic'));
do_action('wf_settings_register_settings_screen');
}
示例3: wf_useful_links
/**
* Display a list of useful links within the WordPress admin.
* @since 6.0.0
* @return void
*/
function wf_useful_links()
{
$theme_data = wooframework_get_theme_version_data();
do_action('wf_useful_links_before');
$theme_name = strtolower($theme_data['theme_name']);
$docs_url = get_option('woo_manual', 'http://docs.woothemes.com/document/' . urlencode(sanitize_title($theme_name)));
$html = '<ul class="useful-links">' . "\n";
do_action('wf_useful_links_list_start');
$html .= '<li class="documentation"><a href="' . esc_url($docs_url) . '" target="_blank">' . __('Documentation', 'woothemes') . '</a></li>' . "\n";
$html .= '<li class="changelog"><a href="' . esc_url(get_template_directory_uri() . '/changelog.txt') . '" target="_blank">' . __('Changelog', 'woothemes') . '</a></li>' . "\n";
$html .= '<li class="support"><a href="' . esc_url('http://support.woothemes.com/') . '" target="_blank">' . __('Help', 'woothemes') . '</a></li>' . "\n";
do_action('wf_useful_links_list_end');
$html .= '</ul>' . "\n";
echo $html;
do_action('wf_useful_links_after');
}
示例4: wooframework_display_theme_version_data
/**
* Display the version data for the currently active theme.
* @since 5.4.2
* @return void
*/
function wooframework_display_theme_version_data($echo = true)
{
$data = wooframework_get_theme_version_data();
$html = '';
// Theme Version
if (true == $data['is_child']) {
$html .= '<span class="theme">' . esc_html($data['child_theme_name'] . ' ' . $data['child_theme_version']) . '</span>' . "\n";
$html .= '<span class="parent-theme">' . esc_html($data['theme_name'] . ' ' . $data['theme_version']) . '</span>' . "\n";
} else {
$html .= '<span class="theme">' . esc_html($data['theme_name'] . ' ' . $data['theme_version']) . '</span>' . "\n";
}
// Framework Version
$html .= '<span class="framework">' . esc_html(sprintf(__('Framework %s', 'woothemes'), $data['framework_version'])) . '</span>' . "\n";
if (true == $echo) {
echo $html;
} else {
return $html;
}
}
示例5: set_theme_data
/**
* Set the theme data into a local property.
* @access protected
* @since 6.0.0
* @return void
*/
protected function set_theme_data()
{
$this->_theme_data = wooframework_get_theme_version_data();
$this->_theme_obj = wp_get_theme();
}
示例6: woo_theme_update_notice
function woo_theme_update_notice()
{
$data = wooframework_get_theme_version_data();
$local_version = $data['theme_version'];
$update_data = woothemes_version_checker($local_version);
if (!isset($update_data['version']) || !is_string($update_data['version'])) {
return;
}
$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;
}
}