本文整理汇总了PHP中et_get_theme_version函数的典型用法代码示例。如果您正苦于以下问题:PHP et_get_theme_version函数的具体用法?PHP et_get_theme_version怎么用?PHP et_get_theme_version使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了et_get_theme_version函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: et_divi_load_scripts_styles
function et_divi_load_scripts_styles()
{
global $wp_styles;
$template_dir = get_template_directory_uri();
$theme_version = et_get_theme_version();
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
wp_register_script('google-maps-api', add_query_arg(array('v' => 3, 'sensor' => 'false'), is_ssl() ? 'https://maps-api-ssl.google.com/maps/api/js' : 'http://maps.google.com/maps/api/js'), array(), $theme_version, true);
wp_enqueue_script('divi-fitvids', $template_dir . '/js/jquery.fitvids.js', array('jquery'), $theme_version, true);
wp_enqueue_script('waypoints', $template_dir . '/js/waypoints.min.js', array('jquery'), $theme_version, true);
wp_enqueue_script('magnific-popup', $template_dir . '/js/jquery.magnific-popup.js', array('jquery'), $theme_version, true);
wp_register_script('hashchange', $template_dir . '/js/jquery.hashchange.js', array('jquery'), $theme_version, true);
wp_register_script('imagesloaded', $template_dir . '/js/imagesloaded.js', array('jquery'), $theme_version, true);
wp_register_script('jquery-masonry-3', $template_dir . '/js/masonry.js', array('jquery', 'imagesloaded'), $theme_version, true);
wp_register_script('easypiechart', $template_dir . '/js/jquery.easypiechart.js', array('jquery'), $theme_version, true);
wp_enqueue_script('divi-custom-script', $template_dir . '/js/custom.js', array('jquery'), $theme_version, true);
wp_localize_script('divi-custom-script', 'et_custom', array('ajaxurl' => admin_url('admin-ajax.php'), 'images_uri' => get_template_directory_uri() . '/images', 'et_load_nonce' => wp_create_nonce('et_load_nonce'), 'subscription_failed' => __('Please, check the fields below to make sure you entered the correct information.', 'Divi'), 'fill' => esc_html__('Fill', 'Divi'), 'field' => esc_html__('field', 'Divi'), 'invalid' => esc_html__('Invalid email', 'Divi'), 'captcha' => esc_html__('Captcha', 'Divi')));
$et_gf_enqueue_fonts = array();
$et_gf_heading_font = sanitize_text_field(et_get_option('heading_font', 'none'));
$et_gf_body_font = sanitize_text_field(et_get_option('body_font', 'none'));
if ('none' != $et_gf_heading_font) {
$et_gf_enqueue_fonts[] = $et_gf_heading_font;
}
if ('none' != $et_gf_body_font) {
$et_gf_enqueue_fonts[] = $et_gf_body_font;
}
if (!empty($et_gf_enqueue_fonts)) {
et_gf_enqueue_fonts($et_gf_enqueue_fonts);
}
/*
* Loads the main stylesheet.
*/
wp_enqueue_style('divi-style', get_stylesheet_uri(), array(), $theme_version);
}
开发者ID:jonbolden,项目名称:samsvapes,代码行数:35,代码来源:functions.php
示例2: et_setup_builder
function et_setup_builder()
{
define('ET_BUILDER_DIR', get_template_directory() . '/includes/builder/');
define('ET_BUILDER_URI', get_template_directory_uri() . '/includes/builder');
define('ET_BUILDER_LAYOUT_POST_TYPE', 'et_pb_layout');
$theme_version = et_get_theme_version();
define('ET_BUILDER_VERSION', $theme_version);
load_theme_textdomain('et_builder', ET_BUILDER_DIR . 'languages');
require ET_BUILDER_DIR . 'framework.php';
}
开发者ID:jimrucinski,项目名称:Vine,代码行数:10,代码来源:et-pagebuilder.php
示例3: et_activate_features
function et_activate_features()
{
define('ET_SHORTCODES_VERSION', et_get_theme_version());
/* activate shortcodes */
require_once TEMPLATEPATH . '/epanel/shortcodes/shortcodes.php';
/* activate page templates */
require_once TEMPLATEPATH . '/epanel/page_templates/page_templates.php';
/* import epanel settings */
require_once TEMPLATEPATH . '/epanel/import_settings.php';
}
开发者ID:rthburke,项目名称:fltHub,代码行数:10,代码来源:custom_functions.php
示例4: extra_setup_builder
function extra_setup_builder()
{
define('ET_BUILDER_DIR', dirname(__FILE__) . '/builder/');
define('ET_BUILDER_URI', get_template_directory_uri() . '/includes/builder');
define('ET_BUILDER_LAYOUT_POST_TYPE', 'et_pb_layout');
define('ET_BUILDER_VERSION', et_get_theme_version());
load_theme_textdomain('et_builder', ET_BUILDER_DIR . 'languages');
require ET_BUILDER_DIR . 'framework.php';
et_pb_register_posttypes();
extra_setup_project_tag_tax();
add_action('et_builder_ready', 'extra_load_layout_builder_modules');
}
开发者ID:rthburke,项目名称:fltHub,代码行数:12,代码来源:builder-integrations.php
示例5: et_load_serene_scripts
function et_load_serene_scripts()
{
$template_dir = get_template_directory_uri();
$theme_version = et_get_theme_version();
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
wp_enqueue_script('serene-superfish', $template_dir . '/js/superfish.js', array('jquery'), $theme_version, true);
wp_enqueue_script('serene-fitvids', $template_dir . '/js/jquery.fitvids.js', array('jquery'), $theme_version, true);
wp_enqueue_script('serene-flexslider', $template_dir . '/js/jquery.flexslider.js', array('jquery'), $theme_version, true);
wp_enqueue_script('serene-custom-script', $template_dir . '/js/custom.js', array('jquery'), $theme_version, true);
wp_enqueue_style('serene-elegant-font', $template_dir . '/css/elegant-font.css');
/*
* Loads the main stylesheet.
*/
wp_enqueue_style('serene-style', get_stylesheet_uri(), array(), $theme_version);
}
开发者ID:pbhanu1994,项目名称:bhanuprakash,代码行数:17,代码来源:functions.php
示例6: et_epanel_media_upload_scripts
function et_epanel_media_upload_scripts()
{
global $themename;
wp_enqueue_script('et_epanel_uploader', get_template_directory_uri() . '/epanel/js/custom_uploader.js', array('jquery', 'media-upload', 'thickbox'), et_get_theme_version());
wp_enqueue_media();
wp_localize_script('et_epanel_uploader', 'epanel_uploader', array('media_window_title' => esc_html__('Choose an Image', $themename)));
}
开发者ID:michaeldyrynda,项目名称:SaxonHyde,代码行数:7,代码来源:core_functions.php
示例7: et_pb_hide_options_menu
function et_pb_hide_options_menu()
{
// do nothing if theme options should be displayed in the menu
if (et_pb_is_allowed('theme_options')) {
return;
}
$theme_version = et_get_theme_version();
wp_enqueue_script('divi-custom-admin-menu', get_template_directory_uri() . '/js/menu_fix.js', array('jquery'), $theme_version, true);
}
开发者ID:welearncodes,项目名称:traktern,代码行数:9,代码来源:functions.php
示例8: extra_admin_scripts
function extra_admin_scripts($hook)
{
global $typenow;
$template_dir = get_template_directory_uri();
$theme_version = SCRIPT_DEBUG ? time() : et_get_theme_version();
$protocol = is_ssl() ? 'https' : 'http';
$suffix = SCRIPT_DEBUG ? '.js' : '.min.js';
if ('nav-menus.php' == $hook) {
wp_enqueue_script('extra_admin_nav_menu_js', $template_dir . '/includes/admin/scripts/nav-menu' . $suffix, array('jquery'), $theme_version, true);
}
if ('widgets.php' == $hook) {
wp_enqueue_script('jquery-ui-accordion');
wp_enqueue_script('extra_widgets_js', $template_dir . '/includes/admin/scripts/widgets' . $suffix, array('jquery'), $theme_version, true);
wp_enqueue_style('extra_widgets_css', $template_dir . '/includes/admin/styles/widgets.css', array(), $theme_version);
wp_localize_script('extra_widgets_js', 'EXTRA', array('label_img_url' => __('Image Url:', 'extra'), 'label_link_url' => __('Link Url:', 'extra'), 'label_ad_html' => __('Ad HTML:', 'extra'), 'label_new_line' => __('Start on New Line', 'extra'), 'label_or' => __('OR', 'extra'), 'label_ad_number' => __('Ad #', 'extra'), 'authorize_nonce' => wp_create_nonce('authorize_nonce'), 'ajaxurl' => admin_url('admin-ajax.php', $protocol)));
}
if ('options-reading.php' == $hook) {
$layouts_query = extra_get_layouts(array('posts_per_page' => -1, 'nopaging' => true, 'post_status' => 'publish'));
if ($layouts_query->posts) {
$layouts = array();
$home_layout_id = extra_get_home_layout_id();
foreach ($layouts_query->posts as $post) {
$layouts[] = array("id" => $post->ID, "name" => $post->post_title);
}
wp_enqueue_script('extra_admin_options_reading_js', $template_dir . '/includes/admin/scripts/options-reading' . $suffix, array('jquery'), $theme_version, true);
wp_localize_script('extra_admin_options_reading_js', 'EXTRA', array('layouts' => json_encode($layouts), 'current_home_layout_id' => $home_layout_id, 'show_on_front' => get_option('show_on_front'), 'extra_theme_layout_link' => sprintf(__('An <a href="%s">Extra Theme Layout</a> (select below)', 'extra'), 'edit.php?post_type=' . EXTRA_LAYOUT_POST_TYPE)));
}
wp_reset_postdata();
}
if (in_array($hook, array('post.php', 'post-new.php'))) {
// load every post and post edit page, i.e. posts, pages, CPTs
wp_enqueue_script('extra_admin_gallery_images_js', $template_dir . '/includes/admin/scripts/gallery-images' . $suffix, array('jquery', 'jquery-ui-sortable'), $theme_version, true);
if ('page' == $typenow) {
wp_enqueue_script('extra_admin_page_template_js', $template_dir . '/includes/admin/scripts/page-template' . $suffix, array('jquery', 'jquery-effects-highlight'), $theme_version, true);
}
if ('post' == $typenow || EXTRA_PROJECT_POST_TYPE == $typenow) {
wp_enqueue_script('extra_admin_posts_js', $template_dir . '/includes/admin/scripts/posts' . $suffix, array('jquery'), $theme_version, true);
wp_localize_script('extra_admin_posts_js', 'EXTRA', array('label_breakdown_title' => __('Title:', 'extra'), 'label_breakdown_rating' => __('Rating (%):', 'extra'), 'label_breakdown_number' => __('Breakdown #', 'extra')));
}
if ('post' == $typenow) {
wp_enqueue_script('extra_admin_post_format_js', $template_dir . '/includes/admin/scripts/post-format' . $suffix, array('jquery', 'jquery-effects-highlight'), $theme_version, true);
}
if (EXTRA_LAYOUT_POST_TYPE == $typenow) {
wp_enqueue_script('extra_admin_post_layout_js', $template_dir . '/includes/admin/scripts/post-layout' . $suffix, array('jquery'), $theme_version, true);
wp_localize_script('extra_admin_post_layout_js', 'EXTRA', array('category_description' => __('Use this layout on the categories selected above.', 'extra')));
}
// load *every* wp-admin post.php and post-new.php page
wp_enqueue_script('extra_admin_js', $template_dir . '/includes/admin/scripts/admin-posts' . $suffix, array('jquery'), $theme_version, true);
}
}
开发者ID:rthburke,项目名称:fltHub,代码行数:50,代码来源:admin.php
示例9: et_aweber_authorization_option
function et_aweber_authorization_option()
{
$theme_version = et_get_theme_version();
wp_enqueue_script('divi-advanced-options', get_template_directory_uri() . '/js/advanced_options.js', array('jquery'), $theme_version, true);
wp_localize_script('divi-advanced-options', 'et_advanced_options', array('et_load_nonce' => wp_create_nonce('et_load_nonce'), 'aweber_connecting' => __('Connecting...', 'Divi'), 'aweber_failed' => __('Connection failed', 'Divi'), 'aweber_remove_connection' => __('Removing connection...', 'Divi'), 'aweber_done' => __('Done', 'Divi')));
wp_enqueue_style('divi-advanced-options', get_template_directory_uri() . '/css/advanced_options.css', array(), $theme_version);
$app_id = 'b17f3351';
$aweber_auth_endpoint = 'https://auth.aweber.com/1.0/oauth/authorize_app/' . $app_id;
$hide_style = ' style="display: none;"';
$aweber_connection_established = et_get_option('divi_aweber_consumer_key', false) && et_get_option('divi_aweber_consumer_secret', false) && et_get_option('divi_aweber_access_key', false) && et_get_option('divi_aweber_access_secret', false);
$output = sprintf('<div id="et_aweber_connection">
<ul id="et_aweber_authorization"%4$s>
<li>%1$s</li>
<li>
<p>%2$s</p>
<p><textarea id="et_aweber_authentication_code" name="et_aweber_authentication_code"></textarea></p>
<p><button class="et_make_connection button button-primary button-large">%3$s</button></p>
</li>
</ul>
<div id="et_aweber_remove_connection"%5$s>
<p>%6$s</p>
<p><button class="et_remove_connection button button-primary button-large">%7$s</button></p>
</div>
</div>', sprintf(__('Step 1: <a href="%1$s" target="_blank">Generate authorization code</a>', 'Divi'), esc_url($aweber_auth_endpoint)), __('Step 2: Paste in the authorization code and click "Make a connection" button: ', 'Divi'), __('Make a connection', 'Divi'), $aweber_connection_established ? $hide_style : '', !$aweber_connection_established ? $hide_style : '', __('Aweber is set up properly. You can remove connection here if you wish.', 'Divi'), __('Remove the connection', 'Divi'));
echo $output;
}
开发者ID:Lumbe,项目名称:dev_servus,代码行数:28,代码来源:functions.php
示例10: define
<?php
define('ET_PB_VERSION', et_get_theme_version());
define('ET_PB_DIR', trailingslashit(dirname(__FILE__)));
define('ET_PB_URI', get_template_directory_uri() . '/et-pagebuilder');
// load pre-defined layouts
require_once ET_PB_DIR . '/layouts/layouts.php';
// exclude predefined layouts from import
function et_remove_predefined_layouts_from_import($posts)
{
$processed_posts = $posts;
if (isset($posts) && is_array($posts)) {
$processed_posts = array();
foreach ($posts as $post) {
if (isset($post['postmeta']) && is_array($post['postmeta'])) {
foreach ($post['postmeta'] as $meta) {
if ('_et_pb_predefined_layout' === $meta['key'] && 'on' === $meta['value']) {
continue 2;
}
}
}
$processed_posts[] = $post;
}
}
return $processed_posts;
}
add_filter('wp_import_posts', 'et_remove_predefined_layouts_from_import');
function et_pb_export_layouts_page()
{
add_theme_page(esc_html__('Export Page Builder Layouts', 'Divi'), esc_html__('Export Page Builder Layouts', 'Divi'), 'export', 'et_pb_export_layouts', 'et_pb_export_layouts_interface');
if (isset($_GET['page']) && 'et_divi_homepage_builder' === $_GET['page'] && isset($_POST['et_hb_action'])) {
开发者ID:ahmedghazi,项目名称:tpls,代码行数:31,代码来源:et-pagebuilder.php
示例11: extra_customize_controls_enqueue_scripts
function extra_customize_controls_enqueue_scripts()
{
$theme_version = et_get_theme_version();
wp_enqueue_style('extra-customizer-controls-styles', get_template_directory_uri() . '/styles/css/theme-customizer-controls.css', array(), $theme_version);
wp_enqueue_script('extra-customizer-controls-js', get_template_directory_uri() . '/scripts/theme-customizer-controls.js', array('jquery'), $theme_version, true);
wp_localize_script('extra-customizer-controls-js', 'extra_customizer_control_params', array('footer_sidebar_names' => array('column-1' => array(__('Footer Sidebar', 'extra'), __('Inactive Footer Sidebar', 'extra'), __('Inactive Footer Sidebar', 'extra'), __('Inactive Footer Sidebar', 'extra')), 'column-2' => array(__('Footer Sidebar Left', 'extra'), __('Inactive Footer Sidebar', 'extra'), __('Inactive Footer Sidebar', 'extra'), __('Footer Sidebar Right', 'extra')), 'column-3' => array(__('Footer Sidebar Left', 'extra'), __('Footer Sidebar Middle', 'extra'), __('Inactive Footer Sidebar', 'extra'), __('Footer Sidebar Right', 'extra')), 'column-4' => array(__('Footer Sidebar Left', 'extra'), __('Footer Sidebar Middle Left', 'extra'), __('Footer Sidebar Middle Right', 'extra'), __('Footer Sidebar Right', 'extra')))));
}
开发者ID:rthburke,项目名称:fltHub,代码行数:7,代码来源:customizer.php
示例12: _et_register_sidebar
function _et_register_sidebar($args)
{
global $themename;
$default_args = array('name' => '', 'id' => '', 'before_widget' => '<div id="%1$s" class="et_pb_widget %2$s">', 'after_widget' => '</div> <!-- end .et_pb_widget -->', 'before_title' => '<h4 class="widgettitle">', 'after_title' => '</h4>');
$args = wp_parse_args($args, $default_args);
if (empty($args['name'])) {
$version = sprintf('%s, Theme: %s', et_get_theme_version(), $themename);
_doing_it_wrong(__FUNCTION__, "'name' argument required", $version);
return;
}
if (empty($args['id'])) {
$args['id'] = sanitize_title_with_dashes($args['name']);
if (strpos($args['id'], '-sidebar') !== false) {
$args['id'] = 'sidebar-' . str_replace('-sidebar', '', $args['id']);
}
}
register_sidebar($args);
}
开发者ID:rthburke,项目名称:fltHub,代码行数:18,代码来源:functions.php
示例13: extra_print_dynamic_styles
function extra_print_dynamic_styles()
{
$shared_paramless_callbacks = array();
foreach (extra_dynamic_styles() as $option_name => $option_properties) {
$option_properties['default'] = isset($option_properties['default']) ? $option_properties['default'] : '';
$value = esc_html(et_get_option($option_name, $option_properties['default']));
$option_properties = apply_filters('extra_print_dynamic_styles-' . $option_name, $option_properties, $value);
$default = !empty($option_properties['default']) ? (string) $option_properties['default'] : "";
if (strtolower($default) === strtolower($value) || "" === strtolower($value) && "0" === strtolower($default) || !$option_properties) {
continue;
}
$style_id = 'extra-dynamic-styles-' . esc_attr($option_name);
$output = "\n" . '<style id="' . $style_id . '" type="text/css">' . "\n";
$value_bind = $option_properties['value_bind'];
$value_bind_style = $value_bind['style'];
$value_bind_property_selectors = $value_bind['property_selectors'];
if ('dynamic_selectors' === $value_bind_style) {
foreach ($value_bind_property_selectors as $property => $property_selectors) {
if (empty($property_selectors)) {
continue;
}
$property_selectors = implode(",\n", $property_selectors);
$prop_style_id = $style_id . '-' . $property;
$css = extra_dynamic_selector_css($property_selectors, $value, $property);
$css = apply_filters('extra_print_dynamic_styles-' . $prop_style_id . '-css_output', $css, $option_properties, $value);
echo extra_set_dynamic_style_el($prop_style_id, $css);
}
} else {
if ('dynamic_selectors_value_format' === $value_bind_style) {
foreach ($value_bind_property_selectors as $property_options) {
if (empty($property_options['selectors'])) {
continue;
}
$property_selectors = implode(",\n", $property_options['selectors']);
$format = $property_options['format'];
if (empty($value)) {
continue 2;
}
$formatted_value = str_replace('%value%', $value, $format);
$property = $property_options['property'];
$prop_style_id = $style_id . '-' . $property;
if (!empty($value_bind['use_only_formatted_value'])) {
$css = extra_dynamic_selector_css($property_selectors, $formatted_value);
} else {
$css = extra_dynamic_selector_css($property_selectors, $formatted_value, $property);
}
$css = apply_filters('extra_print_dynamic_styles-' . $prop_style_id . '-css_output', $css, $option_properties, $value);
echo extra_set_dynamic_style_el($prop_style_id, $css);
}
} else {
if ('dynamic_selectors_value_format_callback' === $value_bind_style) {
foreach ($value_bind_property_selectors as $property => $property_selectors) {
$use_formatted_value_as_css_expression = (bool) (!empty($value_bind['use_formatted_value_as_css_expression']));
if (empty($property_selectors) && !$use_formatted_value_as_css_expression) {
continue;
}
if (!$use_formatted_value_as_css_expression) {
$property_selectors = implode(",\n", $property_selectors);
}
$callback = $value_bind['value_format_callback'];
$prop_style_id = $style_id . '-' . $property;
if (is_callable($callback)) {
$formatted_value = $callback($option_name, $property, $value);
} else {
_doing_it_wrong(__FUNCTION__, sprintf(__('Callback function: "%s" doesnt exist', 'extra'), $callback), et_get_theme_version());
continue;
}
if ($use_formatted_value_as_css_expression) {
$css = $formatted_value;
} else {
if (!empty($value_bind['use_only_formatted_value'])) {
$css = extra_dynamic_selector_css($property_selectors, $formatted_value);
} else {
$css = extra_dynamic_selector_css($property_selectors, $formatted_value, $property);
}
}
$css = apply_filters('extra_print_dynamic_styles-' . $prop_style_id . '-css_output', $css, $option_properties, $value);
echo extra_set_dynamic_style_el($prop_style_id, $css);
}
} else {
if ('dynamic_selectors_shared_paramless_callback' === $value_bind_style) {
// Paramless callbacks should be printed once only
$shared_paramless_callbacks[$value_bind['value_format_callback']] = $value_bind['value_format_callback'];
}
}
}
}
}
foreach ($shared_paramless_callbacks as $shared_paramless_callback) {
if (is_callable($shared_paramless_callback)) {
// The parameters on param callback is kept as is to mimic its dynamic_selectors_value_format_callback counterpart
// and provide support for passing all customizer options via AJAX-based callback for option which has no JS callback
$css = $shared_paramless_callback(null, null, null);
} else {
_doing_it_wrong(__FUNCTION__, sprintf(__('Callback function: "%s" doesnt exist', 'extra'), $shared_paramless_callback), et_get_theme_version());
continue;
}
$css = apply_filters('extra_print_dynamic_styles-' . $shared_paramless_callback . '-css_output', $css);
echo extra_set_dynamic_style_el('extra-dynamic-styles-' . $shared_paramless_callback, $css);
}
//.........这里部分代码省略.........
开发者ID:rthburke,项目名称:fltHub,代码行数:101,代码来源:core.php
注:本文中的et_get_theme_version函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论