Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_shortcode("pdf", "test_process_shortcode");
- function test_process_shortcode($atts){
- $a = shortcode_atts(array('id'=>'-1'), $atts);
- // No ID value
- if(strcmp($a['id'], '-1') == 0){
- return "";
- }
- $pdf=$a['id'];
- $url=plugin_dir_url(__FILE__)."output/".$pdf."/".$pdf."/index.html";
- $iframe = "<iframe allowfullscreen class='idrws_pdf_short' src='".$url."' style='width:80%; height:800px;'></iframe>";
- return $iframe;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement