PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.2.4
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.2.4
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
darkify / admin / ta-framework / functions / helpers.php

helpers.php in Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) 1.2.4, at admin/ta-framework/functions/helpers.php

55 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) {
2 die; } // Cannot access directly.
3 /**
4 *
5 * Array search key & value
6 *
7 * @since 1.0.0
8 * @version 1.0.0
9 */
10 if ( ! function_exists( 'drk_lite_array_search' ) ) {
11 function drk_lite_array_search( $array, $key, $value ) {
12
13 $results = array();
14
15 if ( is_array( $array ) ) {
16 if ( isset( $array[ $key ] ) && $array[ $key ] == $value ) {
17 $results[] = $array;
18 }
19
20 foreach ( $array as $sub_array ) {
21 $results = array_merge( $results, drk_lite_array_search( $sub_array, $key, $value ) );
22 }
23 }
24
25 return $results;
26 }
27 }
28
29 /**
30 *
31 * Between Microtime
32 *
33 * @since 1.0.0
34 * @version 1.0.0
35 */
36 if ( ! function_exists( 'drk_lite_timeout' ) ) {
37 function drk_lite_timeout( $timenow, $starttime, $timeout = 30 ) {
38 return ( ( $timenow - $starttime ) < $timeout ) ? true : false;
39 }
40 }
41
42 /**
43 *
44 * Check for wp editor api
45 *
46 * @since 1.0.0
47 * @version 1.0.0
48 */
49 if ( ! function_exists( 'drk_lite_wp_editor_api' ) ) {
50 function drk_lite_wp_editor_api() {
51 global $wp_version;
52 return version_compare( $wp_version, '4.8', '>=' );
53 }
54 }
55