Skip to content

with post data

petertank edited this page Dec 4, 2019 · 2 revisions

WithPostData

The post decorator enrich the Malini\Post with all the basic info about a WP_Post.

Attributes added:

  • id: the WP_Post->ID;
  • title: the WP_Post->post_title;
  • content: the WP_Post->post_content;
  • filtered_content: the WP_Post->post_content_filtered;
  • status: the WP_Post->post_status;
  • excerpt: the WP_Post->post_excerpt;
  • created_at: the WP_Post->post_date;
  • slug: the WP_Post->post_name;
  • updated_at: the WP_Post->post_modified;
  • parent_id: the WP_Post->post_parent;
  • order: the WP_Post->menu_order;
  • posttype: the WP_Post->post_type;
  • permalink: the WP_Post permalink.

Options:

Other

Extend Malini

  • Create your own Accessor
  • Create your own Decorator
  • Available Extensions
    • Malini\Aeria
    • Malini\YOAST
    • Malini\ACF
Clone this wiki locally