PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / trunk
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI vtrunk
8.0.1 8.0.2 8.0.0 7.9.9.7 7.9.9.6 7.9.9.5 7.9.9.4 7.9.9.3 7.9.9.2 7.9.9.1 7.9.9 7.9.8 7.9.7 7.9.6 7.9.5 7.9.4 7.9.3 7.9.2 7.9.1 7.9.0 7.8.9 7.8.8 7.8.7 7.8.6 7.8.5 All 44 releases
gamipress / includes / compatibility / wordpress.php

wordpress.php in GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI trunk, at includes/compatibility/wordpress.php

52 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * GamiPress compatibility with newest WordPress functions
4 *
5 * @package GamiPress\Compatibility\WordPress
6 * @author GamiPress <contact@gamipress.com>, Ruben Garcia <rubengcdev@gmail.com>
7 * @since 1.4.9
8 */
9 // Exit if accessed directly
10 if( !defined( 'ABSPATH' ) ) exit;
11
12 if( ! function_exists( 'get_post_types_by_support' ) ) :
13
14 /**
15 * Retrieves a list of post type names that support a specific feature.
16 *
17 * @since 4.5.0
18 *
19 * @global array $_wp_post_type_features Post type features
20 *
21 * @param array|string $feature Single feature or an array of features the post types should support.
22 * @param string $operator Optional. The logical operation to perform. 'or' means
23 * only one element from the array needs to match; 'and'
24 * means all elements must match; 'not' means no elements may
25 * match. Default 'and'.
26 * @return array A list of post type names.
27 */
28 function get_post_types_by_support( $feature, $operator = 'and' ) {
29 global $_wp_post_type_features;
30
31 $features = array_fill_keys( (array) $feature, true );
32
33 return array_keys( wp_filter_object_list( $_wp_post_type_features, $features, $operator ) );
34 }
35
36 endif;
37
38 if( ! function_exists( 'do_blocks' ) ) :
39
40 /**
41 * Parses dynamic blocks out of `post_content` and re-renders them.
42 *
43 * @since 5.0.0
44 *
45 * @param string $content Post content.
46 * @return string Updated post content.
47 */
48 function do_blocks( $content ) {
49 return $content;
50 }
51
52 endif;