As of XPress 1.1.3, all filters, hooks and API endpoints pass through the XenForo class proxy and can hence be extended using XenForo Class Extensions. You can find a full list of classes under:
These class extensions can be used to overwrite and alter these code snippets. Please be aware that certain filters and API endpoints expect their output to remain in the right schema without verification.
As of XPress 1.1.3, we’ve added a number of 3rd party filters to hook into certain XPress output without hampering with the code directly A full list of filters can be found below:
xpress_registered_hooksArguments: $toRegister
A list of Actions, Filters and Shortcodes that will be registered by the XPress extension. Can be used to add extra items to the list or remove them. Certain items are expected to be present at code execution and removing them may break the bridge.
xpress_outwards_facing_ipArguments: $outwardsIp
Filters the IP that your server has facing outwards, which is used by XPress to identify API calls as internal calls.
xpress_api_userArguments: \WP_User $user
The WordPress user under which XPress executes its API calls. Is expected to be a WordPress administrator.
xpress_thread_reply_countArguments: $replyCount, $threadId
The number of replies a XenForo thread has or 0 if no thread exists.
xpress_thread_urlArguments: $threadUrl, $threadId
The link to a XenForo thread by thread id.
xpress_post_linkArguments: $commentLink, $comment, $post
The link to a XenForo thread associated with a given WordPress post.
xpress_post_linkArguments: $commentLink, $comment
The link to a XenForo post associated with a given WordPress comment.
xpress_category_linkArguments: $categoryLink, $categoryId
The link to a XenForo category associated with a given WordPress category.
xpress_style_propertyArguments: $value, $stylePropertyId
The value of a XenForo style property.
xpress_render_bb_codeArguments. $finalHtml, $bbCode
The rendered output of BB Code.
xpress_html_to_bb_codeArguments. $bbCode, $html, $htmlMaxLength
The BB code equivalent for a given HTML input.
xpress_editor_contentArguments: $bbCodeContent, $htmlContent
The BB code content of a froala editor instance.
xpress_get_xf_userArguments: \XF\Entity\User $xfUser, \WP_User $wpUser
The XenForo user for a given WordPress user.
xpress_get_wp_userArguments: \WP_User $wpUser, \XF\Entity\User $xfUser
The WordPress user for a given XenForo user.