PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 8.0.5
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v8.0.5
8.0.5 8.0.4 8.0.3 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 All 47 releases
← All changes | includes/compatibility/wordpress.php +52 -0 7.9.1 → 8.0.5 View file →
@@ -1,0 +1,52 @@
1 +<?php
2 +/**
3 + * GamiPress compatibility with newest WordPress functions
4 + *
5 + * @package GamiPress\Compatibility\WordPress
6 + * @author GamiPress <[email protected]>, Ruben Garcia <[email protected]>
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;