After update – “pdb_single” with “template=bare-value” is no longer working
-
Thanks for this great plugin.
The recent update seems to have resulted in the $shortcoded line in my code below to simple output empty strings.If I then change template=bare-value to template=single-value it does work, however I want to keep it as bare value to preserve formatting etc.
The var_dump was put there only for testing.
All other code is working fine (otherwise the change in the line above wouldn’t work).
Was there anything in the recent update which could result in this “bare” approach not working any longer?
Thanks kindly,
Adampublic function cc_wrapped_value( $atts ) { if(in_array('participants-database/participants-database.php', apply_filters('active_plugins', get_option('active_plugins')))){ $record_id = $this->get_admin_record_id(); $vTag = esc_attr(sanitize_text_field( $atts['tag'] )); $vClass = (isset($atts['class']) && (sanitize_text_field( $atts['class'] ) != '' )) ? ' class= "' . esc_attr(sanitize_text_field( $atts['class'] )) . '"' : ''; $vId = (isset($atts['el_id']) && (sanitize_text_field( $atts['el_id'] ) != '' )) ? ' id= "' . esc_attr(sanitize_text_field( $atts['el_id'] )) . '"' : ''; $html = '<' . $vTag . $vClass . $vId .'>'; $shortcoded = do_shortcode( '[pdb_single record_id=' . $record_id . ' fields=' . $atts['fields'] . ' template=bare-value ]' ); // var_dump($shortcoded); $html .= preg_replace( '/^((?=^)(\s*))|((\s*)(?>$))/si', '', $shortcoded); $html .= '</' . $vTag . '>'; $html = preg_replace("/>\s*</", "><", $html); return $html; } else return false; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘After update – “pdb_single” with “template=bare-value” is no longer working’ is closed to new replies.