PluginProbe
Filter Everything — WordPress & WooCommerce Filters / 1.6.1
Filter Everything — WordPress & WooCommerce Filters v1.6.1
1.9.7 1.9.6 1.9.5 1.9.4 1.9.3 1.9.2.2 1.9.2.1 trunk 1.2.1 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.1 1.4.4 1.4.5 1.4.8 1.4.9 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 All 52 releases
filter-everything / src / wpc-compat.php

wpc-compat.php in Filter Everything — WordPress & WooCommerce Filters 1.6.1, at src/wpc-compat.php

68 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined('WPINC') ) {
4 wp_die();
5 }
6
7 if( ! function_exists('mb_strpos') ){
8 function mb_strpos( $haystack, $needle, $offset = 0, $encoding = null )
9 {
10 return strpos( $haystack, $needle, $offset = 0 );
11 }
12 }
13
14 if( ! function_exists('mb_strcut') ){
15 function mb_strcut( $string, $start, $length = null, $encoding = null )
16 {
17 return substr( $string, $start, $length = null );
18 }
19 }
20
21 if( ! function_exists('mb_strlen') ){
22 function mb_strlen( $string, $encoding = null )
23 {
24 return strlen( $string );
25 }
26 }
27
28 if( ! function_exists('mb_strtolower') ){
29 function mb_strtolower( $string, $encoding = null )
30 {
31 return strtolower( $string );
32 }
33 }
34
35 if( ! function_exists('mb_strtoupper') ){
36 function mb_strtoupper( $string )
37 {
38 return strtoupper( $string );
39 }
40 }
41
42 if( ! function_exists('mb_substr') ){
43 function mb_substr( $string , $start, $length = null, $encoding = null )
44 {
45 return substr( $string, $start, $length = null );
46 }
47 }
48
49 if (!function_exists('array_key_first')) {
50 function array_key_first(array $arr) {
51 foreach($arr as $key => $unused) {
52 return $key;
53 }
54 return NULL;
55 }
56 }
57
58 if( ! function_exists( 'intdiv' ) ){
59 function intdiv( $a, $b ){
60 return ($a - $a % $b) / $b;
61 }
62 }
63
64 if( !function_exists('array_key_last') ) {
65 function array_key_last(array $array) {
66 if( !empty($array) ) return key(array_slice($array, -1, 1, true));
67 }
68 }