Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

Skip to main content

Hooks

Slim SEO Link Manager provides some hooks for developers to extend the functionality of the plugin.

Filters​

slim_seo_link_manager_post_types​

This filer allows you to ignore some post types when scanning links. It accepts one parameter - an array of allowed post type objects (with key is the post type slug and value is the post type object) and returns an array.

add_filter( 'slim_seo_link_manager_post_types', function ( $post_types ) {
unset( $post_types['movies'] );
return $post_types;
} );

This filter allows you to change the post query for getting suggested posts.

add_filter( 'slim_seo_link_manager_link_suggestions_args', function( $args ) {
$args['cat'] = 12;
return $args;
} );

This filter allows you to change the post query for searching posts.

add_filter( 'slim_seo_link_manager_search_args', function( $args ) {
$args['cat'] = 12;
return $args;
} );

slim_seo_link_manager_post_custom_fields​

This filter allows you to add custom fields' content to the plugin's scanner.

add_filter( 'slim_seo_link_manager_post_custom_fields', function( $fields ) {
$fields[] = 'my-text-field';
return $fields;
} );

After running this filter, the plugin will get the content of the custom field (in the example above, the meta key of the custom field is my-text-field) and analyze that content to find links and add to the reports.

This filter allows you to bypass a URL, e.g. not including it in the reports. It's helpful if you want to keep the reports clean and don't want it to contain links like affiliate links.

add_filter( 'slim_seo_link_manager_process_url', function( $process, $url ) {
if ( strpos( $url, 'amz.co' ) !== false ) {
$process = false;
}
return $process;
} );

This filter allows you to change the content to be analyzed for links. Normally it's the post content, but you can add anything you want (like custom static text, or content from a complex custom field group).

add_filter( 'slim_seo_link_manager_text', function( $text, $post_id ) {
// Your custom text that you want to add to the analyzer.
$your_text = '';


$text .= $your_text;
return $text;
}, 20, 2 );