Actions and Filters - UCF/UCF-Pegasus-List-Shortcode GitHub Wiki

This plugin includes the following action and filter hooks, which developers can utilize in a theme or other plugin to override specific markup or functionality.

Filters are the primary means of creating and editing layouts in this plugin. For the full list of available layouts included in this plugin, as well as more information about this plugin's layout system, please see our Layout docs.

Navigation

Layout hooks

Other hooks


ucf_pegasus_list_display_{$layoutslug}_before

Returns the opening markup for a Pegasus issue list for the provided $layoutslug.

For example, to edit the opening markup of the "default" layout, the hook name you'd use would be ucf_pegasus_list_display_default_before.

Parameters

  • $markup string

    Existing HTML markup passed along by this filter hook

  • $items object|array

    One or more feed items representing Pegasus issues

  • $args array

    Arguments passed in to the [ucf-pegasus-list] shortcode

Return

string: Opening HTML markup for the issue list

Example usage

See instructions on adding or editing existing layouts

ucf_pegasus_list_display_{$layoutslug}_content

Returns the inner markup for a Pegasus issue list for the provided $layoutslug.

For example, to edit the inner markup of the "default" layout, the hook name you'd use would be ucf_pegasus_list_display_default_content.

Parameters

  • $markup string

    Existing HTML markup passed along by this filter hook

  • $items object|array

    One or more feed items representing Pegasus issues

  • $args array

    Arguments passed in to the [ucf-pegasus-list] shortcode

  • $fallback_message string

    A fallback message to display when $items is empty

Return

string: Inner HTML markup for the issue list

Example usage

See instructions on adding or editing existing layouts

ucf_pegasus_list_display_{$layoutslug}_after

Returns the closing markup for a Pegasus issue list for the provided $layoutslug.

For example, to edit the closing markup of the "default" layout, the hook name would be ucf_pegasus_list_display_default_before.

Parameters

  • $markup string

    Existing HTML markup passed along by this filter hook

  • $items object|array

    One or more feed items representing Pegasus issues

  • $args array

    Arguments passed in to the [ucf-pegasus-list] shortcode

Return

string: Closing HTML markup for the issue list

Example usage

See instructions on adding or editing existing layouts


ucf_pegasus_list_get_layouts

Returns all registered layouts for the [ucf-pegasus-list] shortcode.

If you've defined a custom layout for this shortcode, you should register it with this hook.

Parameters

  • $layouts array

    Associative array of layout slugs (array keys) and their human-friendly names (array values)

Return

array: Modified $layouts array

Example usage

function get_pegasus_list_layouts( $layouts ) {
    $layouts['mylayout'] = 'My Layout';
    return $layouts;
}

add_filter( 'ucf_pegasus_list_get_layouts', 'get_pegasus_list_layouts', 10, 1 );
⚠️ **GitHub.com Fallback** ⚠️