Skip to content

4SEO hooks

You can modify or extend 4SEO behavior programmatically by using one or more of the hooks listed below. Hooks let you modify internal PHP structures or results computed by 4SEO to better accomodate your website specific requirements.

They are events that are triggered at various moments by 4SEO, providing code you write with internal information and possibly letting you modify this information.

Hooks are not altered when 4SEO is updated

All the customization you do using hooks will survive 4SEO updates. The hooks definition themselves will not change or be removed, unless the corresponding feature is modified or removed from 4SEO of course.

When using hooks with 4SEO, the following apply:

  • we cannot provide any form of support to the customization you make. You are on your own and the below documentation is the extent of information we'll provide to you.
  • you'll need suitable programming knowledge and understanding of Joomla internals to be able to write your own hooks handler
  • you mayb have to study 4SEO code to learn if what you want to do is possible and how to do it. Again, we won't help your there, at least as part of regular support.

Usage

If you added any hook handler, make sure to absolutely always mention that whenever you open a support ticket. Your custom hooks can alter the way 4SEO works, and may have consequences. We need to be aware of the existence of your hooks at all times.

Types

There are 2 types of hooks: filters and actions. Both are events that are triggered at different moment and to which you can respond.

The difference between them is:

  • filters: you receive some data, and you can return modified data. 4SEO will subsequently use your modified data
  • action: you receive some data, but you cannot modify it. Or rather, you can modify it but 4SEO will not use the result anyway

How to

As hooks are basically events, you must register your custom handler with 4SEO for any hook you want to use. 4SEO will then call your handler when the hook is run.

The most convenient way to register your hooks handler and include your custom code is to use 4SEO functions file. The function file is unique and lives at:

/libraries/weeblr/forseo_functions.php

Create the file if it does not exist yet. You can put all your custom code in that file, or just use it to interface with 4SEO and include more PHP code from wherever you want.

The 4SEO function file must always start with:

<?php
/**
 * 4SEO hooks file
 *
 * You can use 2 variables to access 4SEO content:
 *
 * $factory: access variables
 * $hooks: add handlers
 */

// no direct access
defined('WBLIB_EXEC') || die;

If this preamble is missing, just copy/paste it at the top of the file.

After that, you can add your hook handler and your custom code. Here is a typical example, which lets us customize the OpenGraph metadata 4SEO outputs on a page:

$hooks->add(
    'forseo_ogp_data',
    function ($ogpData, $requestInfo) {

        $newImageData = [
            'og:image'        => 'https://www.example.com/images/og-image.jpg',
            'og:image:width'  => 1253,
            'og:image:height' => 752,
        ];

        $ogpData['og:image'][] = $newImageData;

        return $ogpData;
    }
);

The $hooks variable shown in the example is always available to you inside the functions files, 4SEO creates it for you.

Inside the functions file, you are inside of Joomla, meaning you can use Joomla API as you would in other contexts. You can for instance use the Joomla Factory class to access the application object. Make sure to add the proper namespace use statements if you do so.

Summary

4SEO currently offers 15 actions in 5 groups.
4SEO currently offers 82 filters in 29 groups.

Actions

4SEO currently offers 15 actions in 5 groups.

Group: Content

forseo_content_prepared

Content action

Action to let plugins obtain the finalized content for the current request

@param string $context The context of the content being passed to the plugin. @param mixed $row An object with a "text" property @param mixed $params Additional parameters. See {@see PlgContentContent()}. @param integer $page Optional page number. Unused. Defaults to zero.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 434

Group: Crawl

forseo_on_crawl_complete

Crawl action

Run actions when a full crawl has just completed.

@param array $crawl

@return void

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/crawler.php
@line 621

Group: Error

forseo_on_404_error

Error action

Run hook with the 404 error to allow actions by other parties.

@param \Exception $error

@return void

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/error.php
@line 150

forseo_on_error

Error action

Run hook with the error to allow actions by other parties.

@param \Exception $error

@return void

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/error.php
@line 174

Group: Events

forseo_onAfterDispatch

Events action

Hook to run the registered onAfterDispatch handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 473

forseo_onAfterDispatchComplete

Events action

Hook to run the registered onAfterDispatchComplete handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 506

forseo_onAfterInitialise

Events action

Hook to run the registered onAfterInitialise handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 161

forseo_onAfterRender

Events action

Hook to run the registered onAfterRoute handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 640

forseo_onAfterRenderComplete

Events action

Hook to run the registered onAfterRoute handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 696

forseo_onAfterRespond

Events action

Hook to run the registered onAfterRespond handlers.
Warning: body may be gzipped at this time.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 741

forseo_onAfterRoute

Events action

Hook to run the registered onAfterRoute handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 306

forseo_onBeforeCompileHead

Events action

Hook to run the registered onBeforeCompileHead handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 580

forseo_onBeforeCompileHeadComplete

Events action

Hook to run the registered onBeforeCompileHeadComplete handlers.

@since 1.5.1

in /plugins/system/forseo/forseo.php
@line 613

forseo_onBeforeRender

Events action

Hook to run the registered onBeforeRender handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 533

Group: Integrations

forseo_integrations_service_disconnected

Integrations action

Trigger post-disconnection actions per service.

@param string $service

@return bool

@since 3.0.3

in /plugins/system/forseo/vendor/weeblr/forseo/model/oauth.php
@line 118

Filters

4SEO currently offers 82 filters in 29 groups.

Group: Admin

forseo_admin_ui_constants

Admin filter

Filter custom CSS for admin.

@param array $uiConstants List of constants related to the specific platform visual display.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/view/admin.php
@line 72

forseo_categories_list

Admin filter

Filter the list of categories on the site, for user display in the admin.

@param array $categories List of objects each describing a category.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/api/controller/categories.php
@line 175

forseo_custom_admin_css

Admin filter

Filter custom CSS for admin.

@param string $defaultStyles The raw css to be inserted as style tag in the page.

@return string

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/view/admin.php
@line 91

forseo_custom_admin_js

Admin filter

Filter custom JS for admin.

@param string $js The javascript to be inserted into the page with a script tag.

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/view/admin.php
@line 268

forseo_extensions_list

Admin filter

Filter the list of extensions installed on the site, for user display in the admin.

@param array $components List of objects each describing an extension.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/api/controller/extensions.php
@line 155

forseo_filter_extensions_list

Admin filter

Filter the list of extensions that should be filtered out of components lists displayed to users.

@param array $components Names of components using com_xxx format.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/api/controller/extensions.php
@line 130

Group: Analytics

forseo_analytics_snippets

Analytics filter

Filter the raw data used when outputting analytics snippet, for each configured
provider on the current page.

@param array $data Raw data to be used in snippets, per provider.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/injector/analytics.php
@line 108

Group: Bundle

forseo_admin_js_bundle_url

Bundle filter

Filter main JS bundle URL.

@param string $url The url of the js bundle to be linked from the page.

@return string

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/view/admin.php
@line 111

forseo_custom_admin_js

Bundle filter

Filter list of css files to be inserted after main bundle.
Each record added to the lsit must be:
[
'url' => '', mandatory
'options' => [], | []
'attr' => [], | []
]

@param array $cssDefs An array of array[url, options, attr], each defining a link to a css file.

@return string

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/view/admin.php
@line 413

Group: Content

forseo_current_request_category

Content filter

Filter the content category for current request belongs to.

@param object $category The category object as already established by wbLib.

@return object

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/ruleslegacy.php
@line 470

forseo_expandable_variables

Content filter

Filter the list of dynamic variables used in content replacement.

@param array $expandedVariables Array of variable names/variable values to use in expansions. @param Data\page $pageData Data object with current request details.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/injector/variables.php
@line 112

forseo_filter_clean_tags_after_meta_rule_exec

Content filter

Filter whether {4seo_*} tags should be removed from the result of the
execution of metadata rules. If left to false, the default, this allows using user-defined tags
in meta rules output, which can then be replaced with a replacer rule.
If set to true, this ensures no such tags is left in the final result.

@param bool $cleanTagsAfterMetaRuleExec

@return bool

@since 4.4.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/rules.php
@line 268

forseo_filter_run_replacers

Content filter

Filter whether the content replacers should run on this page.

@param bool $shouldRunReplacers @param string $location content | component | anywhere | modules @param Input $input

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/rules.php
@line 1196

forseo_onContentPrepare

Content filter

Hook to run the registered onContentPrepare handlers.

@param bool $modified Whether the content was modified. @param string $context The context of the content being passed to the plugin. @param mixed & $row An object with a "text" property @param mixed & $params Additional parameters. See {@see PlgContentContent()}. @param integer $page Optional page number. Unused. Defaults to zero.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 400

forseo_run_on_content_prepare_last

Content filter

Decide whether to run the onContentPrepareComplete handler
after all content plugins handlers have been run. Only has
any effect on Joomla 4. Joomla 3 does not have the required
priority system.

@param bool $runLast

@since 4.5.0

in /plugins/system/forseo/forseo.php
@line 337

Group: Crawler

forseo_collect_zero_status_urls

Crawler filter

Sometimes we get a 0 status, as some error occured somewhere in the process,
and we have no been able to identify where and why. This causes apparently
valid URLs to be marked as errors, which is not good.
This filter allows disabling the storage of such pages as either error or links.

@param \bool $shouldCollectZeroStatusUrls

@return \bool

@since 5.1.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/crawler.php
@line 1243

forseo_crawler_plugins_to_disable

Crawler filter

Filter the list of plugins that should be disabled on crawler requests.
Full page cache plugins should be disabled as they prevent onContentPrepare
and similar events to be fired.

@param array $plugins List of plugins, grouped by plugin group.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/platform.php
@line 101

Group: Cron

forseo_cron

Cron filter

Execute actions ran over cron. Each job can update the request response to reflect
success or otherwise.
type => image | cron

@param array $data API response data array: [[]data, int count, int total [,int status][,callable runAfterResponse]] @param array $options Some options:

@return Request

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/api/controller/cron.php
@line 136

forseo_delete_last_crawl_on_reset

Cron filter

Filter whether the last completed crawl data (namely the sitemap)
should be deleted when resetting analysis data.
Off by default, meaning any existing sitemap will keep being served
until the new analysis has completed.

@param bool $deleteLastCompletedCrawl

@return bool

@since 4.6.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/crawler.php
@line 254

forseo_disable_cron_pixel

Cron filter

Filter whether the cron pixel should be removed from current page.

@param bool $disableCronPixel

@return bool

@since 1.3.2

in /plugins/system/forseo/vendor/weeblr/forseo/controller/triggers.php
@line 117

Group: Customfields

forseo_cf_get_value_by_id

Customfields filter

Filter the value of a custom field for the current page request.

@param mixed $customFieldValue @param int $customFieldId Id of custom field in platform table @param string $fieldContext The context of the content being passed to the plugin. @param array $contentData The main page content array, to which the custom fields has been attached.

@return mixed

@since 2.1.1

in /plugins/system/forseo/vendor/weeblr/forseo/helper/customfields.php
@line 203

Group: Error

forseo_on_404_error_check_com_redirect

Error filter

Whether to check Joomla user-defined redirects on 404s. The check happens
before searching any applicable 4SEO error rule, so that we can have
error rules and also check redirects.
However, this does not work on J3 as the redirect plugin triggers a 404
if no redirect is found. So we disable com_redirect check on J3, with
this filter allowing user to enable it back if needed.

@param \bool $checkComRedirects

@return void

@since 4.5.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/error.php
@line 203

Group: Events

forseo_onPrivacyCollectAdminCapabilities

Events filter

Hook to run the registered onAfterInitialise handlers.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 227

Group: Features

forseo_features_overrides

Features filter

Filter features overrides

@param array $featuresOverrides

@return array

@since 4.1.2

in /plugins/system/forseo/vendor/weeblr/forseo/view/admin.php
@line 132

Group: Frontend\collection

forseo_after_render_page_data

Frontend\collection filter

Filter the data collected at onAfterRender about the current request.
Setting the ignore field to true will cause the data gathering process to stop
and the page data will not be stored any further.

@param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pagedatacollector.php
@line 1239

forseo_after_route_page_data

Frontend\collection filter

Filter the data collected at onAfterRoute about the current request.
Setting the ignore field to true will cause the data gathering process to stop
and the page data will not be stored any further.

@param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pagedatacollector.php
@line 1221

forseo_clean_query_vars_to_strip

Frontend\collection filter

Removes common unwanted vars from a URL, before it's used.

@param array $link

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/linkscollector.php
@line 257

forseo_collected_images

Frontend\collection filter

Filter the list of images collected on the current page.

@param bool $collectedImages @param Data\Page $pageData

@return bool

@since 1.4.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/imagescollector.php
@line 203

forseo_extract_images

Frontend\collection filter

Filter to extract images from the current page.
Will be passed the current page DOMContent and an empty array of images.
Should return an array of images records to be used as is
(hence possibly empty) or null to indicate the handler does not handle the request.
An image is defined by an array:
$image = [
'url' => URL of the image, relative to root || FQDN if another site,
'title' => title attr,
'alt' => alt attr,
'el_width' => width attr of the HTML element, may be different from image intrinsic width,
'el_height' => height attr of the HTML element, may be different from image intrinsic height,
'data' => key/value array of all data-xxxx attributes.
]

@param array $extractedImages @param string $buffer @param \DOMDocument $dom @param \DOMNodeList $imgTags @param array $options @param Data\Page $pageData

@return null|array

@since 1.4.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/imagescollector.php
@line 157

forseo_image_extraction_src_data_attributes

Frontend\collection filter

Filter configuration right after creating it.

@param array $dataAttrToReadFrom

@return array

@since 5.2.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/imagescollector.php
@line 79

forseo_page_build_content_hash

Frontend\collection filter

Ask plugins to build a content hash when possible.

@param string $hash @param array $contentData @param null|Data\Page $pageData

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pagedatacollector.php
@line 309

forseo_should_check_robots_txt_before_collecting

Frontend\collection filter

Filter whether 4SEO should check robots.txt rules before crawling a page.

@param array $links @param array $originalLinks

@return array

@since 1.0.4

in /plugins/system/forseo/vendor/weeblr/forseo/helper/linkscollector.php
@line 197

forseo_should_collect_error

Frontend\collection filter

Filter whether data for the current error should be collected.
@parma \Exception $error

@param bool $shouldCollectPageData @param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pagedatacollector.php
@line 1025

forseo_should_collect_images

Frontend\collection filter

Filter whether images collection should happen on the current page.

@param bool $shouldCollectImages @param Data\Page $pageData

@return bool

@since 1.4.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/imagescollector.php
@line 255

forseo_should_collect_page_data

Frontend\collection filter

Filter whether data for the current page should be collected.

@param bool $shouldCollectPageData @param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pagedatacollector.php
@line 1190

forseo_should_collect_url

Frontend\collection filter

Filter whether a single URL should be added to the collected link table.

@param bool $shouldCollectUrl @param Data\Collected $collectedUrl

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/linkscollector.php
@line 323

forseo_should_collect_urls

Frontend\collection filter

Filter whether links collection should happen on the current page.

@param bool $shouldCollectUrls @param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/linkscollector.php
@line 202

forseo_should_collect_urls_found_on_page

Frontend\collection filter

Filter whether a single URL should be added to the collected link table.
Preliminary test based only on the raw URL.
We pass in a copy of the original list of links to filter so that plugins can
override links exclusion that may have been decided by other plugins before them.

@param array $links @param array $originalLinks

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/linkscollector.php
@line 166

Group: Frontend\error

forseo_error_page_max_similar_pages

Frontend\error filter

Filter the max number of similar pages candidates to be suggested on error pages.

@param int $maxSimilar

@return int

@since 1.5.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/similar.php
@line 218

forseo_error_page_ranked_candidates

Frontend\error filter

Filter the list of ranked similar pages candidates to be suggested on error pages.

@param array $ranked An ordered list of similar pages URLs. @param string $requestedUrl The URL requested which caused a 404.

@return array

@since 1.5.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/similar.php
@line 194

Group: Frontend\features

forseo_*

Frontend\features filter

Filter whether a specific feature, identified by a filter name, is allowed for this request.

@param bool $shouldRunFeature @param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 1306

forseo_disable_generator_tag

Frontend\features filter

Filter whether the 4SEO generator meta should be disabled.

@param bool $disableGeneratorTag

@return bool

@since 4.8.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/injector/meta.php
@line 81

forseo_ogp_data

Frontend\features filter

Filter the data array used to build the OGP meta tags.

@param array $ogpData Computed OpenGraph Data as a key/value array @param Requestinfo $requestInfo Instance of the current request details.

@return array

@since 4.7.1

in /plugins/system/forseo/vendor/weeblr/forseo/model/injector/ogp.php
@line 128

forseo_should_inject_ogp

Frontend\features filter

Filter whether OGP tags should be injected for this request.

@param bool $injectData @param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 747

forseo_should_inject_seo_data

Frontend\features filter

Filter whether SEO Data (Structured data, OGP tags, Twitter Cards) should be injected for this request.

@param bool $injectData @param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 725

forseo_should_inject_structured_data

Frontend\features filter

Filter whether structured data should be injected for this request.

@param bool $injectData @param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 660

forseo_should_inject_tcards

Frontend\features filter

Filter whether Twitter Cards tags should be injected for this request.

@param bool $injectData @param Data\Page $pageData

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 771

forseo_tcards_data

Frontend\features filter

Filter the data array used to build the Twitter Cards meta tags.

@param array $tcardsData Computed Twitter Cards Data as a key/value array @param Requestinfo $requestInfo Instance of the current request details.

@return array

@since 4.7.1

in /plugins/system/forseo/vendor/weeblr/forseo/model/injector/tcards.php
@line 95

Group: Frontend\meta

forseo_auto_build_description

Frontend\meta filter

Filter an automatically computed meta description for a piece of content.

@param string $autoDescription @param string $context An option string representing the context, the content type. @param string|Object $content Either a string or an object holding the content data. @param Data\Page $pageData Collected request information. @param Data\Meta $pageMeta Collected meta data about the request.

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 487

forseo_extract_page_images_from_content_data

Frontend\meta filter

Filter automatically detected images from content data object.

@param array $extractedImages @param string $context An option string representing the context, the content type. @param string $content Rendered content. @param Object $contentObject Data object holding the content data. @param Data\Page $pageData Collected request information. @param Data\Meta $pageMeta Collected meta data about the request.

@return array

@since 1.3.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 207

Group: Frontend\page

forseo_components_support_plugins

Frontend\page filter

Filter the list of built-in components support plugins. This allows 3rd-party to disable
native support and replace by their own.
Remove an item from the list to disable native support. Better provide your own then.

@param array $componentsPlugins List of natively supported component.

@return bool

@since 1.0.0

in /plugins/system/forseo/platform/hooks.php
@line 97

Group: Frontend\pages

forseo_pages_dynamic_canonical

Frontend\pages filter

Filter a dynamically generated canonical link for the current page.

@param bool $dynamicCanonical @param Data\Page $pageData Collected request information.

@return string

@since 2.1.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/page.php
@line 344

forseo_pages_insert_auto_canonical

Frontend\pages filter

Filter whether to insert an automatically computed canonical link in the current page.

@param bool $insertAutoCanonical @param Data\Page $pageData Collected request information. @param Data\Meta $pageMeta Collected meta data about the request.

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 856

Group: Frontend\privacy

forseo_analytics_cookies_allowed

Frontend\privacy filter

Filter whether using cookies from analytics providers is allowed for this request.

@param bool $cookiesAllowed @param Data\Requestinfo $requestInfo

@return bool

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 1083

Group: Gsc

forseo_gsc_http_client_options

Gsc filter

Filter options used by the HTTP client used in communicating with the Google API.

@param array $options An array of options to pass to the HTTP client.

@return array

@since 4.2.2

in /plugins/system/forseo/vendor/weeblr/forseo/model/integrations/google/searchconsoledata.php
@line 93

Group: Import

forseo_sh404sef_import_before_store_alias

Import filter

Filter the result of importing an sh404SEF alias object, before it is stored to 4SEO database.

@param array $alias @param array $source

@return array

@since 2.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/extensions/sh404sef.php
@line 467

forseo_sh404sef_import_before_store_meta

Import filter

Filter the result of importing an sh404SEF meta object, before it is stored to 4SEO database.

@param Data\Meta $meta @param array $source

@return Data\Meta

@since 2.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/extensions/sh404sef.php
@line 346

Group: Meta

forseo_auto_description_cleanup_expressions

Meta filter

Filter regular expressions to apply to content to remove unwanted codes and markers.

@param array $descCleanupExpressions

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/meta.php
@line 88

forseo_auto_description_recommended_length

Meta filter

Filter the recommended number of characters in automatically computed description.

@param int $metaAutoDescRecommendedLength

@return int

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/meta.php
@line 65

Group: Output

forseo_onAfterRenderComplete_body

Output filter

Filter the body of the CMS response at onAfterRender.

@param string $body Body of the current request.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 709

forseo_onAfterRender_body

Output filter

Filter the body of the CMS response at onAfterRender.

@param string $body Body of the current request.

@since 1.0.0

in /plugins/system/forseo/forseo.php
@line 653

Group: Pages

forseo_page_build_content_id

Pages filter

Filter the content id of a page.

@param array $contentIdBits Array of key/values pairs @param Data\Page $pageData The page object to describe with the content id.

@return string

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/page.php
@line 59

forseo_page_canonical_or_duplicate

Pages filter

Whether passed page should be considered canonical or duplicate (automatically). Presence of a duplicate
(ie with same content_id) has already been checked.

@param int $urlType Data\Page::CANONICAL | Data\Page::DUPLICATE @param Data\Page $pageData The page object.

@return int

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/page.php
@line 473

forseo_page_is_archived

Pages filter

Filter whether the current request is for an archived page.

@param bool $isArchived @param Data\Page $pageData The page object to find whether it's archived.

@return array

@since 1.1.2

in /plugins/system/forseo/vendor/weeblr/forseo/helper/page.php
@line 614

forseo_page_modified_at

Pages filter

Filters a Page modified_at date time. Use MYSQL format (Y-m-d H:i:s), assumes UTC.

@param string $lastMod @param Data\Page $pageData The page object to find the modified_at date for.

@return string

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/page.php
@line 294

forseo_pages_auto_canonical_link

Pages filter

Filter automatically generated canonical link before it's inserted in the page.

@param string $link @param Data\Page $pageData

@return array

@since 4.8.0

in /plugins/system/forseo/vendor/weeblr/forseo/controller/pageprocessor.php
@line 917

Group: Platform

forseo_plugins_to_configure

Platform filter

Filter the list of plugins that should be re-configured, either on crawler requests or always.
$def is an array defining which plugins and what options should be modified:
[
'PlgSystemCache' => [
'key_1' => $value1,
'key_2' => $value2,
'key_3' => $value3
]
]

@param array $defs Definition of reconfiguration, keyed on plugin class name. @param bool $isCrawlerRequest Whether current request is from 4SEO crawler.

@return array

@since 1.5.1

in /plugins/system/forseo/vendor/weeblr/forseo/model/platform.php
@line 163

Group: Request

forseo_request_info

Request filter

Filter the list of dynamic variables used in content replacement.

@param array $expandedVariables Array of variable names/variable values to use in expansions.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/data/requestinfo.php
@line 252

Group: Route

forseo_run_on_after_route_first

Route filter

Decide whether to run the onAfterRoute handler
before other plugins handlers have been run. Only has
any effect on Joomla 4. Joomla 3 does not have the required
priority system.

@param bool $runFirst

@since 4.9.0

in /plugins/system/forseo/forseo.php
@line 174

Group: Routing

forseo_rule_expansion_replacement_direction

Routing filter

Filter replacement direction of wildcard characters if there are less placeholders in expansion target than in expansion source.

@param string $replacementDirection The direction to use when doing wildcard replacement. @param array $ruleSpec The rule definition that triggered the expansion. @param array $matches Result of running the rule urlSpecifiction against the current requested URL.

@return int

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/rules.php
@line 292

Group: Rules

forseo_current_request_category

Rules filter

Filter the list of default, built-in WAF block rules URL specifications.

@param array $wafRulesSpecs An array of URL specifications, such as /{*} or /blog/{*}.

@return array

@since 1.0.0

in /plugins/system/forseo/platform/components/common.php
@line 83

forseo_default_block_rules

Rules filter

Filter the list of default, built-in WAF block rules URL specifications.

@param array $wafRulesSpecs An array of URL specifications, such as /{*} or /blog/{*}.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/ruleslegacy.php
@line 177

Group: Sd

forseo_sd_auto_data

Sd filter

Filter the automatically built values of a given type of structured data.

@param array $autoFieldsData @param array $autoFields @param array $spec @param Data\Requestinfo $requestInfo @param Data\Page $pageData

@return array

@since 1.3.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/sd/base.php
@line 493

forseo_sd_breadcrumb

Sd filter

Filter the current page data used to build the structured data breadcrumb.

@since 1.0.0

in /plugins/system/forseo/platform/helpers/breadcrumb.php
@line 42

forseo_sd_can_run_rule

Sd filter

Whether the assigned rule can be run on this page.
By default is null.
If a plugin can support, it sets it to true.
If a plugin says this SD type cannot exist on this page, it sets it to false.
Else leave as is.
In the end, returned value must be true (ie at least one plugin can support and no other
contradict) for the rule to run.

@param bool $canRun @param array $spec @param Data\Requestinfo $requestInfo @param Data\Page $pageData

@return bool|null

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/sd/base.php
@line 533

forseo_sd_sitelinks_search_url

Sd filter

Filter the search URL used in website sitelinks structured data.

@since 1.0.0

in /plugins/system/forseo/platform/helpers/site.php
@line 43

forseo_structured_data

Sd filter

Filter the raw data to be inserted as json-ld.

@param array $data Array of structured data.

@return array

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/injector/sd.php
@line 227

forseo_structured_data_cleanup_patterns

Sd filter

Filter the list of regular expressions to be used when cleaning up a page
of existing microdata after inserting 4SEO structured data.

@param array $patterns List of regular expressions for cleaning microdata in content. @param Data\Page $pageData Data on the current page.

@return array

@since 1.3.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/injector/sd.php
@line 284

Group: Sitemap

forseo_page_should_include_in_sitemap

Sitemap filter

Whether current page should be included (automatically) in a sitemap. Presence of a duplicate
(ie with same content_id) has already been checked.

@param int $inclusionStatus Data\Page::INCLUDED | Data\Page::EXCLUDED @param Data\Page $pageData The page object to find the modified_at date for. @param int $sitemapType @see Data\Sitemap

@return int

@since 1.0.0

in /plugins/system/forseo/vendor/weeblr/forseo/helper/page.php
@line 787

forseo_sitemap_se_ping_list

Sitemap filter

Filter the list of fully qualified sitemaps URLs to be submitted to search engines
when 4SEO creates/updates the site main sitemap.
Can be used to include extra sitemaps such as additional languages ones for instance
when using some 3rd-party multilingual extensions.
You should not urlencode the URL, this will be done automatically when pinging the search engines.

@param array $sitemapUrls Array of fully qualified URLs of sitemaps to ping. Prefilled with 4SEO own.

@return int

@since 1.4.0

in /plugins/system/forseo/vendor/weeblr/forseo/model/sitemaps.php
@line 1544

forseo_sitemap_stylesheet_url

Sitemap filter

Filter the URL of a stylesheet to be applied to a sitemap. Return an empty string to
disabling including a stylesheet with your sitemap.

@param string $stylesheetUrl Fully qualified URL of a sitemap stylesheet. @param string $type index | partial the sitemap type the stylesheet applies to.

@return int

@since 1.5.2

in /plugins/system/forseo/vendor/weeblr/forseo/model/sitemaps.php
@line 936

forseo_sitemap_submit

Sitemap filter

Filter the result of submitting the provided sitemap URL to the speficied search engine.

@param string $searchEngine The search engine to ping. @param string $sitemapUrl The fully qualified URL of the sitemap to ping.

@return bool | \Exception

@since 5.2.1

in /plugins/system/forseo/vendor/weeblr/forseo/model/sitemaps.php
@line 1582