Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: CMS Tree Page View Helper
- Plugin URI: http://storycorps.org
- 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.
- Version: 0.0.1
- Author: Dalton Rooney
- */
- function addPageOutputScript() {
- echo '<script type="text/javascript">
- jQuery(document).ready(function($) {
- $(\'a[href$=cms-tpv-pages-page]\').hide();
- });
- </script>';
- }
- function editPageOutput() {
- echo '<div class="wrap"><div id="icon-edit-pages" class="icon32"><br /></div>
- <h2>Edit Pages</h2>
- <div class="wrap">';
- cms_tpv_print_common_tree_stuff();
- echo '</div>
- <div id="hide-edit-page" style="display:none;">';
- }
- function editPageFooter() {
- echo '<!-- ended by CMS Tree Page View Helper-->';
- }
- function editPageModsLoader() {
- add_action('admin_notices','editPageOutput');
- //add_action('admin_footer','editPageFooter');
- }
- add_action('admin_head','addPageOutputScript');
- add_action('load-edit-pages.php','editPageModsLoader');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement