diff --git a/modules/post-by-email/class-jetpack-post-by-email.php b/modules/post-by-email/class-jetpack-post-by-email.php index 97db6507395e7..78f44544e3b53 100644 --- a/modules/post-by-email/class-jetpack-post-by-email.php +++ b/modules/post-by-email/class-jetpack-post-by-email.php @@ -53,7 +53,7 @@ public function action_init() { * Enqueues scripts for user profile page. */ public function profile_scripts() { - wp_enqueue_script( 'post-by-email', plugins_url( 'post-by-email/post-by-email.js', __FILE__ ), array( 'jquery' ), JETPACK__VERSION, true ); + wp_enqueue_script( 'post-by-email', plugins_url( 'post-by-email.js', __FILE__ ), array( 'jquery' ), JETPACK__VERSION, true ); wp_localize_script( 'post-by-email', 'pbeVars', @@ -61,7 +61,7 @@ public function profile_scripts() { 'rest_nonce' => wp_create_nonce( 'wp_rest' ), ) ); - wp_enqueue_style( 'post-by-email', plugins_url( 'post-by-email/post-by-email.css', __FILE__ ), array(), JETPACK__VERSION ); + wp_enqueue_style( 'post-by-email', plugins_url( 'post-by-email.css', __FILE__ ), array(), JETPACK__VERSION ); wp_style_add_data( 'post-by-email', 'jetpack-inline', true ); } @@ -105,17 +105,12 @@ public function user_profile() { if ( $this->check_user_connection() ) { $email = $this->get_post_by_email_address(); - if ( empty( $email ) ) { - $enable_hidden = ''; - $info_hidden = ' style="display: none;"'; - } else { - $enable_hidden = ' style="display: none;"'; - $info_hidden = ''; - } + $enable_button_style = empty( $email ) ? '' : 'display: none;'; + $info_style = empty( $email ) ? 'display: none;' : ''; ?> - /> -
> + +