Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 27th, 2012  |  syntax: PHP  |  size: 1.42 KB  |  views: 82  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. // Hook into Wordpress so we can use all the custom functions and global variables
  3. $file = dirname(__FILE__);
  4. $file = substr($file, 0, stripos($file, "wp-content") );
  5. // Added for multisite
  6. require( $file . "/wp-load.php");
  7. // Now we can use Wordpress
  8. global $shortcode_tags;
  9. ?>
  10. <head>
  11. <title>{#shortcodes_dlg.title}</title>
  12. <script type="text/javascript" src="../tinymce/tiny_mce_popup.js"></script>
  13. <script type="text/javascript" src="js/dialog.js"></script>
  14. </head>
  15.  
  16. <body>
  17.  
  18. <div class="y_logo_contener">
  19.         <img src="img/wordpress-shortcode.png" width="128" height="128" alt="Youtube" />
  20. </div>
  21. <div class="yinstr">
  22.         <p>{#shortcodes_dlg.instr}</p>
  23.     <p>{#shortcodes_dlg.note}</p>
  24. </div>
  25.  
  26. <form onSubmit="ShortcodesDialog.insert();return false;" action="#" method="post">
  27. <div class="mceActionPanel">
  28. <script type="text/javascript" language="javascript">
  29. var jwl_sel_content2 = tinyMCE.activeEditor.selection.getContent();
  30. </script>
  31. <?php
  32. echo "<div><table id='shortcodes_table'>";
  33. foreach($shortcode_tags as $tagname=>$tag) {
  34.     echo "<tr><td><a href=\"javascript:;\" onClick=\"tinyMCEPopup.close();\" onmousedown=\"tinyMCE.execCommand('mceInsertContent',false,'[".$tagname."]' + jwl_sel_content2 + '[/".$tagname."]');\">[".$tagname,"]</a></td></tr>";
  35. }
  36. echo "</table></div>";
  37.  
  38. ?>
  39.  
  40. </div>
  41.  
  42. <div class="mceActionPanel">
  43.   <div style="float:left;padding-top:5px">
  44.   </div>
  45. </div>
  46. </form>
  47. </body>
clone this paste RAW Paste Data