BP_Members_Admin: enqueue_scripts ()
向“编辑用户”和“编辑用户概要文件”页面添加一些特定的样式。
描述
源
文件:bp-members /类/ class-bp-members-admin.php
Public function enqueue_scripts() {if (!In_array (get_current_screen()->id, $this->screen_id)) {return;} $min = bp_core_get_minified_asset_suffix();$this->css_url。“管理{$分钟}. css”;/** *过滤CSS URL以在成员管理区域排队。* * @since BuddyPress 2.0.0 * * @param string $css URL到css管理文件加载。*/ $css = apply_filters('bp_members_admin_css', $css);Wp_enqueue_style ('bp-members-css', $css, array(), bp_get_version());Wp_style_add_data ('bp-members-css', 'rtl', true); if ( $min ) { wp_style_add_data( 'bp-members-css', 'suffix', $min ); } // Only load JavaScript for BuddyPress profile. if ( get_current_screen()->id == $this->user_page ) { $js = $this->js_url . "admin{$min}.js"; /** * Filters the JS URL to enqueue in the Members admin area. * * @since BuddyPress 2.0.0 * * @param string $js URL to the JavaScript admin file to load. */ $js = apply_filters( 'bp_members_admin_js', $js ); wp_enqueue_script( 'bp-members-js', $js, array( 'jquery' ), bp_get_version(), true ); } /** * Fires after all of the members JavaScript and CSS are enqueued. * * @since BuddyPress 2.0.0 * * @param string $id ID of the current screen. * @param array $screen_id Array of allowed screens to add scripts and styles to. */ do_action( 'bp_members_admin_enqueue_scripts', get_current_screen()->id, $this->screen_id ); }
更新日志
版本 | 描述 |
---|---|
BuddyPress 2.0.0 | 介绍了。 |