Advertisement
fauzanjeg

Fix Jeg Elementor Kit cannot create templates, due to conflict with JNews Essential

May 2nd, 2023
1,417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. /** Fix Jeg Elementor Kit cannot create templates, due to conflict with JNews Essential */
  2. if ( ! function_exists( 'jeg_sanitize_array' ) ) {
  3.     /**
  4.      * Sanitizing Array recursively
  5.      *
  6.      * @param array $data The data to be sanitized.
  7.      *
  8.      * @return array sanitized array
  9.      */
  10.     function jeg_sanitize_array( $data ) {
  11.         if ( is_array( $data ) ) {
  12.             foreach ( $data as $key => $value ) {
  13.                 $data[ $key ] = jeg_sanitize_array( $value );
  14.             }
  15.             return $data;
  16.         }
  17.         return sanitize_text_field( $data );
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement