本文整理汇总了PHP中bp_get_version函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_version函数的具体用法?PHP bp_get_version怎么用?PHP bp_get_version使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_get_version函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: bp_core_register_common_styles
/**
* Register styles commonly used by BuddyPress.
*
* @since 2.1.0
*/
function bp_core_register_common_styles()
{
$min = bp_core_get_minified_asset_suffix();
$url = buddypress()->plugin_url . 'bp-core/css/';
/**
* Filters the URL for the Admin Bar stylesheet.
*
* @since 1.1.0
*
* @param string $value URL for the Admin Bar stylesheet.
*/
$admin_bar_file = apply_filters('bp_core_admin_bar_css', "{$url}admin-bar{$min}.css");
/**
* Filters the BuddyPress Core stylesheet files to register.
*
* @since 2.1.0
*
* @param array $value Array of stylesheet file information to register.
*/
$styles = apply_filters('bp_core_register_common_styles', array('bp-admin-bar' => array('file' => $admin_bar_file, 'dependencies' => array('admin-bar')), 'bp-avatar' => array('file' => "{$url}avatar{$min}.css", 'dependencies' => array('jcrop'))));
foreach ($styles as $id => $style) {
wp_register_style($id, $style['file'], $style['dependencies'], bp_get_version());
wp_style_add_data($id, 'rtl', true);
if ($min) {
wp_style_add_data($id, 'suffix', $min);
}
}
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:33,代码来源:bp-core-cssjs.php
示例2: includes
/**
* In BP 1.5, stub the includes function to prevent re-including files
* In BP 1.6, call it since we've suppressed the parent invocation
*/
function includes($includes = array())
{
if (floatval(bp_get_version()) >= 1.6) {
$includes = array('cache', 'forums', 'actions', 'filters', 'screens', 'classes', 'widgets', 'activity', 'template', 'buddybar', 'adminbar', 'functions', 'notifications');
parent::includes($includes);
}
}
开发者ID:elderfd,项目名称:cfsf,代码行数:11,代码来源:bp-group-hierarchy-loader.php
示例3: xprofile_add_admin_js
/**
* Enqueue the jQuery libraries for handling drag/drop/sort.
*
* @since 1.5.0
*/
function xprofile_add_admin_js()
{
if (!empty($_GET['page']) && strpos($_GET['page'], 'bp-profile-setup') !== false) {
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-tabs');
wp_enqueue_script('jquery-ui-mouse');
wp_enqueue_script('jquery-ui-draggable');
wp_enqueue_script('jquery-ui-droppable');
wp_enqueue_script('jquery-ui-sortable');
$min = bp_core_get_minified_asset_suffix();
wp_enqueue_script('xprofile-admin-js', buddypress()->plugin_url . "bp-xprofile/admin/js/admin{$min}.js", array('jquery', 'jquery-ui-sortable'), bp_get_version());
// Localize strings.
// supports_options_field_types is a dynamic list of field
// types that support options, for use in showing/hiding the
// "please enter options for this field" section.
$strings = array('do_settings_section_field_types' => array(), 'do_autolink' => '');
foreach (bp_xprofile_get_field_types() as $field_type => $field_type_class) {
$field = new $field_type_class();
if ($field->do_settings_section()) {
$strings['do_settings_section_field_types'][] = $field_type;
}
}
// Load 'autolink' setting into JS so that we can provide smart defaults when switching field type.
if (!empty($_GET['field_id'])) {
$field_id = intval($_GET['field_id']);
// Pull the raw data from the DB so we can tell whether the admin has saved a value yet.
$strings['do_autolink'] = bp_xprofile_get_meta($field_id, 'field', 'do_autolink');
}
wp_localize_script('xprofile-admin-js', 'XProfileAdmin', $strings);
}
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:36,代码来源:bp-xprofile-cssjs.php
示例4: xprofile_add_admin_js
/**
* Enqueue the jQuery libraries for handling drag/drop/sort.
*
* @since 1.5.0
*/
function xprofile_add_admin_js()
{
if (!empty($_GET['page']) && strpos($_GET['page'], 'bp-profile-setup') !== false) {
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-tabs');
wp_enqueue_script('jquery-ui-mouse');
wp_enqueue_script('jquery-ui-draggable');
wp_enqueue_script('jquery-ui-droppable');
wp_enqueue_script('jquery-ui-sortable');
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script('xprofile-admin-js', buddypress()->plugin_url . "bp-xprofile/admin/js/admin{$min}.js", array('jquery', 'jquery-ui-sortable'), bp_get_version());
// Localize strings.
// supports_options_field_types is a dynamic list of field
// types that support options, for use in showing/hiding the
// "please enter options for this field" section.
$strings = array('supports_options_field_types' => array());
foreach (bp_xprofile_get_field_types() as $field_type => $field_type_class) {
$field = new $field_type_class();
if ($field->supports_options) {
$strings['supports_options_field_types'][] = $field_type;
}
}
wp_localize_script('xprofile-admin-js', 'XProfileAdmin', $strings);
}
}
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:30,代码来源:bp-xprofile-cssjs.php
示例5: bp_activity_mentions_script
/**
* Enqueue @mentions JS.
*
* @since 2.1.0
*/
function bp_activity_mentions_script()
{
if (!bp_activity_maybe_load_mentions_scripts()) {
return;
}
// Special handling for New/Edit screens in wp-admin.
if (is_admin()) {
if (!get_current_screen() || !in_array(get_current_screen()->base, array('page', 'post')) || !post_type_supports(get_current_screen()->post_type, 'editor')) {
return;
}
}
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script('bp-mentions', buddypress()->plugin_url . "bp-activity/js/mentions{$min}.js", array('jquery', 'jquery-atwho'), bp_get_version(), true);
wp_enqueue_style('bp-mentions-css', buddypress()->plugin_url . "bp-activity/css/mentions{$min}.css", array(), bp_get_version());
wp_style_add_data('bp-mentions-css', 'rtl', true);
if ($min) {
wp_style_add_data('bp-mentions-css', 'suffix', $min);
}
// If the script has been enqueued, let's attach our mentions TinyMCE init callback.
add_filter('tiny_mce_before_init', 'bp_add_mentions_on_tinymce_init', 10, 2);
/**
* Fires at the end of the Activity Mentions script.
*
* This is the hook where BP components can add their own prefetched results
* friends to the page for quicker @mentions lookups.
*
* @since 2.1.0
*/
do_action('bp_activity_mentions_prime_results');
}
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:35,代码来源:bp-activity-cssjs.php
示例6: messages_add_autocomplete_css
function messages_add_autocomplete_css()
{
if (bp_is_messages_component() && bp_is_current_action('compose')) {
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_style('bp-messages-autocomplete', buddypress()->plugin_url . "bp-messages/css/autocomplete/jquery.autocompletefb{$min}.css", array(), bp_get_version());
wp_print_styles();
}
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:8,代码来源:bp-messages-cssjs.php
示例7: setup_globals
/**
* Component global variables
*
* You'll want to customize the values in here, so they match whatever your
* needs are.
*
* @since BuddyPress (1.7)
* @access private
*/
protected function setup_globals()
{
$bp = buddypress();
$this->id = 'legacy';
$this->name = __('BuddyPress Legacy', 'buddypress');
$this->version = bp_get_version();
$this->dir = trailingslashit($bp->themes_dir . '/bp-legacy');
$this->url = trailingslashit($bp->themes_url . '/bp-legacy');
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:18,代码来源:buddypress-functions.php
示例8: setup_globals
/**
* Component global variables
*
* You'll want to customize the values in here, so they match whatever your
* needs are.
*
* @since BuddyPress Templates (1.0)
*/
protected function setup_globals()
{
$bp = buddypress();
$this->id = 'templatepack';
$this->name = __('BuddyPress Templates', 'buddypress');
$this->version = bp_get_version();
$this->dir = plugin_dir_path(__FILE__);
$this->url = plugin_dir_url(__FILE__);
}
开发者ID:wesavetheworld,项目名称:buddypress-templates,代码行数:17,代码来源:buddypress-functions.php
示例9: __construct
function __construct()
{
$widget_ops = array('description' => __('A dynamic list of recently active, popular, and newest groups', 'buddypress'), 'classname' => 'widget_bp_groups_widget buddypress');
parent::__construct(false, _x('(BuddyPress) Groups', 'widget name', 'buddypress'), $widget_ops);
if (is_active_widget(false, false, $this->id_base) && !is_admin() && !is_network_admin()) {
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script('groups_widget_groups_list-js', BP_PLUGIN_URL . "bp-groups/js/widget-groups{$min}.js", array('jquery'), bp_get_version());
}
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:9,代码来源:groups-widget.php
示例10: bp_core_confirmation_js
/**
* Load the JS for "Are you sure?" .confirm links.
*/
function bp_core_confirmation_js()
{
if (is_multisite() && !bp_is_root_blog()) {
return false;
}
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script('bp-confirm', buddypress()->plugin_url . "bp-core/js/confirm{$min}.js", array('jquery'), bp_get_version());
wp_localize_script('bp-confirm', 'BP_Confirm', array('are_you_sure' => __('Are you sure?', 'buddypress')));
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:12,代码来源:bp-core-cssjs.php
示例11: __construct
/**
* Working as a group, we get things done better.
*
* @since 1.0.3
*/
public function __construct()
{
$widget_ops = array('description' => __('A dynamic list of recently active, popular, and newest groups', 'buddypress'), 'classname' => 'widget_bp_groups_widget buddypress widget');
parent::__construct(false, _x('(BuddyPress) Groups', 'widget name', 'buddypress'), $widget_ops);
if (is_active_widget(false, false, $this->id_base) && !is_admin() && !is_network_admin()) {
$min = bp_core_get_minified_asset_suffix();
wp_enqueue_script('groups_widget_groups_list-js', buddypress()->plugin_url . "bp-groups/js/widget-groups{$min}.js", array('jquery'), bp_get_version());
}
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:14,代码来源:class-bp-groups-widget.php
示例12: dln_social_enqueue_scripts
function dln_social_enqueue_scripts()
{
if (!is_admin()) {
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-migrate');
wp_enqueue_script('dln-code-beautify', get_template_directory_uri() . '/assets/js-beautify/beautify.js', array('jquery'), bp_get_version(), true);
wp_enqueue_script('dln-code-beautify-html', get_template_directory_uri() . '/assets/js-beautify/beautify-html.js', array('jquery'), bp_get_version(), true);
wp_enqueue_script('dln-bootstrap', get_template_directory_uri() . '/assets/bootstrap/js/bootstrap.min.js');
}
}
开发者ID:httvncoder,项目名称:151722441,代码行数:10,代码来源:functions.php
示例13: load_css
public function load_css()
{
// Register our main stylesheet
$theme_uri = get_template_directory_uri();
$stylesheet_uri = get_stylesheet_uri();
wp_register_style('bpmagic-css', $stylesheet_uri, array(), bp_get_version());
wp_register_style('bpmagic-uniform-css', $theme_uri . '/_inc/css/uniform.default.css', array(), bp_get_version());
wp_enqueue_style('bpmagic-css');
wp_enqueue_style('bpmagic-uniform-css');
}
开发者ID:buddydev,项目名称:bp-magic,代码行数:10,代码来源:css-js.php
示例14: messages_add_autocomplete_css
function messages_add_autocomplete_css()
{
if (bp_is_messages_component() && bp_is_current_action('compose')) {
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
wp_enqueue_style('bp-messages-autocomplete', BP_PLUGIN_URL . 'bp-messages/css/autocomplete/jquery.autocompletefb.dev.css', array(), bp_get_version());
} else {
wp_enqueue_style('bp-messages-autocomplete', BP_PLUGIN_URL . 'bp-messages/css/autocomplete/jquery.autocompletefb.css', array(), bp_get_version());
}
wp_print_styles();
}
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:11,代码来源:bp-messages-cssjs.php
示例15: bp_enqueue_defaults_init
function bp_enqueue_defaults_init()
{
global $cssPath;
// Load the theme's BuddyPress CSS file
theme_register_css('buddypress', $cssPath . 'buddypress.css', 1);
// Load the default BuddyPress javascript
wp_enqueue_script('bp-ajax-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'), bp_get_version());
// Add words that we need to use in JS to the end of the page so they can be translated and still used.
$params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'show_x_comments' => __('Show all %d comments', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'view' => __('View', 'buddypress'), 'mark_as_fav' => __('Favorite', 'buddypress'), 'remove_fav' => __('Remove Favorite', 'buddypress'));
wp_localize_script('bp-ajax-js', 'BP_DTheme', $params);
}
开发者ID:perusoa,项目名称:anthony-peruso-website,代码行数:11,代码来源:buddypress.php
示例16: bp_email_init_customizer
/**
* Initialize the Customizer for emails.
*
* @since 2.5.0
*
* @param WP_Customize_Manager $wp_customize The Customizer object.
*/
function bp_email_init_customizer(WP_Customize_Manager $wp_customize)
{
// Require WP 4.0+.
if (!method_exists($wp_customize, 'add_panel')) {
return;
}
if (!bp_is_email_customizer() && (!defined('DOING_AJAX') || !DOING_AJAX)) {
return;
}
$wp_customize->add_panel('bp_mailtpl', array('description' => __('Customize the appearance of emails sent by BuddyPress.', 'buddypress'), 'title' => _x('BuddyPress Emails', 'screen heading', 'buddypress')));
$sections = bp_email_get_customizer_sections();
foreach ($sections as $section_id => $args) {
$wp_customize->add_section($section_id, $args);
}
$settings = bp_email_get_customizer_settings();
foreach ($settings as $setting_id => $args) {
$wp_customize->add_setting($setting_id, $args);
}
/**
* BP_Customizer_Control_Range class.
*/
if (!buddypress()->do_autoload) {
require_once dirname(__FILE__) . '/classes/class-bp-customizer-control-range.php';
}
/**
* Fires to let plugins register extra Customizer controls for emails.
*
* @since 2.5.0
*
* @param WP_Customize_Manager $wp_customize The Customizer object.
*/
do_action('bp_email_customizer_register_sections', $wp_customize);
$controls = bp_email_get_customizer_controls();
foreach ($controls as $control_id => $args) {
$wp_customize->add_control(new $args['class']($wp_customize, $control_id, $args));
}
/*
* Hook actions/filters for further configuration.
*/
add_filter('customize_section_active', 'bp_email_customizer_hide_sections', 12, 2);
if (is_customize_preview()) {
/*
* Enqueue scripts/styles for the Customizer's preview window.
*
* Scripts can't be registered in bp_core_register_common_styles() etc because
* the Customizer loads very, very early.
*/
$bp = buddypress();
$min = bp_core_get_minified_asset_suffix();
wp_enqueue_script('bp-customizer-receiver-emails', "{$bp->plugin_url}bp-core/admin/js/customizer-receiver-emails{$min}.js", array('customize-preview'), bp_get_version(), true);
// Include the preview loading style
add_action('wp_footer', array($wp_customize, 'customize_preview_loading_style'));
}
}
开发者ID:dcavins,项目名称:buddypress-svn,代码行数:61,代码来源:bp-core-customizer-email.php
示例17: __construct
function __construct()
{
$widget_ops = array('description' => __('A dynamic list of recently active, popular, and newest members', 'buddypress'));
parent::__construct(false, $name = __('Members', 'buddypress'), $widget_ops);
if (is_active_widget(false, false, $this->id_base) && !is_admin() && !is_network_admin()) {
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
wp_enqueue_script('bp_core_widget_members-js', BP_PLUGIN_URL . 'bp-core/js/widget-members.dev.js', array('jquery'), bp_get_version());
} else {
wp_enqueue_script('bp_core_widget_members-js', BP_PLUGIN_URL . 'bp-core/js/widget-members.js', array('jquery'), bp_get_version());
}
}
}
开发者ID:vsalx,项目名称:rattieinfo,代码行数:12,代码来源:bp-core-widgets.php
示例18: wpmudev_chat_buddypress_init
function wpmudev_chat_buddypress_init()
{
if (class_exists('BP_Group_Extension')) {
if (version_compare(bp_get_version(), "1.8") >= 0) {
include_once 'buddypress/wpmudec_chat_buddypress_group_1.8.php';
} else {
include_once 'buddypress/wpmudec_chat_buddypress_group_1.7.2.php';
}
if (class_exists('WPMUDEV_Chat_BuddyPress')) {
bp_register_group_extension('WPMUDEV_Chat_BuddyPress');
}
}
}
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:13,代码来源:wpmudev_chat_buddypress.php
示例19: xprofile_add_admin_js
/**
* Enqueue the jQuery libraries for handling drag/drop/sort
*
* @since BuddyPress (1.5)
*/
function xprofile_add_admin_js()
{
if (!empty($_GET['page']) && strpos($_GET['page'], 'bp-profile-setup') !== false) {
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-tabs');
wp_enqueue_script('jquery-ui-mouse');
wp_enqueue_script('jquery-ui-draggable');
wp_enqueue_script('jquery-ui-droppable');
wp_enqueue_script('jquery-ui-sortable');
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script('xprofile-admin-js', buddypress()->plugin_url . "bp-xprofile/admin/js/admin{$min}.js", array('jquery', 'jquery-ui-sortable'), bp_get_version());
}
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:18,代码来源:bp-xprofile-cssjs.php
示例20: bp_core_register_common_styles
/**
* Register styles commonly used by BuddyPress.
*
* @since BuddyPress (2.1.0)
*/
function bp_core_register_common_styles()
{
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
$url = buddypress()->plugin_url . 'bp-core/css/';
$styles = apply_filters('bp_core_register_common_styles', array('bp-admin-bar' => array('file' => apply_filters('bp_core_admin_bar_css', "{$url}admin-bar{$min}.css"), 'dependencies' => array('admin-bar'))));
foreach ($styles as $id => $style) {
wp_register_style($id, $style['file'], $style['dependencies'], bp_get_version());
wp_style_add_data($id, 'rtl', true);
if ($min) {
wp_style_add_data($id, 'suffix', $min);
}
}
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:18,代码来源:bp-core-cssjs.php
注:本文中的bp_get_version函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论