| Server IP : 213.186.33.4 / Your IP : 216.73.216.146 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www2/wp-content/plugins/so-widgets-bundle/base/inc/ |
Upload File : |
<?php
/**
* Convert underscore naming convention to camel case. Useful for data to be handled by javascript.
*
* @param $array array Input array of which the keys will be transformed.
* @return array The transformed array with camel case keys.
*/
function siteorigin_widgets_underscores_to_camel_case( $array ) {
$transformed = array();
if ( !empty( $array ) ) {
foreach ( $array as $key => $val ) {
$jsKey = preg_replace_callback( '/_(.?)/', 'siteorigin_widgets_match_to_upper', $key );
$transformed[ $jsKey ] = $val;
}
}
return $transformed;
}
/**
* Convert a matched string to uppercase. Used as a preg callback.
*
* @param $matches
*
* @return string
*/
function siteorigin_widgets_match_to_upper( $matches ) {
return strtoupper( $matches[1] );
}