apl_options_load(); function APL_post_tax_content() { $htmlContent = ''; $post_type_names = get_post_types('', 'names'); $skip_post_types = array('attachment', 'revision', 'nav_menu_item'); foreach ($skip_post_types as $value) { unset($post_type_names[$value]); } foreach ($post_type_names as $post_type_name) { $htmlContent .= APL_post_tax_get_accordion_content($post_type_name); } echo $htmlContent; } function APL_post_tax_get_accordion_content($post_type_name) { $rtnString = ''; $post_type_object = get_post_type_object($post_type_name); $post_type_object->taxonomies = APL_get_taxonomy_object_names($post_type_name); $skip_taxonomies = array('post_format'); foreach ($skip_taxonomies as $value) { unset($post_type_object->taxonomies[$value]); } $rtnString .= '

' . $post_type_object->labels->singular_name . '

'; $rtnString .= '
'; //GET HEADER $rtnString .= APL_post_tax_get_left_header($post_type_name); $rtnString .= APL_post_tax_get_right_header(); $rtnString .= '
'; $rtnString .= APL_post_tax_get_taxonomy_section($post_type_name, $post_type_object->taxonomies); $rtnString .= '
'; $rtnString .= '
'; return $rtnString; } function APL_get_taxonomy_object_names($post_type_name) { $rtnTaxonomyArray = array(); $taxonomy_names = get_taxonomies('', 'names'); foreach ($taxonomy_names as $taxonomy_name) { $taxonomy_object = get_taxonomy($taxonomy_name); foreach ($taxonomy_object->object_type as $object_type_name) { if ($object_type_name === $post_type_name) { $rtnTaxonomyArray[$taxonomy_name] = $taxonomy_name; } } } return $rtnTaxonomyArray; } function APL_post_tax_get_left_header($post_type_name) { $rtnString = ''; $rtnString .= '
'; //$rtnString .= ''; $rtnString .= '
'; return $rtnString; } function APL_post_tax_get_right_header() { $rtnString = ''; $rtnString .= '
'; $rtnString .= ''; $rtnString .= '
'; return $rtnString; } function APL_post_tax_get_taxonomy_section($post_type_name, $taxonomy_names) { $rtnString = ''; $htmlCatTabs = ''; $htmlCatTabsContent = ''; $htmlTagTabs = ''; $htmlTagTabsContent = ''; $htmlCatTabs .= '
'; $htmlTagTabs .= '
'; $htmlCatTabs .= ''; $htmlCatTabsContent .= '
'; $htmlTagTabsContent .= '
'; //Add Categories section $rtnString .= $htmlCatTabs . $htmlCatTabsContent; //Add Tags section $rtnString .= $htmlTagTabs . $htmlTagTabsContent; return $rtnString; } function APL_add_terms($post_type_name, $taxonomy_name) { $rtnString = ''; $argTerms = array('hide_empty' => 0, 'taxonomy' => $taxonomy_name); $terms = get_categories($argTerms); if (!empty($terms)) { $rtnString .= 'Any/All
'; foreach ($terms as $value_tag) { $rtnString .= '' . $value_tag->name . '
'; } } return $rtnString; } function APL_get_page_selector_options($post_type_name = 'post') { $rtnString = ''; $rtnString .= ''; return $rtnString; } //TODO Change to use APLCore::apl_get_posts() instead of get_posts() -- May not // be possible since the function inside the class is set to private. //TODO Add parent (ID) variable to retrieve less data to cycle through. function APL_get_page_heirarchy($post_type_name = 'post', $parent = 0, $depth = -1) { $rtnString = ''; $dashes = ''; $depth++; for ($i = 0; $i < $depth; $i++) { $dashes .= '-'; } $argPages = array( 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_type' => $post_type_name, 'post_parent' => $parent ); $pages = get_posts($argPages); foreach ($pages as $page) { if ($page->post_parent === $parent) { $id = $page->ID; $rtnString .= ''; $rtnString .= APL_get_page_heirarchy($post_type_name, $id, $depth); } } return $rtnString; } function APL_get_cat_hierchy($post_tax_settings = array('post_type_name' => 'post', 'taxonomy_name' => 'category'), $parent = 0, $depth = -1) { $argTerms = array('hide_empty' => 0, 'taxonomy' => $post_tax_settings['taxonomy_name']); $rtnString = ''; $dashes = ''; if ($depth == -1) { $rtnString .= 'Any/All
'; } $depth++; for ($i = 0; $i < $depth; $i++) { $dashes .= '-'; } $terms = get_categories($argTerms); foreach ($terms as $term) { if ($term->parent == $parent) { $id = $term->term_id; $rtnString .= '' . $dashes . $term->name . '
'; $rtnString .= APL_get_cat_hierchy($post_tax_settings, $id, $depth); } } return $rtnString; } //////////////////////////////////////////////////////////////////////////////// //****************************************************************************// //** END OF PHP **// //****************************************************************************// //////////////////////////////////////////////////////////////////////////////// ?>

Advanced Post List - Settings

Plugin Page (WordPress / Wiki)





Filter Settings Info
Style Content Info
Shortcodes
  |    (Results may vary Details)
Preview will appear here when saved
PHP code - click load on any preset to generate PHP code for use in your theme



General Options

Settings

Settings Info
Delete database upon deactivation.
/> />
Admin JQuery UI Theme
Enable Default Empty Message:
/> />

Export Preset Table

Export/Import Info
Filename:

Import Preset(s)



Restore Preset Defaults

Note: Restoring the plugin's default preset table will only overwrite/add the initial set of presets, and will not delete other presets of a different name.




Shortcodes: Use these codes inside the list item content (will throw errors if placed in before or after HTML fields)

* Time shortcodes have an optional format parameter. Format your dates using these possible tokens: m=month, M=text month, F=full text month, d=day, D=short text Day Y=4 digit year, y=2 digit year, H=hour, i=minute, s=seconds. More tokens listed here: http://php.net/manual/en/function.date.php.

Note: these shortcodes only work in the List item content box on this page.