Hook/Filters request

Home Forums Calendar Products Community Events Hook/Filters request

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1032250
    Kishore
    Participant

    Hello,

    I am making an add-ons for BuddyPress. Well I need a hook for the below function so that I can change return parameters.

    So can you add some action to “tribe_is_community_my_events_page” and “tribe_is_community_edit_event_page” please.

    Thanks

    
    /**
     * Tests if the current page is the Edit Event page
     *
     * @return bool whether it is the Edit Event page.
     * @author Paul Hughes
     * @since 1.0.1
     */
    function tribe_is_community_edit_event_page() {
    	$tce = Tribe__Events__Community__Main::instance();
            do_action( 'tribe_is_community_edit_event_page', $tce->isEditPage);
    	return $tce->isEditPage;
    }
    • This topic was modified 10 years, 5 months ago by Kishore.
    #1032621
    George
    Participant

    Hey there,

    Can you clarify exactly what you mean about changing return parameters? These functions simply return a boolean value – true if on the page being looked for, false if not.

    Can you explain what you envision here instead?

    #1032707
    Kishore
    Participant

    Thanks for the reply.
    I want to enable front end event posting in Ultimate member and Buddypress Profile section.
    tribe_is_community_edit_event_page is always false there so JS/CSS are not working in profile section.
    So I need to enable this function and return true so all js/css will be loaded in profile pages.

    #1033296
    George
    Participant

    Thanks for this information – does using the existing filter not work at all? I.e., something like this:


    add_action( 'tribe_is_community_edit_event_page', '__return_true' );

    Cheers,
    George

    #1033316
    Kishore
    Participant

    Hey I did not find any filters “tribe_is_community_edit_event_page”. Only There is function with this name.
    If you add something do_action(‘tribe_is_community_edit_event_page’, $var) may work. Sorry there i son hook like this in community add ons.

    #1033319
    George
    Participant

    No worries @Kishore – try out the code I recommended and let me know if it helps! 😀

    #1033340
    Kishore
    Participant

    Sorry It does not work.Seems like need to change some priority order. But no where you are hooking this function ??

    #1033893
    George
    Participant

    Hey @Kishore,

    I’m sorry that that did not help 🙁

    I’m also sorry to admit that I don’t quite understand what you mean about “change some priority order”. If you mean changing the priority of a given hook or filter, simply pass the priority as an integer after the name of the hook’s callback function. So instead of this, for example:


    add_action( 'the_hook', 'the_callback' );

    You can just add the desired priority like this, will make the priority 5:


    add_action( 'the_hook', 'the_callback', 5 );

    I appreciate your feedback regarding hooks for the plugin – we are adding hooks and filters all the time, and so while I cannot promise the inclusion of this one immediately, like in our next release, it may well end up in another release down the road.

    Please stay tuned to updates and read the changelogs for the inclusion of such filters.

    Thank you!

    Sincerely,
    George

    #1034277
    Kishore
    Participant

    Thanks

    I just need to have tribe_is_community_edit_event_page() return true in other profile pages. Not sure how to make. May be I will wait for the next release where you will give option to make it true by hooks

    #1035134
    George
    Participant

    Hey @Kishore,

    I cannot promise that the next release will include hooks for this; however, you can always force a true value just like the original function. Something like this might help:


    $tce = Tribe__Events__Community__Main::instance();
    $tce->isEditPage = true;

    If you do this right before you then call the tribe_is_community_edit_event_page() function, it should return true.

    Cheers,
    George

    #1052574
    Kishore
    Participant

    I have resolved this issues.I am done with BuddyPress Integration for it. Thanks 🙂

    #1052709
    George
    Participant

    Awesome! Best of luck with your project @Kishore 🙂

    Cheers,
    George

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Hook/Filters request’ is closed to new replies.