Skip to content

Commit

Permalink
add JETPACK_NO_USER_TEST_MODE constant option
Browse files Browse the repository at this point in the history
add JETPACK_NO_USER_TEST_MODE constant option
  • Loading branch information
leogermani authored Dec 4, 2020
2 parents e8583fa + bfe8d78 commit 777af15
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion companion.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Companion Plugin
Plugin URI: https://github.com/Automattic/companion
Description: Helps keep the launched WordPress in order.
Version: 1.17
Version: 1.18
Author: Osk
*/

Expand Down Expand Up @@ -288,6 +288,13 @@ function companion_add_jetpack_constants_option_page() {
esc_html__( 'Check to enable offline mode, and access features that can be used without a connection to WordPress.com', 'companion' ),
'type' => 'checkbox',
),
'jetpack_no_user_testing' => array(
'id' => 'jetpack_no_user_testing',
'title' => __( 'JETPACK_NO_USER_TEST_MODE', 'companion' ),
'text' =>
esc_html__( 'Check to enable No User Testing Mode. This will allow you to test the Jetpack connection without an authorized user.', 'companion' ),
'type' => 'checkbox',
),
),
),
),
Expand Down Expand Up @@ -323,4 +330,7 @@ function companion_tamper_with_jetpack_constants() {
if ( ! ( defined( 'JETPACK_DEV_DEBUG' ) && JETPACK_DEV_DEBUG ) && companion_get_option( 'jetpack_dev_debug', '' ) ) {
define( 'JETPACK_DEV_DEBUG', companion_get_option( 'jetpack_dev_debug', '' ) ? true : false );
}
if ( ! ( defined( 'JETPACK_NO_USER_TEST_MODE' ) && JETPACK_NO_USER_TEST_MODE ) && companion_get_option( 'jetpack_no_user_testing', '' ) ) {
define( 'JETPACK_NO_USER_TEST_MODE', companion_get_option( 'jetpack_no_user_testing', '' ) ? true : false );
}
}

0 comments on commit 777af15

Please sign in to comment.