Advertisement
Guest User

CMS Tree Page View Helper

a guest
Aug 10th, 2010
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.12 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. Plugin Name: CMS Tree Page View Helper
  5. Plugin URI: http://storycorps.org
  6. Description: Replaces the standard Edit page with the CMS Tree Page View. Be sure to install and enable <a href="wordpress.org/extend/plugins/cms-tree-page-view/">CMS Tree Page View</a> before activating this.
  7. Version: 0.0.1
  8. Author: Dalton Rooney
  9.  
  10. */
  11.  
  12. function addPageOutputScript() {
  13. echo '<script type="text/javascript">
  14. jQuery(document).ready(function($) {
  15.  $(\'a[href$=cms-tpv-pages-page]\').hide();
  16. });
  17. </script>';
  18. }
  19.  
  20.  
  21. function editPageOutput() {
  22.     echo '<div class="wrap"><div id="icon-edit-pages" class="icon32"><br /></div>
  23.     <h2>Edit Pages</h2>
  24.  
  25.     <div class="wrap">';
  26.  
  27.     cms_tpv_print_common_tree_stuff();
  28.    
  29.     echo '</div>
  30.    
  31.     <div id="hide-edit-page" style="display:none;">';
  32. }      
  33.  
  34. function editPageFooter() {
  35.     echo '<!-- ended by CMS Tree Page View Helper-->';
  36. }      
  37.  
  38.  
  39. function editPageModsLoader() {
  40. add_action('admin_notices','editPageOutput');
  41. //add_action('admin_footer','editPageFooter');     
  42. }
  43.        
  44. add_action('admin_head','addPageOutputScript');    
  45. add_action('load-edit-pages.php','editPageModsLoader');
  46.  
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement