| 1 |
<?php |
| 2 |
/** |
| 3 |
* Deprecated Hooks of CartFlows Plugin. |
| 4 |
* |
| 5 |
* @package CartFlows |
| 6 |
* @author CartFlows |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
if ( ! function_exists( 'wcf_do_action_deprecated' ) ) { |
| 14 |
/** |
| 15 |
* Cartlows Action Deprecated |
| 16 |
* |
| 17 |
* @since 1.1.1 |
| 18 |
* @param string $tag The name of the Action hook. |
| 19 |
* @param array $args Array of additional function arguments to be passed to apply_filters(). |
| 20 |
* @param string $version The version of WordPress that deprecated the hook. |
| 21 |
* @param string $replacement Optional. The hook that should have been used. Default false. |
| 22 |
* @param string $message Optional. A message regarding the change. Default null. |
| 23 |
*/ |
| 24 |
function wcf_do_action_deprecated( $tag, $args, $version, $replacement = false, $message = null ) { |
| 25 |
if ( function_exists( 'do_action_deprecated' ) ) { /* WP >= 4.6 */ |
| 26 |
do_action_deprecated( $tag, $args, $version, $replacement, $message ); |
| 27 |
} else { |
| 28 |
do_action_ref_array( $tag, $args ); |
| 29 |
} |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
if ( ! function_exists( 'wcf_apply_filters_deprecated' ) ) { |
| 34 |
/** |
| 35 |
* Cartlows Apply Filters Deprecated |
| 36 |
* |
| 37 |
* @since 1.6.0 |
| 38 |
* @param string $tag The name of the Action hook. |
| 39 |
* @param array $args Array of additional function arguments to be passed to apply_filters(). |
| 40 |
* @param string $version The version of WordPress that deprecated the hook. |
| 41 |
* @param string $replacement Optional. The hook that should have been used. Default false. |
| 42 |
* @param string $message Optional. A message regarding the change. Default null. |
| 43 |
*/ |
| 44 |
function wcf_apply_filters_deprecated( $tag, $args, $version, $replacement = false, $message = null ) { |
| 45 |
if ( function_exists( 'apply_filters_deprecated' ) ) { /* WP >= 4.6 */ |
| 46 |
return apply_filters_deprecated( $tag, $args, $version, $replacement, $message ); |
| 47 |
} else { |
| 48 |
return apply_filters_ref_array( $tag, $args ); |
| 49 |
} |
| 50 |
} |
| 51 |
} |
| 52 |
|