Created
January 22, 2022 19:17
-
-
Save webdevs-pro/d6ae16e36def45274bf5c5c5ff9b5201 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = @json_decode( get_post_meta( 21361, '_elementor_data', true ), true ); | |
if ( $data ) { | |
function stylepress_email_find( $data, $findkey ) { | |
if ( is_array( $data ) ) { | |
foreach ( $data as $d ) { | |
if ( $d && ! empty( $d['id'] ) && $d['id'] === $findkey ) { | |
return $d; | |
} | |
if ( $d && ! empty( $d['elements'] ) && is_array( $d['elements'] ) ) { | |
$value = stylepress_email_find( $d['elements'], $findkey ); | |
if ( $value ) { | |
return $value; | |
} | |
} | |
} | |
} | |
return false; | |
} | |
$element = stylepress_email_find( $data, 'd5f6a05' ); | |
error_log( "element\n" . print_r( $element, true ) . "\n" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment