updated plugin Jetpack Protect
version 1.4.2
This commit is contained in:
@ -20,7 +20,7 @@ use Automattic\Jetpack\Status;
|
||||
*/
|
||||
class JITM {
|
||||
|
||||
const PACKAGE_VERSION = '2.3.4';
|
||||
const PACKAGE_VERSION = '2.5.1';
|
||||
|
||||
/**
|
||||
* The configuration method that is called from the jetpack-config package.
|
||||
@ -156,6 +156,7 @@ class JITM {
|
||||
'activate_module_text' => esc_html__( 'Activate', 'jetpack-jitm' ),
|
||||
'activated_module_text' => esc_html__( 'Activated', 'jetpack-jitm' ),
|
||||
'activating_module_text' => esc_html__( 'Activating', 'jetpack-jitm' ),
|
||||
'settings_module_text' => esc_html__( 'Settings', 'jetpack-jitm' ),
|
||||
'nonce' => wp_create_nonce( 'wp_rest' ),
|
||||
)
|
||||
);
|
||||
@ -230,7 +231,7 @@ class JITM {
|
||||
.st0{clip-path:url(#SVGID_2_);enable-background:new ;}
|
||||
.st1{clip-path:url(#SVGID_4_);}
|
||||
.st2{clip-path:url(#SVGID_6_);}
|
||||
.st3{clip-path:url(#SVGID_8_);fill:#8F567F;}
|
||||
.st3{clip-path:url(#SVGID_8_);fill:#7F54B3;}
|
||||
.st4{clip-path:url(#SVGID_10_);fill:#FFFFFE;}
|
||||
.st5{clip-path:url(#SVGID_12_);fill:#FFFFFE;}
|
||||
.st6{clip-path:url(#SVGID_14_);fill:#FFFFFE;}
|
||||
|
@ -266,7 +266,7 @@ class Post_Connection_JITM extends JITM {
|
||||
array(
|
||||
'external_user_id' => urlencode_deep( $user->ID ),
|
||||
'user_roles' => urlencode_deep( $user_roles ),
|
||||
'query_string' => urlencode_deep( $query ),
|
||||
'query_string' => urlencode_deep( build_query( $query ) ),
|
||||
'mobile_browser' => Device_Detection::is_smartphone() ? 1 : 0,
|
||||
'_locale' => get_user_locale(),
|
||||
),
|
||||
@ -360,7 +360,8 @@ class Post_Connection_JITM extends JITM {
|
||||
$this->tracking->record_user_event(
|
||||
'jitm_view_client',
|
||||
array(
|
||||
'jitm_id' => $envelope->id,
|
||||
'jitm_id' => $envelope->id,
|
||||
'jitm_message_path' => $message_path,
|
||||
)
|
||||
);
|
||||
|
||||
@ -405,6 +406,7 @@ class Post_Connection_JITM extends JITM {
|
||||
}
|
||||
|
||||
$envelope->content->icon = $this->generate_icon( $envelope->content->icon, $full_jp_logo_exists );
|
||||
$envelope->message_path = esc_attr( $message_path );
|
||||
|
||||
$stats->add( 'jitm', $envelope->id . '-viewed' );
|
||||
$stats->do_server_side_stats();
|
||||
@ -412,5 +414,4 @@ class Post_Connection_JITM extends JITM {
|
||||
|
||||
return $envelopes;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -55,7 +55,13 @@ class Rest_Api_Endpoints {
|
||||
return array();
|
||||
}
|
||||
|
||||
return $jitm->get_messages( $request['message_path'], urldecode_deep( $request['query'] ), 'true' === $request['full_jp_logo_exists'] ? true : false );
|
||||
// add the search term to the query params if it exists
|
||||
$query = $request['query'];
|
||||
if ( ! empty( $request['s'] ) ) {
|
||||
$query['s'] = $request['s'];
|
||||
}
|
||||
|
||||
return $jitm->get_messages( $request['message_path'], urldecode_deep( $query ), 'true' === $request['full_jp_logo_exists'] ? true : false );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -87,5 +93,4 @@ class Rest_Api_Endpoints {
|
||||
|
||||
return new \WP_Error( 'invalid_user_permission_jetpack_delete_jitm_message', REST_Connector::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,6 +33,7 @@
|
||||
// New JITMS - modified calypso banner styles
|
||||
$blue-medium-dark: #2271b1;
|
||||
$jp-gray: #dcdcde;
|
||||
$jp-gray-0: #f6f7f7;
|
||||
$jp-gray-20: #a7aaad;
|
||||
|
||||
.jitm-button {
|
||||
@ -64,6 +65,23 @@ $jp-gray-20: #a7aaad;
|
||||
&.is-primary {
|
||||
background: black;
|
||||
color: $white;
|
||||
.gridicons-external-link {
|
||||
fill: $white;
|
||||
}
|
||||
}
|
||||
|
||||
// Secondary buttons
|
||||
&.is-secondary {
|
||||
.gridicons-external-link {
|
||||
fill: black;
|
||||
}
|
||||
&:hover{
|
||||
color: black;
|
||||
background: $jp-gray-0;
|
||||
.gridicons-external-link {
|
||||
fill: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover,
|
||||
@ -107,6 +125,11 @@ $jp-gray-20: #a7aaad;
|
||||
.gridicons-plus-small + .gridicon {
|
||||
margin-left: -4px;
|
||||
}
|
||||
|
||||
// Properly align icon with the button text
|
||||
.gridicons-external-link {
|
||||
margin: -3px 0 -3px 2px;
|
||||
}
|
||||
}
|
||||
&.hidden {
|
||||
display: none;
|
||||
|
Reference in New Issue
Block a user