-
Notifications
You must be signed in to change notification settings - Fork 798
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/plain-permalinks-authorization-url
- Loading branch information
Showing
18 changed files
with
216 additions
and
13 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
projects/js-packages/licensing/changelog/add-license-styling-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: added | ||
|
||
Added style improvements to license flow components. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
projects/js-packages/licensing/components/activation-screen/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
.jp-license-activation-screen { | ||
box-shadow: 0px 4px 24px 0px #00000026; | ||
display: flex; | ||
flex-direction: row; | ||
flex-direction: column; | ||
// this clips our children to our border radius | ||
border-radius: 4px; | ||
overflow: hidden; | ||
min-height: 540px; | ||
|
||
@media screen and ( min-width: 780px ) { | ||
flex-direction: row; | ||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
projects/packages/jitm/changelog/add-jitm-sideload-backup-plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: added | ||
|
||
Adds filters to allow sideloading of the Jetpack Backup plugin through JITMs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?php | ||
/** | ||
* Compatibility functions for the Jetpack Backup plugin. | ||
* https://wordpress.org/plugins/jetpack-backup/ | ||
* | ||
* @since 10.4 | ||
* | ||
* @package automattic/jetpack | ||
*/ | ||
|
||
namespace Automattic\Jetpack\Jetpack_Backup; | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
|
||
const PLUGIN_SLUG = 'jetpack-backup'; | ||
const PLUGIN_FILE = 'jetpack-backup/jetpack-backup.php'; | ||
|
||
add_action( 'admin_notices', __NAMESPACE__ . '\error_notice' ); | ||
add_action( 'admin_init', __NAMESPACE__ . '\try_install' ); | ||
|
||
/** | ||
* Verify the intent to install Jetpack Backup, and kick off installation. | ||
* | ||
* This works in tandem with a JITM set up in the JITM package. | ||
*/ | ||
function try_install() { | ||
if ( ! isset( $_GET['jetpack-backup-action'] ) ) { | ||
return; | ||
} | ||
|
||
check_admin_referer( 'jetpack-backup-install' ); | ||
|
||
$result = false; | ||
// If the plugin install fails, redirect to plugin install page pre-populated with jetpack-backup search term. | ||
$redirect_on_error = admin_url( 'plugin-install.php?s=jetpack-backup&tab=search&type=term' ); | ||
|
||
// Attempt to install and activate the plugin. | ||
if ( current_user_can( 'activate_plugins' ) ) { | ||
switch ( $_GET['jetpack-backup-action'] ) { | ||
case 'install': | ||
$result = install_and_activate(); | ||
break; | ||
case 'activate': | ||
$result = activate(); | ||
break; | ||
} | ||
} | ||
|
||
if ( $result ) { | ||
/** This action is already documented in _inc/lib/class.core-rest-api-endpoints.php */ | ||
do_action( 'jetpack_activated_plugin', PLUGIN_FILE, 'jitm' ); | ||
$redirect = admin_url( 'admin.php?page=jetpack-backup' ); | ||
} else { | ||
$redirect = add_query_arg( 'jetpack-backup-install-error', true, $redirect_on_error ); | ||
} | ||
|
||
wp_safe_redirect( $redirect ); | ||
|
||
exit; | ||
} | ||
|
||
/** | ||
* Install and activate the Jetpack Backup plugin. | ||
* | ||
* @return bool result of installation | ||
*/ | ||
function install_and_activate() { | ||
jetpack_require_lib( 'plugins' ); | ||
$result = \Jetpack_Plugins::install_and_activate_plugin( PLUGIN_SLUG ); | ||
|
||
if ( is_wp_error( $result ) ) { | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
} | ||
|
||
/** | ||
* Activate the Jetpack Backup plugin. | ||
* | ||
* @return bool result of activation | ||
*/ | ||
function activate() { | ||
$result = activate_plugin( PLUGIN_FILE ); | ||
|
||
// Activate_plugin() returns null on success. | ||
return is_null( $result ); | ||
} | ||
|
||
/** | ||
* Notify the user that the installation of Jetpack Backup failed. | ||
*/ | ||
function error_notice() { | ||
if ( empty( $_GET['jetpack-backup-install-error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended | ||
return; | ||
} | ||
|
||
?> | ||
<div class="notice notice-error is-dismissible"> | ||
<p><?php esc_html_e( 'There was an error installing Jetpack Backup. Please try again.', 'jetpack' ); ?></p> | ||
</div> | ||
<?php | ||
} |
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/changelog/add-jitm-sideload-backup-plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: compat | ||
|
||
Jetpack Backup: Add considtions that allow sideloading of Jetpack Backup plugin via JITMs. |
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/changelog/add-jitm-sideload-backup-plugin#2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: other | ||
|
||
Updated package dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: other | ||
|
||
Updated package dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.