bp_email_init_customizer (WP_Customize_Managerwp_customize美元)
初始化电子邮件的定制器。
描述
参数
- wp_customize美元
-
(WP_Customize_Manager)(必需)编辑器对象。
源
文件:bp-core / bp-core-customizer-email.php
function bp_email_init_customizer(WP_Customize_Manager $wp_customize) {if (!Bp_is_email_customizer () && (!define ('DOING_AJAX') || !DOING_AJAX) {return;} $wp_customize->add_panel('bp_mailtpl', array('description' => __('自定义BuddyBoss发送的电子邮件的外观。”、“buddyboss”),“标题 ' => __( ' BuddyBoss邮件”、“BuddyBoss”),));部分美元= 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);} /** *火灾,让插件注册额外的Customizer控制电子邮件。 * * @since BuddyPress 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' ) ); } }
更新日志
版本 | 描述 |
---|---|
BuddyPress 2.5.0 | 介绍了。 |