Home › Forums › Calendar Products › Community Events › Hook/Filters request
- This topic has 11 replies, 2 voices, and was last updated 10 years, 4 months ago by
George.
-
AuthorPosts
-
November 29, 2015 at 10:57 pm #1032250
Kishore
ParticipantHello,
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.
November 30, 2015 at 7:44 am #1032621George
ParticipantHey 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?
November 30, 2015 at 9:35 am #1032707Kishore
ParticipantThanks 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.December 1, 2015 at 9:15 am #1033296George
ParticipantThanks 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,
GeorgeDecember 1, 2015 at 9:58 am #1033316Kishore
ParticipantHey 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.December 1, 2015 at 10:01 am #1033319George
ParticipantNo worries @Kishore – try out the code I recommended and let me know if it helps! 😀
December 1, 2015 at 10:22 am #1033340Kishore
ParticipantSorry It does not work.Seems like need to change some priority order. But no where you are hooking this function ??
December 2, 2015 at 8:27 am #1033893George
ParticipantHey @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,
GeorgeDecember 2, 2015 at 7:43 pm #1034277Kishore
ParticipantThanks
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
December 3, 2015 at 4:08 pm #1035134George
ParticipantHey @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,
GeorgeJanuary 8, 2016 at 6:52 am #1052574Kishore
ParticipantI have resolved this issues.I am done with BuddyPress Integration for it. Thanks 🙂
January 8, 2016 at 9:50 am #1052709George
ParticipantAwesome! Best of luck with your project @Kishore 🙂
Cheers,
George -
This topic was modified 10 years, 5 months ago by
-
AuthorPosts
- The topic ‘Hook/Filters request’ is closed to new replies.
