Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 27th, 2012  |  syntax: PHP  |  size: 1.27 KB  |  views: 31  |  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. <?php
  29.  
  30. echo "<div><table id='shortcodes_table'>";
  31. foreach($shortcode_tags as $tagname=>$tag) {
  32.     echo "<tr><td><a href=\"javascript:;\" onClick=\"tinyMCEPopup.close();\" onmousedown=\"tinyMCE.execCommand('mceInsertContent',false,'[".$tagname."]"." "."[/".$tagname."]');\">[".$tagname,"]</a></td></tr>";
  33. }
  34. echo "</table></div>";
  35.  
  36. ?>
  37.  
  38. </div>
  39.  
  40. <div class="mceActionPanel">
  41.   <div style="float:left;padding-top:5px">
  42.   </div>
  43. </div>
  44. </form>
  45. </body>
clone this paste RAW Paste Data