Please or Register to create posts and topics.

List of available Hooks (Actions & Filters)

Page 1 of 2Next

You can find a list of all available Hooks (Actions & Filters) here:

https://github.com/Asgaros/asgaros-forum/blob/master/hooks.md

karmarpgs, bhoernchen and 3 other users have reacted to this post.
karmarpgsbhoernchenmgerzabeklucio7lawfalse
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

I am a novice.  How does one use such hooks and filters Sir?

You can find a tutorial on how to use hooks and filters here:

https://codex.wordpress.org/Plugin_API

But coding-experience is necessary to use them.

lawfalse has reacted to this post.
lawfalse
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thank you once again for the “direction” of the API.  Unfortunately I do not have the time to get into learning how to design plugins or learn all “the api” things.

Is there a “Argos Job Board” where “people that have knowledge of your plugin” can be hired to customize?

Regards,

S Valencia

Quote from Steve on February 18, 2018, 3:21 pm

Thank you once again for the “direction” of the API.  Unfortunately I do not have the time to get into learning how to design plugins or learn all “the api” things.

Is there a “Argos Job Board” where “people that have knowledge of your plugin” can be hired to customize?

Regards,

S Valencia

What do you need help with? Maybe i can help…You can send me a message if you’d like.

Hello,

is there a description with the function of the Hooks and Filters?

Regards
Olli

Not yet, but I plan to provide an API documentation one day when the code is ready.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Hi all,

im new to WP and Asgaros Forum also. I’m confused in using filter hooks in forum. i’m not certain that what should i pass as variables to filter hooks. where can i find that what to be passed.

Eg: asgarosforum_filter_history_link , when i use this hook it gives error in page  saying that only 1 argument passed but need 2 of arguments. i want to get the link of history page link.

please explain this or give any resource link to me to study about  this hooks which has demo.

Hello @nimeshanuradha

An official API-documentation is not available yet. To get more information about the filters arguments you have to check its definition directly inside the code.

The asgarosforum_filter_history_link filter takes two arguments:

  • the profile-link
  • the user-object

Both information can be used to modify this link, for example:

function my_history_link($link, $user) {
  // do something ...
  
  return $link;
}
add_filter('asgarosforum_filter_history_link', 'my_history_link', 10, 2);

 

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Hello @asgaros

Please do you know how to get values from “Advanced Custom Field” profile fields and display them into the short profile description of each message (located in the ‘post-element.php’ file) ?

For example I’d like to display the age of a user inside this short description (below “username”).

$author_post = apply_filters(‘[[a filter for ACF]]’, $this->getXXX($post->author_id), $post->author_id);
$age = get_field(‘age’, ‘user_’. $author_post);
echo ‘<span>’.$age.'</span>’;

=> Unfortunately it get weird values, from other users.

=> Here, do you propose a filter instead of [[ a filter for ACF]] and XXX ?

Maybe is there just something to simply replace from the “username” and “mentioning name” parts:

$username = apply_filters(‘asgarosforum_filter_post_username’, $this->getUsername($post->author_id), $post->author_id);
echo ‘<span class=”post-username”>’.$username.'</span>’;

// Mentioning name.
if ($user_data != false) {
$this->mentioning->render_nice_name($post->author_id);
}

Thanks a lot for your help,

Regards,

Alc

Page 1 of 2Next