'us_header', 'numberposts' => - 1, ) ); ob_end_clean(); foreach ( $headers as $header ) { if ( ! empty( $header->post_content ) AND substr( strval( $header->post_content ), 0, 1 ) === '{' ) { try { $header_settings = json_decode( $header->post_content, TRUE ); $header_changed = FALSE; if ( isset( $header_settings['data'] ) and is_array( $header_settings['data'] ) ) { foreach ( $header_settings['data'] as $name => $data ) { // Find the text element if ( substr( $name, 0, 4 ) == 'text' ) { if ( ! empty( $data['text'] ) AND strpos( $data['text'], ' $header->ID, 'post_content' => str_replace( "\\'", "'", json_encode( wp_slash( $header_settings ), JSON_UNESCAPED_UNICODE ) ), ) ); ob_end_clean(); } } catch ( Exception $e ) { } } } return FALSE; } }