I have the script below and I need to return both of the conditional return
values -- each result on a line. Is there any way to format it as an array in order to work ?
The script is:
if ($pdf_url != '') {
if ($title != '') {
$title_from_url = $this->make_title_from_url($pdf_url);
if ($title == $title_from_url || $this->make_title_from_url('/'.$title) == $title_from_url) {
// This would be the default title anyway based on URL
// OR if you take .pdf off title it would match, so that's close enough - don't load up shortcode with title param
$title = '';
} else {
$title = ' title="' . esc_attr( $title ) . '"';
}
}
return apply_filters('pdfemb_override_send_to_editor', '[pdf-embedder url="' . $pdf_url . '"'.$title.']', $html, $id, $attachment);
} else {
return $html;
}