compatibility
6 years ago
access.php
1 year ago
classes.php
2 years ago
compatibility.php
2 years ago
data.php
1 year ago
forms.php
4 years ago
general.php
1 year ago
media.php
4 years ago
compatibility.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package Pods\Global\Functions\Compatibility |
| 5 | */ |
| 6 | |
| 7 | // Add backwards compatibility for tribe() for old add-ons that may still call it. |
| 8 | if ( |
| 9 | ! function_exists( 'tribe_is_not_min_php_version' ) |
| 10 | && ! function_exists( 'tribe' ) |
| 11 | && ! doing_action( 'activate_plugin' ) |
| 12 | && ! did_action( 'activate_plugin' ) |
| 13 | && ( |
| 14 | ! defined( 'WP_SANDBOX_SCRAPING' ) |
| 15 | || ! WP_SANDBOX_SCRAPING |
| 16 | ) |
| 17 | && 'activate' !== pods_v( 'action' ) |
| 18 | ) { |
| 19 | /** |
| 20 | * Compatibility function for Pods 2.x add-ons that may still call tribe(). |
| 21 | * |
| 22 | * @since 3.0.5 |
| 23 | * |
| 24 | * @param string|null $slug_or_class Either the slug of a binding previously registered using singleton or |
| 25 | * register or the full class name that should be automagically created or |
| 26 | * `null` to get the container instance itself. |
| 27 | * |
| 28 | * @return mixed|null The pods_container() object or null if the function does not exist yet. |
| 29 | */ |
| 30 | function tribe( $slug_or_class = null ) { |
| 31 | _doing_it_wrong( 'tribe', 'tribe() is no longer included in Pods Framework directly. Please use pods_container() instead.', '3.0' ); |
| 32 | |
| 33 | return pods_container( $slug_or_class ); |
| 34 | } |
| 35 | } |
| 36 |