• Resolved Jack

    (@benefaction)


    I’ve made a change to the plugin locally to introduce a filter that allows the page options presented in the ‘Redirect After Login’ field to be expanded.

    For example, I’ve used this to allow private pages to be selected as follows:

    add_filter( 'tlwp_pages_options', 'add_tlwp_pages_options', 10, 1 );

    function add_tlwp_pages_options(array $pages): array
    {
    return array_merge($pages, (array) get_posts([
    'post_type' => 'page',
    'post_status' => 'private'
    ])
    );
    }

    I cannot find a public repo to contribute these changes to for other users to benefit from. Is there a public repo for this, or do you not accept community contributions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Icegram

    (@icegram)

    Hi,

    Thank you for the update.
    Its a intresting to know this code.
    But did you get to look at this filter instead “tlwp_login_redirect”.

    It will help you achieve this.

    Also many people only want to redirect to the public pages so we have included only public pages.
    You may want to extend the above filter and achieve the same.

    Hope this helps you.


    Thread Starter Jack

    (@benefaction)

    Thanks for letting me know about that hook.

    I gather then that community contributions aren’t something you work with, so I’ll mark this as resolved.

    Cheers again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.