메소드 |
설명 |
|
__construct ( ) : null |
Register actions and filters, plus parse IS settings |
|
action_template_redirect ( ) : null |
Does the legwork to determine whether the feature is enabled. |
|
action_wp_footer ( ) : string |
Provide IS with a list of the scripts and stylesheets already present on the page. |
|
action_wp_footer_settings ( ) : string |
Prints the relevant infinite scroll settings in JS. |
|
action_wp_head ( ) |
Alias for renamed class method. |
|
ajax_response ( ) |
Our own Ajax response, avoiding calling admin-ajax |
|
ajax_url ( ) : string |
Returns the Ajax url |
|
allowed_query_vars ( array $allowed_vars ) : array |
Update the $allowed_vars array with the standard WP public and private
query vars, as well as taxonomy vars |
|
archive_supports_infinity ( ) : boolean |
Allow plugins to filter what archives Infinite Scroll supports |
|
body_class ( $classes ) |
Adds an 'infinite-scroll' class to the body. |
|
enqueue_spinner_scripts ( ) |
Enqueue spinner scripts. |
|
filter_grunion_redirect_url ( string $url ) : string |
Ensure that IS doesn't interfere with Grunion by stripping IS query arguments from the Grunion redirect URL. |
|
filter_infinite_scroll_results ( $results, $query_args, $wp_query ) : array |
Identify additional scripts required by the latest set of IS posts and provide the necessary data to the IS response handler. |
|
footer ( ) : string |
The Infinite Blog Footer |
|
get_excluded_posts ( ) : array |
In case IS is activated on search page, we have to exclude initially loaded posts which match the keyword by title, not the content as they are displayed before content-matching ones |
|
get_last_post_date ( ) : string |
Grab the timestamp for the initial query's last post. |
|
get_query_sort_field ( $query = null ) : string |
Returns the appropriate wp_posts table field for a given query's
'orderby' parameter, if applicable. |
|
get_query_vars ( ) : array |
In case IS is active on search, we have to exclude posts matched by title rather than by post_content in order to prevent dupes on next pages |
|
get_settings ( ) : object |
Parse IS settings provided by theme |
|
get_taxonomy_vars ( ) : array |
Returns an array of stock and custom taxonomy query vars |
|
got_infinity ( ) |
Has infinite scroll been triggered? |
|
has_only_title_matching_posts ( ) : boolean |
This function checks whether all posts returned by initial wp_query match the keyword by title
The code used in this function is borrowed from WP_Query class where it is used to construct like conditions for keywords |
|
has_wrapper ( ) : boolean |
Check if the IS output should be wrapped in a div. |
|
infinite_setting_html ( ) |
HTML code to display a checkbox true/false option
for the infinite_scroll setting. |
|
inject_query_args ( array $query_args ) : array |
Update the $query_args array with the parameters provided via AJAX/GET. |
|
is_last_batch ( ) |
Is this guaranteed to be the last batch of posts? |
|
posts_per_page_query ( object $query ) : null |
Let's overwrite the default post_per_page setting to always display a fixed amount. |
|
preserve_more_tag ( $array ) |
The more tag will be ignored by default if the blog page isn't our homepage. |
|
query ( ) : string |
Runs the query and returns the results via JSON. |
|
query_time_filter ( string $where, object $query ) : string |
Create a where clause that will make sure post queries
will always return results prior to (descending sort)
or before (ascending sort) the last post date. |
|
render ( ) : string |
Rendering fallback used when themes don't specify their own handler. |
|
settings_api_init ( ) : null |
Add a checkbox field to Settings > Reading
for enabling infinite scroll. |
|
wp_query ( ) : object |
Retrieve the query used with Infinite Scroll |
|