WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Advanced Page Manager

A new way to create, move, edit and publish your pages for your favorite CMS.

About

Hooks

Add custom columns

apm_manage_pages_columns

  • Type filter
  • Purpose : allows to add or modify columns to display on the APM pages tree and lists
  • Takes one argument / return value
  • $apm_columns : associative array where keys are the name of the columns, and values are the header texts for those columns
  • The usage is the same as the native "manage_pages_columns" WordPress hook

apm_manage_pages_custom_column

  • Type : action
  • Purpose : displays the custom column information for each page row in the APM tree.
  • Takes 3 arguments
  • $column_name : column name (string)
  • $post_id : WordPress ID of the page row being displayed (int)
  • $apm_node : APM specific data about this page (object)
  • The usage is the same as the native "manage_pages_custom_column" WordPress hook

Example : create and populate a new column in the APM tree

add_filter('apm_manage_pages_columns', 'add_my_custom_column');
function add_my_custom_column($apm_columns){
      $apm_columns['my_new_column_name'] = "Header text (or HTML) for that column";
      return $apm_columns;
}
add_action('apm_manage_pages_custom_column','apm_manage_pages_custom_column',10,3);
function apm_manage_pages_custom_column($column_name,$post_id,$apm_node){
      if( $column_name == 'my_new_column_name' ){
             ?>
             Display here the content of the column for the page with ID = $post_id
             <?php
      }
}

apm_load_wp_data

  • Type : action
  • Purpose : allows to preload information about all pages at once that are going to be displayed in the APM tree. Useful when creating custom columns : you load the data required in the custom column in one single query before display, instead of making one query per page row
  • Takes one argument
  • $found_pages : associative array of the pages (WorPress pages objects) that are going to be displayed in the APM tree. The array is indexed on pages IDs

Example

public static function apm_load_wp_data($found_pages){
      //If a custom columns needs some WP pages data (like pages taxonomies for example) that
      //is not loaded by APM by default for performance concern, we can preload 
      //it here using update_post_caches() on $found_pages :
      update_post_caches($found_pages,'page');

      //Note : APM natively preloads pages meta (using update_postmeta_cache()), so there's
      //no need to do it here.
}

Add custom action links

apm_tree_row_actions

  • Type : action
  • Purpose : allows to add actions links (in addition to the native Rename, (Pre)view, (Un)publish, Edit, Template, Move, Delete) in APM tree rows
  • Takes 2 arguments
  • $page_id : WordPress page id of the row we add the action link to (int)
  • $apm_node : Contains APM specific page info used to display the row (object)

apm_list_row_actions

  • Type : action
  • Purpose : allows to add actions links (in addition to the native Rename, (Pre)view, (Un)publish, Edit, Template, Delete) in APM lists rows
  • Takes 2 arguments
  • $page_id : WordPress page id of the row we add the action link to (int)
  • $apm_node : Contains APM specific page info used to display the row (object)

Example

add_action('apm_tree_row_actions','my_row_actions');
add_action('apm_list_row_actions','my_row_actions');
function my_row_actions($page_id,$apm_node){
      //Echo new action link(s) here :
      ?>
      <span class="my_action"><a href="#" title="My Action">My action</a></span>
      <?php
}

Sorting Custom Columns

apm_custom_sql_orderby’

  • Type : filter
  • Purpose : Define the SQL "order by" for a custom column
  • Takes 3 argument
  • $order_by_sql : mysql order string to return (eg. “p.post_modified DESC”)
  • $orderby : curent column to sort on (eg. “apm-last-modified”)
  • $order : mysql order (ASC or DESC)

apm_custom_sql_join

  • Type : filter
  • Purpose : Define the SQL "JOIN" statement needed for sorting a custom column
  • Takes 2 argument
  • $join : SQL join string (eg. LEFT JOIN $wpdb->postmeta AS my_pm ON my_pm.post_id = p.ID AND my_pm.meta_key = '_my_meta')
  • $orders : key => value array of sql orders for the current query

Last Modified addon

apm_addon_last_modified_column_label

  • Type : filter
  • Purpose : change the column label
  • Takes 1 argument
  • $column label : column label (string)

apm_addon_last_modified_date

  • Type : filter
  • Purpose : change the format of the modified date
  • Takes 3 arguments
  • $page_modified_html : final modified date HTML
  • $page_modified_raw : modified date in the native WP format for pages lists
  • $page : WordPress page object

Who's behind this plugin ?

January the 21st, 2013 - Advanced Page Manager has been designed and developed by a group of WordPress addicts doing professional WordPress projects (among other things like living a normal life). The idea of Advanced Page Manager emerged as we were working on news sites with a lot of pro contents that were... not news but kind of knowledge base (eg. best practices, tutorials...). It was obvious that we could do those contents with standard posts but we had also to twist them in a way we felt as not as a good way to go. So we decided to give a boost to WordPress pages to match a more CMS like management. But we also felt that we had to respect WordPress (UI of course and also technically speaking). We are very happy to release it after 4 months of hard work and hope that you will enjoy it in your own projects.

We'd like to thank the Groupe Moniteur, a french B2B news company, that allowed us to develop this project. More specificaly, we thank Caroline Tessier and Claire de Smedt, both wonderful project managers for their help (and patience).

  • Benjamin Lupu : interface design, project management
  • Mathieu Le Roi : lead developer, technical design
  • Maxime Breton : frontend development
  • Adrian Koss : web design, icons

Advanced Page Studio logo : © M.studio - Fotolia.com | Uncategorized Creations logo : © M.studio - Fotolia.com

Requires: 3.4.2 or higher
Compatible up to: 3.9.1
Last Updated: 2014-4-27
Downloads: 34,778

Ratings

4 stars
4.9 out of 5 stars

Support

5 of 9 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

0,1,0
100,2,2 100,2,2 100,1,1 100,1,1
100,1,1 100,1,1
83,6,5
100,1,1
100,1,1
100,1,1 100,1,1
100,3,3 100,1,1
50,2,1
17,6,1
0,1,0 100,1,1
100,1,1