Current Path : /storage/v11800/affypharma/public_html/wp-content/plugins/cool-timeline/admin/codestar-framework/functions/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/affypharma/public_html/wp-content/plugins/cool-timeline/admin/codestar-framework/functions/helpers.php |
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
/**
*
* Array search key & value
*
* @since 1.0.0
* @version 1.0.0
*
*/
if ( ! function_exists( 'csf_array_search' ) ) {
function csf_array_search( $array, $key, $value ) {
$results = array();
if ( is_array( $array ) ) {
if ( isset( $array[$key] ) && $array[$key] == $value ) {
$results[] = $array;
}
foreach ( $array as $sub_array ) {
$results = array_merge( $results, csf_array_search( $sub_array, $key, $value ) );
}
}
return $results;
}
}
/**
*
* Between Microtime
*
* @since 1.0.0
* @version 1.0.0
*
*/
if ( ! function_exists( 'csf_timeout' ) ) {
function csf_timeout( $timenow, $starttime, $timeout = 30 ) {
return ( ( $timenow - $starttime ) < $timeout ) ? true : false;
}
}
/**
*
* Check for wp editor api
*
* @since 1.0.0
* @version 1.0.0
*
*/
if ( ! function_exists( 'csf_wp_editor_api' ) ) {
function csf_wp_editor_api() {
global $wp_version;
return version_compare( $wp_version, '4.8', '>=' );
}
}