Skip to content

Commit

Permalink
Merge pull request #173 from PRX/plugin-updates-march-2024
Browse files Browse the repository at this point in the history
Plugin updates March 2024
  • Loading branch information
brandonhundt authored Mar 22, 2024
2 parents cb165ba + 09dfd2e commit dae91ce
Show file tree
Hide file tree
Showing 310 changed files with 101,376 additions and 99,819 deletions.
6 changes: 6 additions & 0 deletions wp-content/plugins/faustwp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Faust

## 1.2.2

### Patch Changes

- 47f6bd0: Faust now warns you if the secret key in your environment is invalid or incorrect.

## 1.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion wp-content/plugins/faustwp/faustwp.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: faustwp
* Domain Path: /languages
* Version: 1.2.1
* Version: 1.2.2
* Requires PHP: 7.2
* Requires at least: 5.7
*
Expand Down
47 changes: 47 additions & 0 deletions wp-content/plugins/faustwp/includes/rest/callbacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ function register_rest_routes() {
)
);

register_rest_route(
'faustwp/v1',
'/validate_secret_key',
array(
'methods' => 'POST',
'callback' => __NAMESPACE__ . '\\handle_rest_validate_secret_key_callback',
'permission_callback' => __NAMESPACE__ . '\\rest_validate_secret_key_permission_callback',
)
);

/**
* Faust.js packages now use `faustwp/v1/authorize`.
*
Expand Down Expand Up @@ -333,6 +343,8 @@ function rest_process_telemetry_permission_callback( \WP_REST_Request $request )
return rest_authorize_permission_callback( $request );
}



/**
* Callback for WordPress register_rest_route() 'callback' parameter.
*
Expand Down Expand Up @@ -476,3 +488,38 @@ function handle_rest_telemetry_decision_callback( \WP_REST_Request $request ) {
);
return rest_ensure_response( $response );
}

/**
* Callback for WordPress register_rest_route() 'callback' parameter.
*
* Handle POST /faustwp/v1/validate_secret_key response.
*
* @link https://developer.wordpress.org/reference/functions/register_rest_route/
* @link https://developer.wordpress.org/rest-api/extending-the-rest-api/routes-and-endpoints/#endpoint-callback
*
* @param \WP_REST_Request $request Current \WP_REST_Request object.
*
* @return mixed A \WP_REST_Response, or \WP_Error.
*/
function handle_rest_validate_secret_key_callback( \WP_REST_Request $request ) {
return new \WP_REST_Response(
esc_html__( 'Secret key validated!', 'faustwp' ),
200
);
}

/**
* Callback to check permissions for requests to `faustwp/v1/validate_secret_key`.
*
* Authorized if the 'secret_key' settings value and http header 'x-faustwp-secret' match.
*
* @link https://developer.wordpress.org/reference/functions/register_rest_route/
* @link https://developer.wordpress.org/rest-api/extending-the-rest-api/routes-and-endpoints/#permissions-callback
*
* @param \WP_REST_Request $request The current \WP_REST_Request object.
*
* @return bool True if current user can, false if else.
*/
function rest_validate_secret_key_permission_callback( \WP_REST_Request $request ) {
return rest_authorize_permission_callback( $request );
}
16 changes: 7 additions & 9 deletions wp-content/plugins/faustwp/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: antpb, apmatthe, blakewpe, chriswiegman, claygriffiths, jasonkonen
Tags: faustjs, faust, headless, decoupled, composable-architecture
Requires at least: 5.7
Tested up to: 6.4
Stable tag: 1.2.1
Stable tag: 1.2.2
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -54,6 +54,12 @@ plugins/faustwp/.wordpress-org/screenshot-3.png

== Changelog ==

= 1.2.2 =

### Patch Changes

- 47f6bd0: Faust now warns you if the secret key in your environment is invalid or incorrect.

= 1.2.1 =

### Patch Changes
Expand All @@ -73,12 +79,4 @@ plugins/faustwp/.wordpress-org/screenshot-3.png
- 41a6d9c: Fixed issue where term URIs were rewritten from relative to absolute during GraphQL requests when they should not have been. This was causing nodeByUri queries for terms to fail.
- e725bda: Adds phpstan to CI/CD workflow. Runs as part of the lint step.

= 1.1.2 =

### Patch Changes

- 78a061a: Fixed a bug that caused links to files in wp-content to be rewritten to the Faust Front-end site URL when they should not have been.
- 2559958: Bug Fix: Fixed missing call to autosave when using Post/Page previews.
- 75f5c80: Fixed a bug where links were rewritten to the Faust Front-end Site URL when using the post editor, resulting in those rewritten links being saved to the post content and guid fields when they shouldn't be. These links are now saved with the URL pointing to the WP site, as they should be. They are still rewritten at runtime to link to the Front-end Site URL when appropriate.

[View the full changelog](https://github.com/wpengine/faustjs/blob/canary/plugins/faustwp/CHANGELOG.md)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-i18n'), 'version' => '2ea8f923126373089539');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-i18n'), 'version' => '66ab073aad33ccb4a388');
2 changes: 1 addition & 1 deletion wp-content/plugins/microsoft-start/assets/js/callback.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-i18n'), 'version' => '9cf927041eb30220f937');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-i18n'), 'version' => 'f6b0e8176948a321b99a');
4 changes: 2 additions & 2 deletions wp-content/plugins/microsoft-start/assets/js/dashboard.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-content/plugins/microsoft-start/assets/js/dashboard.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-hooks', 'wp-i18n', 'wp-plugins'), 'version' => '578237e0d83129b3382b');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-hooks', 'wp-i18n', 'wp-plugins'), 'version' => '99bc478c90c83fb87753');

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-i18n'), 'version' => '18732412f0b66a108be6');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-i18n'), 'version' => '87d04ad5f23c3fad79ba');
Loading

0 comments on commit dae91ce

Please sign in to comment.