PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 6.1.2
Jetpack – WP Security, Backup, Speed, & Growth v6.1.2
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / 3rd-party / bbpress.php
bbpress.php
51 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 add_action( 'init', 'jetpack_bbpress_compat', 11 ); // Priority 11 needed to ensure sharing_display is loaded.
3
4 /**
5 * Adds Jetpack + bbPress Compatibility filters.
6 *
7 * @author Brandon Kraft
8 * @since 3.7.1
9 */
10 function jetpack_bbpress_compat() {
11 if ( function_exists( 'sharing_display' ) ) {
12 add_filter( 'bbp_get_topic_content', 'sharing_display', 19 );
13 add_action( 'bbp_template_after_single_forum', 'jetpack_sharing_bbpress' );
14 add_action( 'bbp_template_after_single_topic', 'jetpack_sharing_bbpress' );
15 }
16
17 /**
18 * Enable Markdown support for bbpress post types.
19 *
20 * @author Brandon Kraft
21 * @since 6.0.0
22 */
23 if ( function_exists( 'bbp_get_topic_post_type' ) ) {
24 add_post_type_support( bbp_get_topic_post_type(), 'wpcom-markdown' );
25 add_post_type_support( bbp_get_reply_post_type(), 'wpcom-markdown' );
26 add_post_type_support( bbp_get_forum_post_type(), 'wpcom-markdown' );
27 }
28
29 /**
30 * Use Photon for all images in Topics and replies.
31 *
32 * @since 4.9.0
33 */
34 if ( class_exists( 'Jetpack_Photon' ) && Jetpack::is_module_active( 'photon' ) ) {
35 add_filter( 'bbp_get_topic_content', array( 'Jetpack_Photon', 'filter_the_content' ), 999999 );
36 add_filter( 'bbp_get_reply_content', array( 'Jetpack_Photon', 'filter_the_content' ), 999999 );
37 }
38 }
39
40 /**
41 * Display Jetpack "Sharing" buttons on bbPress 2.x forums/ topics/ lead topics/ replies.
42 *
43 * Determination if the sharing buttons should display on the post type is handled within sharing_display().
44 *
45 * @author David Decker
46 * @since 3.7.0
47 */
48 function jetpack_sharing_bbpress() {
49 sharing_display( null, true );
50 }
51