diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 9e18d6fc63..a667b35dcb 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: path: 'wp-content/plugins/elasticpress' @@ -52,7 +52,7 @@ jobs: wp cli-command-docs elasticpress --custom-order=index,activate-feature,deactivate-feature,list-features,get-algorithm-version,set-algorithm-version --remove=delete_transient_on_int,custom_get_transient --custom-intro='The following WP-CLI commands are supported by ElasticPress:' > wp-content/plugins/elasticpress/docs/wp-cli.md - name: Use Node.js 10 - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: '10.x' @@ -65,7 +65,7 @@ jobs: CI: true - name: Deploy to GH Pages - uses: maxheld83/ghpages@v0.2.1 + uses: maxheld83/ghpages@v0.3.0 env: BUILD_DIR: 'docs-built/' GH_PAT: ${{ secrets.GH_PAT }} \ No newline at end of file diff --git a/.github/workflows/push-asset-readme-update.yml b/.github/workflows/push-asset-readme-update.yml index 81aa43c0de..fcced51aeb 100644 --- a/.github/workflows/push-asset-readme-update.yml +++ b/.github/workflows/push-asset-readme-update.yml @@ -8,7 +8,7 @@ jobs: name: Push to master runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: WordPress.org plugin asset/readme update uses: 10up/action-wordpress-plugin-asset-update@stable env: diff --git a/.github/workflows/push-deploy.yml b/.github/workflows/push-deploy.yml index 406c65f96d..6055338fe3 100644 --- a/.github/workflows/push-deploy.yml +++ b/.github/workflows/push-deploy.yml @@ -8,7 +8,7 @@ jobs: name: New tag runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: WordPress Plugin Deploy uses: 10up/action-wordpress-plugin-deploy@stable env: diff --git a/includes/classes/Feature/Search/Weighting.php b/includes/classes/Feature/Search/Weighting.php index ab2e20554d..2f56b6cf3b 100644 --- a/includes/classes/Feature/Search/Weighting.php +++ b/includes/classes/Feature/Search/Weighting.php @@ -22,6 +22,18 @@ class Weighting { * Sets up the weighting module */ public function setup() { + /** + * Filter to disable loading of Search weighting engine. + * + * @hook ep_disable_search_weighting + * @since 4.0 + * @param bool Whether to disable search weighting engine. Defaults to false. + * @return bool Whether to disable search weighting engine. + */ + if ( apply_filters( 'ep_disable_search_weighting', false ) ) { + return; + } + add_action( 'admin_menu', [ $this, 'add_weighting_submenu_page' ], 15 ); add_action( 'admin_post_ep-weighting', [ $this, 'handle_save' ] ); add_filter( 'ep_formatted_args', [ $this, 'do_weighting' ], 20, 2 ); // After date decay, etc are injected