inc/ajax-functions.php¶
-
largo_load_more_posts_enqueue_script
()¶ Enqueue script for “load more posts” functionality
Since: 0.5.3 Global: LARGO_DEBUG
-
largo_load_more_posts_data
()¶ Print an HTML script tag for a post navigation element and corresponding query
If you plan on plugging this function, make sure the data structure it returns includes and “is_home” key.
Parameters: - $nav_id (string) – The unique id of the navigation element used as the trigger to load more posts
- $the_query (object) – The WP_Query object upon which calls to load more posts will be based
-
largo_load_more_posts
()¶ Renders markup for a page of posts and sends it back over the wire.
Global: $opt Global: $_POST Uses: largo_load_more_posts_choose_partial Uses: largo_get_partial_by_post_type
-
largo_load_more_posts_choose_partial
()¶ Function to determine which partial slug should be used by LMP to render posts.
Includes a “largo_lmp_template_partial” filter to allow for modifying the value $partial.
Parameters: - $post_query (WP_Query) – The WP_Query being used to generate LMP markup
Returns: string $partial The slug of partial that should be loaded.
Global: $opt
Global: $_POST
See: largo_load_more_posts
Since: 0.5.3