Skip to main content

Filters

The 15 stable filters of Poly Community, read from the code. The plugin runs 559 hooks named poly_community_ in all, and only these are kept from one release to the next. Each says where it runs and what it is given, the first of which it returns, changed or not.

poly_community_account_items​

Deprecated since 0.1.0: use poly_community_register_ui instead. It still runs, with a deprecation notice, for at least two releases.

Runs in inc/navigation.php:252.

poly_community_blueprints​

function my_plugin_blueprints( $value ) {
return $value;
}
add_filter( 'poly_community_blueprints', 'my_plugin_blueprints' );
ArgumentAs the plugin passes it
$valuearray( Poly_Community()->path . 'blueprints' )

Runs in inc/blueprints.php:159.

poly_community_comment_data​

function my_plugin_comment_data( $value, $reply, $root, $form ) {
return $value;
}
add_filter( 'poly_community_comment_data', 'my_plugin_comment_data', 10, 4 );
ArgumentAs the plugin passes it
$valuearray()
$reply$reply
$root$root
$form$form

Runs in inc/comments.php:230.

poly_community_content_width​

function my_plugin_content_width( $width, $view ) {
return $width;
}
add_filter( 'poly_community_content_width', 'my_plugin_content_width', 10, 2 );

Runs in inc/templates.php:1102.

poly_community_home_choices​

function my_plugin_home_choices( $value ) {
return $value;
}
add_filter( 'poly_community_home_choices', 'my_plugin_home_choices' );
ArgumentAs the plugin passes it
$valuearray( 'activity' => array( 'label' => _x( 'Activity', 'Home page', 'poly-community' ), 'icon' => 'activity', 'description' => _x( 'The community address opens the composer and the activity feed', 'Home page', 'poly-community' ), 'available' => Poly_Community()->apps->feed(), ), )

Runs in inc/routes.php:608.

poly_community_home_rewrites​

function my_plugin_home_rewrites( $value ) {
return $value;
}
add_filter( 'poly_community_home_rewrites', 'my_plugin_home_rewrites' );
ArgumentAs the plugin passes it
$valuearray()

Runs in inc/routes.php:587.

poly_community_item_data​

function my_plugin_item_data( $data, $arg2, $kind_slug ) {
return $data;
}
add_filter( 'poly_community_item_data', 'my_plugin_item_data', 10, 3 );
ArgumentAs the plugin passes it
$data$data
$arg2null
$kind_slug$kind['slug']

Runs in inc/activity.php:1760, inc/activity.php:2781.

poly_community_main_markup​

function my_plugin_main_markup( $value, $view ) {
return $value;
}
add_filter( 'poly_community_main_markup', 'my_plugin_main_markup', 10, 2 );
ArgumentAs the plugin passes it
$value$this->default_main_markup( $view )
$view$view

Runs in inc/layouts.php:208.

poly_community_nav_items​

function my_plugin_nav_items( $items, $route ) {
return $items;
}
add_filter( 'poly_community_nav_items', 'my_plugin_nav_items', 10, 2 );

Still supported, with no notice. poly_community_register_ui is the way for new code: this filter will be deprecated in a later release, once Better Messages has moved to it.

Runs in inc/templates.php:1134.

poly_community_page_kind​

function my_plugin_page_kind( $kind, $route ) {
return $kind;
}
add_filter( 'poly_community_page_kind', 'my_plugin_page_kind', 10, 2 );

Runs in inc/templates.php:1077.

poly_community_profile_tabs​

Deprecated since 0.1.0: use poly_community_register_ui instead. It still runs, with a deprecation notice, for at least two releases.

Runs in inc/profiles.php:1226.

poly_community_requirements​

function my_plugin_requirements( $value ) {
return $value;
}
add_filter( 'poly_community_requirements', 'my_plugin_requirements' );
ArgumentAs the plugin passes it
$valuearray()

Runs in inc/access.php:1224.

poly_community_sidebar_blocks​

function my_plugin_sidebar_blocks( $blocks, $view ) {
return $blocks;
}
add_filter( 'poly_community_sidebar_blocks', 'my_plugin_sidebar_blocks', 10, 2 );

Runs in inc/layouts.php:353.

poly_community_space_tabs​

function my_plugin_space_tabs( $tabs, $space ) {
return $tabs;
}
add_filter( 'poly_community_space_tabs', 'my_plugin_space_tabs', 10, 2 );

Still supported, with no notice. poly_community_register_ui is the way for new code: this filter will be deprecated in a later release, once Better Messages has moved to it.

Runs in inc/spaces.php:738.

poly_community_structured_data​

function my_plugin_structured_data( $value, $item, $visitor ) {
return $value;
}
add_filter( 'poly_community_structured_data', 'my_plugin_structured_data', 10, 3 );
ArgumentAs the plugin passes it
$valuearray()
$item$item
$visitor$visitor

Runs in inc/structured-data.php:203.