Version Description
May 11, 2021 =
Fix: Exclude records when all conditions match instead of just one #1242, props @kidunot89 and @esausaravia
Fix: Store the correct blog ID on the network admin exclude screen #1259, props @dd32
Fix: Ensure all blogs on the network are listed instead of just the top 100 #1258, props @dd32
Fix: Add highlight color in list table #1246, props @ocean90
Fix: Settings page defaults repatched #1236, props @kidunot89
Development: Added unit tests for BuddyPress #1211, WooCommerce #1199, Media #1154, Jetpack #1153, Gravity Forms #1139 abd bbPress connector classes #1120, props @kidunot89
Download this release
Release Info
Developer | kasparsd |
Plugin | Stream |
Version | 3.7.0 |
Comparing to | |
See all releases |
Code changes from version 3.6.2 to 3.7.0
- alerts/class-alert-type-highlight.php +4 -2
- alerts/js/alert-type-highlight.min.js +1 -1
- classes/class-alerts-list.php +1 -1
- classes/class-log.php +6 -4
- classes/class-plugin.php +1 -1
- composer.json +1 -0
- connectors/class-connector-jetpack.php +9 -5
- connectors/class-connector-media.php +14 -24
- includes/functions.php +7 -0
- readme.txt +11 -2
- stream.php +1 -1
- ui/js/admin.min.js +1 -1
- ui/js/alerts.min.js +1 -1
- ui/js/exclude.js +1 -1
- ui/js/exclude.min.js +1 -1
- ui/js/live-updates.min.js +1 -1
- ui/js/settings.min.js +1 -1
- ui/js/wpseo-admin.min.js +1 -1
alerts/class-alert-type-highlight.php
CHANGED
@@ -217,8 +217,10 @@ class Alert_Type_Highlight extends Alert_Type {
|
|
217 |
* @return array New list of classes.
|
218 |
*/
|
219 |
public function post_class( $classes, $record ) {
|
220 |
-
|
221 |
-
|
|
|
|
|
222 |
}
|
223 |
|
224 |
if ( empty( $color ) || ! is_string( $color ) ) {
|
217 |
* @return array New list of classes.
|
218 |
*/
|
219 |
public function post_class( $classes, $record ) {
|
220 |
+
$record = new Record( $record );
|
221 |
+
$alerts_triggered = $record->get_meta( Alerts::ALERTS_TRIGGERED_META_KEY, true );
|
222 |
+
if ( ! empty( $alerts_triggered[ $this->slug ]['highlight_color'] ) ) {
|
223 |
+
$color = $alerts_triggered[ $this->slug ]['highlight_color'];
|
224 |
}
|
225 |
|
226 |
if ( empty( $color ) || ! is_string( $color ) ) {
|
alerts/js/alert-type-highlight.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var streamAlertTypeHighlight=function(
|
1 |
+
var streamAlertTypeHighlight=function(i){var e={ajaxUrl:"",removeAction:"",security:""};return"undefined"!=typeof _streamAlertTypeHighlightExports&&i.extend(e,_streamAlertTypeHighlightExports),e.init=function(){i(document).ready(function(){i('.alert-highlight .action-link[href="#"]').each(function(){var r=i(this);r.click(function(t){t.preventDefault(),t=(t=r.parents(".alert-highlight").attr("class").match(/record\-id\-[\w-]*\b/))[0].replace("record-id-",""),t={action:e.removeAction,security:e.security,recordId:t},i.post(e.ajaxUrl,t,function(t){!0===t.success&&function(){var t=r.parents(".alert-highlight"),e=i(".striped > tbody > :nth-child( odd )");t.is(e)?t.animate({backgroundColor:"#f9f9f9"},300,function(){t.removeClass("alert-highlight")}):t.animate({backgroundColor:""},300,function(){t.removeClass("alert-highlight")});r.remove()}()})})})})},e}(jQuery);
|
classes/class-alerts-list.php
CHANGED
@@ -56,7 +56,7 @@ class Alerts_List {
|
|
56 |
* @return array
|
57 |
*/
|
58 |
public function parse_request( $query_vars ) {
|
59 |
-
$screen = get_current_screen();
|
60 |
if ( 'edit-wp_stream_alerts' === $screen->id && Alerts::POST_TYPE === $query_vars['post_type'] && empty( $query_vars['post_status'] ) ) {
|
61 |
$query_vars['post_status'] = array( 'wp_stream_enabled', 'wp_stream_disabled' );
|
62 |
}
|
56 |
* @return array
|
57 |
*/
|
58 |
public function parse_request( $query_vars ) {
|
59 |
+
$screen = \get_current_screen();
|
60 |
if ( 'edit-wp_stream_alerts' === $screen->id && Alerts::POST_TYPE === $query_vars['post_type'] && empty( $query_vars['post_status'] ) ) {
|
61 |
$query_vars['post_status'] = array( 'wp_stream_enabled', 'wp_stream_disabled' );
|
62 |
}
|
classes/class-log.php
CHANGED
@@ -242,8 +242,10 @@ class Log {
|
|
242 |
* @return boolean
|
243 |
*/
|
244 |
public function record_matches_rules( $record, $exclude_rules ) {
|
|
|
|
|
245 |
foreach ( $exclude_rules as $exclude_key => $exclude_value ) {
|
246 |
-
if ( ! isset( $record[ $exclude_key ] ) ) {
|
247 |
continue;
|
248 |
}
|
249 |
|
@@ -251,14 +253,14 @@ class Log {
|
|
251 |
$ip_addresses = explode( ',', $exclude_value );
|
252 |
|
253 |
if ( in_array( $record['ip_address'], $ip_addresses, true ) ) {
|
254 |
-
|
255 |
}
|
256 |
} elseif ( $record[ $exclude_key ] === $exclude_value ) {
|
257 |
-
|
258 |
}
|
259 |
}
|
260 |
|
261 |
-
return
|
262 |
}
|
263 |
|
264 |
/**
|
242 |
* @return boolean
|
243 |
*/
|
244 |
public function record_matches_rules( $record, $exclude_rules ) {
|
245 |
+
$matches_needed = count( $exclude_rules );
|
246 |
+
$matches_found = 0;
|
247 |
foreach ( $exclude_rules as $exclude_key => $exclude_value ) {
|
248 |
+
if ( ! isset( $record[ $exclude_key ] ) || is_null( $exclude_value ) ) {
|
249 |
continue;
|
250 |
}
|
251 |
|
253 |
$ip_addresses = explode( ',', $exclude_value );
|
254 |
|
255 |
if ( in_array( $record['ip_address'], $ip_addresses, true ) ) {
|
256 |
+
$matches_found++;
|
257 |
}
|
258 |
} elseif ( $record[ $exclude_key ] === $exclude_value ) {
|
259 |
+
$matches_found++;
|
260 |
}
|
261 |
}
|
262 |
|
263 |
+
return $matches_found === $matches_needed;
|
264 |
}
|
265 |
|
266 |
/**
|
classes/class-plugin.php
CHANGED
@@ -18,7 +18,7 @@ class Plugin {
|
|
18 |
*
|
19 |
* @const string
|
20 |
*/
|
21 |
-
const VERSION = '3.
|
22 |
|
23 |
/**
|
24 |
* WP-CLI command
|
18 |
*
|
19 |
* @const string
|
20 |
*/
|
21 |
+
const VERSION = '3.7.0';
|
22 |
|
23 |
/**
|
24 |
* WP-CLI command
|
composer.json
CHANGED
@@ -24,6 +24,7 @@
|
|
24 |
"wp-phpunit/wp-phpunit": "^5.4",
|
25 |
"wpackagist-plugin/advanced-custom-fields": "5.8.12",
|
26 |
"wpackagist-plugin/easy-digital-downloads": "^2.9.23",
|
|
|
27 |
"wpackagist-plugin/user-switching": "^1.5.5",
|
28 |
"wpsh/local": "^0.2.3"
|
29 |
},
|
24 |
"wp-phpunit/wp-phpunit": "^5.4",
|
25 |
"wpackagist-plugin/advanced-custom-fields": "5.8.12",
|
26 |
"wpackagist-plugin/easy-digital-downloads": "^2.9.23",
|
27 |
+
"wpackagist-plugin/jetpack": "^8.7",
|
28 |
"wpackagist-plugin/user-switching": "^1.5.5",
|
29 |
"wpsh/local": "^0.2.3"
|
30 |
},
|
connectors/class-connector-jetpack.php
CHANGED
@@ -318,11 +318,16 @@ class Connector_Jetpack extends Connector {
|
|
318 |
'label' => esc_html__( 'Tiled Galleries', 'stream' ),
|
319 |
'context' => 'tiled-gallery',
|
320 |
),
|
|
|
|
|
|
|
|
|
|
|
321 |
);
|
322 |
}
|
323 |
|
324 |
/**
|
325 |
-
*
|
326 |
* Includes:
|
327 |
* - Activation/Deactivation of modules
|
328 |
* - Registration/Disconnection of blogs
|
@@ -374,11 +379,10 @@ class Connector_Jetpack extends Connector {
|
|
374 |
$action = $method;
|
375 |
$meta = compact( 'user_id', 'user_email', 'user_login' );
|
376 |
$message = sprintf(
|
377 |
-
/* translators: %1$s: a user display name, %2$s: a status
|
378 |
-
__( '%1$s\'s account %2$s
|
379 |
$user->display_name,
|
380 |
-
( 'unlink' === $action ) ? esc_html__( 'unlinked', 'stream' ) : esc_html__( 'linked', 'stream' )
|
381 |
-
( 'unlink' === $action ) ? esc_html__( 'from', 'stream' ) : esc_html__( 'to', 'stream' )
|
382 |
);
|
383 |
} elseif ( in_array( $method, array( 'register', 'disconnect', 'subsiteregister', 'subsitedisconnect' ), true ) ) {
|
384 |
$context = 'blogs';
|
318 |
'label' => esc_html__( 'Tiled Galleries', 'stream' ),
|
319 |
'context' => 'tiled-gallery',
|
320 |
),
|
321 |
+
// Monitor.
|
322 |
+
'monitor_receive_notification' => array(
|
323 |
+
'label' => esc_html__( 'Monitor notifications', 'stream' ),
|
324 |
+
'context' => 'monitor',
|
325 |
+
),
|
326 |
);
|
327 |
}
|
328 |
|
329 |
/**
|
330 |
+
* Tracks logs add to Jetpack logging.
|
331 |
* Includes:
|
332 |
* - Activation/Deactivation of modules
|
333 |
* - Registration/Disconnection of blogs
|
379 |
$action = $method;
|
380 |
$meta = compact( 'user_id', 'user_email', 'user_login' );
|
381 |
$message = sprintf(
|
382 |
+
/* translators: %1$s: a user display name, %2$s: a status and the connection either "from" or "to" (e.g. "Jane Doe", "unlinked from") */
|
383 |
+
__( '%1$s\'s account %2$s Jetpack', 'stream' ),
|
384 |
$user->display_name,
|
385 |
+
( 'unlink' === $action ) ? esc_html__( 'unlinked from', 'stream' ) : esc_html__( 'linked to', 'stream' )
|
|
|
386 |
);
|
387 |
} elseif ( in_array( $method, array( 'register', 'disconnect', 'subsiteregister', 'subsitedisconnect' ), true ) ) {
|
388 |
$context = 'blogs';
|
connectors/class-connector-media.php
CHANGED
@@ -151,7 +151,7 @@ class Connector_Media extends Connector {
|
|
151 |
$url = $post->guid;
|
152 |
$parent_id = $post->post_parent;
|
153 |
$parent = get_post( $parent_id );
|
154 |
-
$parent_title = $
|
155 |
$attachment_type = $this->get_attachment_type( $post->guid );
|
156 |
|
157 |
$this->log(
|
@@ -171,18 +171,14 @@ class Connector_Media extends Connector {
|
|
171 |
* @param int $post_id Post ID.
|
172 |
*/
|
173 |
public function callback_edit_attachment( $post_id ) {
|
174 |
-
$post
|
175 |
-
$name = $post->post_title;
|
176 |
-
$attachment_type = $this->get_attachment_type( $post->guid );
|
177 |
-
|
178 |
-
/* translators: %s: an attachment title (e.g. "PIC001") */
|
179 |
-
$message = esc_html__( 'Updated "%s"', 'stream' );
|
180 |
|
181 |
$this->log(
|
182 |
-
|
183 |
-
|
|
|
184 |
$post_id,
|
185 |
-
$
|
186 |
'updated'
|
187 |
);
|
188 |
}
|
@@ -195,21 +191,17 @@ class Connector_Media extends Connector {
|
|
195 |
* @param int $post_id Post ID.
|
196 |
*/
|
197 |
public function callback_delete_attachment( $post_id ) {
|
198 |
-
$post
|
199 |
-
$
|
200 |
-
$
|
201 |
-
$
|
202 |
-
$url = $post->guid;
|
203 |
-
$attachment_type = $this->get_attachment_type( $post->guid );
|
204 |
-
|
205 |
-
/* translators: %s: an attachment title (e.g. "PIC001") */
|
206 |
-
$message = esc_html__( 'Deleted "%s"', 'stream' );
|
207 |
|
208 |
$this->log(
|
209 |
-
|
|
|
210 |
compact( 'name', 'parent_id', 'url' ),
|
211 |
$post_id,
|
212 |
-
$
|
213 |
'deleted'
|
214 |
);
|
215 |
}
|
@@ -233,14 +225,12 @@ class Connector_Media extends Connector {
|
|
233 |
$name = basename( $filename );
|
234 |
$post = get_post( $post_id );
|
235 |
|
236 |
-
$attachment_type = $this->get_attachment_type( $post->guid );
|
237 |
-
|
238 |
$this->log(
|
239 |
/* translators: Placeholder refers to an attachment title (e.g. "PIC001") */
|
240 |
__( 'Edited image "%s"', 'stream' ),
|
241 |
compact( 'name', 'filename', 'post_id' ),
|
242 |
$post_id,
|
243 |
-
$
|
244 |
'edited'
|
245 |
);
|
246 |
}
|
151 |
$url = $post->guid;
|
152 |
$parent_id = $post->post_parent;
|
153 |
$parent = get_post( $parent_id );
|
154 |
+
$parent_title = $parent instanceof \WP_Post ? $parent->post_title : 'Unidentifiable post';
|
155 |
$attachment_type = $this->get_attachment_type( $post->guid );
|
156 |
|
157 |
$this->log(
|
171 |
* @param int $post_id Post ID.
|
172 |
*/
|
173 |
public function callback_edit_attachment( $post_id ) {
|
174 |
+
$post = get_post( $post_id );
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
$this->log(
|
177 |
+
/* translators: %s: an attachment title (e.g. "PIC001") */
|
178 |
+
esc_html__( 'Updated "%s"', 'stream' ),
|
179 |
+
array( 'name' => $post->post_title ),
|
180 |
$post_id,
|
181 |
+
$this->get_attachment_type( $post->guid ),
|
182 |
'updated'
|
183 |
);
|
184 |
}
|
191 |
* @param int $post_id Post ID.
|
192 |
*/
|
193 |
public function callback_delete_attachment( $post_id ) {
|
194 |
+
$post = get_post( $post_id );
|
195 |
+
$parent_id = $post->post_parent ? $post->post_parent : null;
|
196 |
+
$name = $post->post_title;
|
197 |
+
$url = $post->guid;
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
$this->log(
|
200 |
+
/* translators: %s: an attachment title (e.g. "PIC001") */
|
201 |
+
esc_html__( 'Deleted "%s"', 'stream' ),
|
202 |
compact( 'name', 'parent_id', 'url' ),
|
203 |
$post_id,
|
204 |
+
$this->get_attachment_type( $post->guid ),
|
205 |
'deleted'
|
206 |
);
|
207 |
}
|
225 |
$name = basename( $filename );
|
226 |
$post = get_post( $post_id );
|
227 |
|
|
|
|
|
228 |
$this->log(
|
229 |
/* translators: Placeholder refers to an attachment title (e.g. "PIC001") */
|
230 |
__( 'Edited image "%s"', 'stream' ),
|
231 |
compact( 'name', 'filename', 'post_id' ),
|
232 |
$post_id,
|
233 |
+
$this->get_attachment_type( $post->guid ),
|
234 |
'edited'
|
235 |
);
|
236 |
}
|
includes/functions.php
CHANGED
@@ -95,7 +95,14 @@ function wp_stream_json_encode( $data, $options = 0, $depth = 512 ) {
|
|
95 |
* @return array
|
96 |
*/
|
97 |
function wp_stream_get_sites( $args = array() ) {
|
|
|
|
|
|
|
|
|
98 |
if ( function_exists( 'get_sites' ) ) {
|
|
|
|
|
|
|
99 |
$sites = get_sites( $args );
|
100 |
} else {
|
101 |
$sites = array();
|
95 |
* @return array
|
96 |
*/
|
97 |
function wp_stream_get_sites( $args = array() ) {
|
98 |
+
if ( empty( $args['limit'] ) ) {
|
99 |
+
$args['limit'] = 0;
|
100 |
+
}
|
101 |
+
|
102 |
if ( function_exists( 'get_sites' ) ) {
|
103 |
+
// Account for get_sites() which uses 'number' while wp_get_sites() uses 'limit'.
|
104 |
+
$args['number'] = $args['limit'];
|
105 |
+
|
106 |
$sites = get_sites( $args );
|
107 |
} else {
|
108 |
$sites = array();
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: xwp
|
3 |
Tags: wp stream, stream, activity, logs, track
|
4 |
Requires at least: 4.5
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 3.
|
7 |
License: GPLv2 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -91,6 +91,15 @@ Past Contributors: fjarrett, shadyvb, chacha, westonruter, johnregan3, jacobschw
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
= 3.6.2 - January 12, 2020 =
|
95 |
|
96 |
* Fix: revert [#1159](https://github.com/xwp/stream/pull/1159) which caused a PHP error in the previous release.
|
2 |
Contributors: xwp
|
3 |
Tags: wp stream, stream, activity, logs, track
|
4 |
Requires at least: 4.5
|
5 |
+
Tested up to: 5.7
|
6 |
+
Stable tag: 3.7.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 3.7.0 - May 11, 2021 =
|
95 |
+
|
96 |
+
- Fix: Exclude records when all conditions match instead of just one [#1242](https://github.com/xwp/stream/pull/1242), props [@kidunot89](https://github.com/kidunot89) and [@esausaravia](https://github.com/esausaravia)
|
97 |
+
- Fix: Store the correct blog ID on the network admin exclude screen [#1259](https://github.com/xwp/stream/pull/1259), props [@dd32](https://github.com/dd32)
|
98 |
+
- Fix: Ensure all blogs on the network are listed instead of just the top 100 [#1258](https://github.com/xwp/stream/pull/1258), props [@dd32](https://github.com/dd32)
|
99 |
+
- Fix: Add highlight color in list table [#1246](https://github.com/xwp/stream/pull/1246), props [@ocean90](https://github.com/ocean90)
|
100 |
+
- Fix: Settings page defaults repatched [#1236](https://github.com/xwp/stream/pull/1236), props [@kidunot89](https://github.com/kidunot89)
|
101 |
+
- Development: Added unit tests for BuddyPress [#1211](https://github.com/xwp/stream/pull/1211), WooCommerce [#1199](https://github.com/xwp/stream/pull/1199), Media [#1154](https://github.com/xwp/stream/pull/1154), Jetpack [#1153](https://github.com/xwp/stream/pull/1153), Gravity Forms [#1139](https://github.com/xwp/stream/pull/1139) abd bbPress connector classes [#1120](https://github.com/xwp/stream/pull/1120), props [@kidunot89](https://github.com/kidunot89)
|
102 |
+
|
103 |
= 3.6.2 - January 12, 2020 =
|
104 |
|
105 |
* Fix: revert [#1159](https://github.com/xwp/stream/pull/1159) which caused a PHP error in the previous release.
|
stream.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Stream
|
4 |
* Plugin URI: https://xwp.co/work/stream/
|
5 |
* Description: Stream tracks logged-in user activity so you can monitor every change made on your WordPress site in beautifully organized detail. All activity is organized by context, action and IP address for easy filtering. Developers can extend Stream with custom connectors to log any kind of action.
|
6 |
-
* Version: 3.
|
7 |
* Author: XWP
|
8 |
* Author URI: https://xwp.co
|
9 |
* License: GPLv2+
|
3 |
* Plugin Name: Stream
|
4 |
* Plugin URI: https://xwp.co/work/stream/
|
5 |
* Description: Stream tracks logged-in user activity so you can monitor every change made on your WordPress site in beautifully organized detail. All activity is organized by context, action and IP address for easy filtering. Developers can extend Stream with custom connectors to log any kind of action.
|
6 |
+
* Version: 3.7.0
|
7 |
* Author: XWP
|
8 |
* Author URI: https://xwp.co
|
9 |
* License: GPLv2+
|
ui/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(p){"en"===wp_stream.locale&&void 0!==p.timeago&&(p.timeago.settings.strings.seconds="seconds",p.timeago.settings.strings.minute="a minute",p.timeago.settings.strings.hour="an hour",p.timeago.settings.strings.hours="%d hours",p.timeago.settings.strings.month="a month",p.timeago.settings.strings.year="a year"),p("li.toplevel_page_wp_stream ul li.wp-first-item.current").parent().parent().find(".update-plugins").remove(),p(".toplevel_page_wp_stream :input.chosen-select").each(function(e,t){function a(e){var t=p("<span>"),a=p(e.element),i="";return"- "===e.text.substring(0,2)&&(e.text=e.text.substring(2)),void 0!==e.id&&"string"==typeof e.id&&(0===e.id.indexOf("group-")?t.addClass("parent"):a.hasClass("level-2")&&t.addClass("child")),void 0!==e.icon?i=e.icon:void 0!==a&&""!==a.data("icon")&&(i=a.data("icon")),i&&t.html('<img src="'+i+'" class="wp-stream-select2-icon">'),t.append(e.text),t}function i(e){return"- "===e.text.substring(0,2)&&(e.text=e.text.substring(2)),e.text}var n={},n=0<p(t).find("option").not(":selected").not(":empty").length?{minimumResultsForSearch:10,templateResult:a,templateSelection:i,allowClear:!0,width:"165px"}:{minimumInputLength:3,allowClear:!0,width:"165px",ajax:{url:ajaxurl,delay:500,dataType:"json",quietMillis:100,data:function(e){return{action:"wp_stream_filters",nonce:p("#stream_filters_user_search_nonce").val(),filter:p(t).attr("name"),q:e.term}},processResults:function(e){var a=[];return p.each(e,function(e,t){a.push({id:t.id,text:t.label})}),{results:a}}},templateResult:a,templateSelection:i};p(t).select2(n)});var e=p.streamGetQueryVars(),t=p('.toplevel_page_wp_stream select.chosen-select[name="context"]');void 0!==e.context&&""!==e.context||void 0===e.connector||(t.val("group-"+e.connector),t.trigger("change")),p("input[type=submit]","#record-filter-form").click(function(){p("input[type=submit]",p(this).parents("form")).removeAttr("clicked"),p(this).attr("clicked","true")}),p("#record-filter-form").submit(function(){var e=p('.toplevel_page_wp_stream :input.chosen-select[name="context"]'),t=e.find("option:selected"),a=e.parent().find(".record-filter-connector"),i=t.data("group"),n=t.prop("class"),e=p(".recordactions select");"true"!==p("#record-actions-submit").attr("clicked")&&e.val(""),a.val(i),"level-1"===n&&t.val("")}),p(window).on("load",function(){p('.toplevel_page_wp_stream input[type="search"]').off("mousedown")}),p("body").on("click","#wp_stream_advanced_delete_all_records, #wp_stream_network_advanced_delete_all_records",function(e){window.confirm(wp_stream.i18n.confirm_purge)||e.preventDefault()}),p("body").on("click","#wp_stream_advanced_reset_site_settings, #wp_stream_network_advanced_reset_site_settings",function(e){window.confirm(wp_stream.i18n.confirm_defaults)||e.preventDefault()}),p("body").on("click","#wp_stream_uninstall",function(e){window.confirm(wp_stream.i18n.confirm_uninstall)||e.preventDefault()});var i=p(".wp_stream_screen .nav-tab-wrapper"),n=p(".wp_stream_screen .nav-tab-content table.form-table"),e=i.find(".nav-tab-active"),t=0<e.length?i.find("a").index(e):0,e=window.location.hash.match(/^#(\d+)$/),t=null!==e?e[1]:t;i.on("click","a",function(){var e,t=i.find("a").index(p(this)),a=window.location.hash.match(/^#(\d+)$/);return n.hide().eq(t).show(),i.find("a").removeClass("nav-tab-active").filter(p(this)).addClass("nav-tab-active"),""!==window.location.hash&&null===a||(window.location.hash=t),e=t,0!==(a=p('input[name="option_page"][value^="wp_stream"]').closest("form")).length&&(t=a.attr("action"),a.prop("action",t.replace(/(^[^#]*).*$/,"$1#"+e))),!1}),i.children().eq(t).trigger("click"),p(document).ready(function(){function t(){var e=!0;p('div.metabox-prefs [name="date-hide"]').is(":checked")&&(e=!1),p("div.alignleft.actions div.select2-container").each(function(){if(!p(this).is(":hidden"))return e=!1}),e?(p("input#record-query-submit").hide(),p("span.filter_info").show()):(p("input#record-query-submit").show(),p("span.filter_info").hide())}p("#enable_live_update").click(function(){var e,t=p("#stream_live_update_nonce").val(),a=p("#enable_live_update_user").val(),i="unchecked";p("#enable_live_update").is(":checked")&&(i="checked"),e=p("#enable_live_update").data("heartbeat"),p.ajax({type:"POST",url:ajaxurl,data:{action:"stream_enable_live_update",nonce:t,user:a,checked:i,heartbeat:e},dataType:"json",beforeSend:function(){p(".stream-live-update-checkbox .spinner").show().css({display:"inline-block"})},success:function(e){p(".stream-live-update-checkbox .spinner").hide(),!1===e.success&&(p("#enable_live_update").prop("checked",!1),e.data&&window.alert(e.data))}})}),p('div.metabox-prefs [name="date-hide"]').is(":checked")?p("div.date-interval").show():p("div.date-interval").hide(),p("div.actions select.chosen-select").each(function(){var e=p(this).prop("name");p('div.metabox-prefs [name="'+e+'-hide"]').is(":checked")?p(this).prev(".select2-container").show():p(this).prev(".select2-container").hide()}),t(),p('div.metabox-prefs [type="checkbox"]').click(function(){var e=p(this).prop("id");"date-hide"===e?p(this).is(":checked")?p("div.date-interval").show():p("div.date-interval").hide():(e=e.replace("-hide",""),p(this).is(":checked")?p('[name="'+e+'"]').prev(".select2-container").show():p('[name="'+e+'"]').prev(".select2-container").hide()),t()}),p("#ui-datepicker-div").addClass("stream-datepicker")}),p("table.wp-list-table").on("updated",function(){p(this).find("time.relative-time").each(function(e,t){t=p(t);t.removeClass("relative-time"),p('<strong><time datetime="'+t.attr("datetime")+'" class="timeago"/></time></strong><br/>').prependTo(t.parent().parent()).find("time.timeago").timeago()})}).trigger("updated");var a={init:function(e){this.wrapper=e,this.save_interval(this.wrapper.find(".button-primary"),this.wrapper),this.$=this.wrapper.each(function(e,t){var a,i=p(t),n=i.find(".date-inputs"),r=i.find(".field-from"),s=i.find(".field-to"),o=s.prev(".date-remove"),c=r.prev(".date-remove"),d=i.children(".field-predefined"),l=p("").add(s).add(r);jQuery.datepicker&&(a=parseFloat(wp_stream.gmt_offset)-(new Date).getTimezoneOffset()/60*-1,t=new Date,i=new Date(t.getTime()+60*a*60*1e3),a=0,t.getDate()===i.getDate()&&t.getMonth()===i.getMonth()||(a=t.getTime()<i.getTime()?"+1d":"-1d"),l.datepicker({dateFormat:"yy/mm/dd",minDate:null,maxDate:a,defaultDate:i,beforeShow:function(){p(this).prop("disabled",!0)},onClose:function(){p(this).prop("disabled",!1)}}),l.datepicker("widget").addClass("stream-datepicker")),d.select2({allowClear:!0}),""!==r.val()&&c.show(),""!==s.val()&&o.show(),d.on({change:function(){var e=p(this).val(),t=d.find('[value="'+e+'"]'),a=t.data("to"),t=t.data("from");if("custom"===e)return n.show(),!1;n.hide(),l.datepicker("hide"),r.val(t).trigger("change",[!0]),s.val(a).trigger("change",[!0]),jQuery.datepicker&&l.datepicker("widget").is(":visible")&&l.datepicker("refresh").datepicker("hide")},"select2-removed":function(){d.val("").trigger("change")},check_options:function(){var e;(""!==s.val()&&""!==r.val()?0!==(e=d.find("option").filter('[data-to="'+s.val()+'"]').filter('[data-from="'+r.val()+'"]')).length?d.val(e.attr("value")):d.val("custom"):""===s.val()&&""===r.val()?d.val(""):d.val("custom")).trigger("change",[!0])}}),r.on("change",function(){return""!==r.val()?(c.show(),s.datepicker("option","minDate",r.val())):c.hide(),!0!==arguments[arguments.length-1]&&void d.trigger("check_options")}),s.on("change",function(){return""!==s.val()?(o.show(),r.datepicker("option","maxDate",s.val())):o.hide(),!0!==arguments[arguments.length-1]&&void d.trigger("check_options")}),d.trigger("change"),p("").add(c).add(o).on("click",function(){p(this).next("input").val("").trigger("change")})})},save_interval:function(e){var t=this.wrapper;e.click(function(){var e={key:t.find("select.field-predefined").find(":selected").val(),start:t.find(".date-inputs .field-from").val(),end:t.find(".date-inputs .field-to").val()};p(this).attr("href",p(this).attr("href")+"&"+p.param(e))})}};p(document).ready(function(){a.init(p(".date-interval")),p('select[name="context"] .level-1').each(function(){var e=!0;p(this).nextUntil(".level-1").each(function(){if(p(this).is(":not(:disabled)"))return e=!1}),!0===e&&p(this).prop("disabled",!0)})})}),jQuery.extend({streamGetQueryVars:function(e){return(e||document.location.search).replace(/(^\?)/,"").split("&").map(function(e){return this[(e=e.split("="))[0]]=e[1],this}.bind({}))[0]}});
|
ui/js/alerts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(s){"use strict";function l(t){(t=s(t)).find(".select2-select.connector_or_context").each(function(t,e){s(e).select2({allowClear:!0,placeholder:streamAlerts.anyContext,templateResult:function(t){return void 0===t.id?t.text:-1===t.id.indexOf("-")?s('<span class="parent">'+t.text+"</span>"):s('<span class="child">'+t.text+"</span>")},matcher:function(t,e){var n=s.extend(!0,{},e);if(null===t.term||""===s.trim(t.term))return n;var a=t.term.toLowerCase();if(n.id=n.id.replace("blogs","sites"),0<=n.id.toLowerCase().indexOf(a))return n;if(n.children){for(var i=n.children.length-1;0<=i;i--)-1===n.children[i].id.toLowerCase().indexOf(a)&&n.children.splice(i,1);if(0<n.children.length)return n}return null}}).change(function(){var t=s(this).val();t&&(t=t.split("-"),s(this).siblings(".connector").val(t[0]),s(this).siblings(".context").val(t[1]))});var n=[s(e).siblings(".connector").val(),s(e).siblings(".context").val()];""===n[1]&&n.splice(1,1),s(e).val(n.join("-")).trigger("change")}),t.find("select.select2-select:not(.connector_or_context)").each(function(){var t=s(this).attr("id").split("_"),t=t[t.length-1].charAt(0).toUpperCase()+t[t.length-1].slice(1);s(this).select2({allowClear:!0,placeholder:streamAlerts.any+" "+t})})}function i(t){var e={action:"load_alerts_settings",alert_type:t},t=s("#wp_stream_alert_type").closest("tr").attr("id");e.post_id=t.split("-")[1],s.post(window.ajaxurl,e,function(t){var e=s("#wp_stream_alert_type_form");"none"!==s("#wp_stream_alert_type").val()?(e.html(t.data.html),e.show()):e.hide()})}var o,c,t=s("#wp_stream_alert_type");s("#the-list").on("change","#wp_stream_trigger_connector_or_context",function(){var t;"wp_stream_trigger_connector_or_context"===s(this).attr("id")&&((t=s(this).val())&&0<t.indexOf("-")&&(t=t.split("-")[0]),e(t))});var e=function(t){var r=s("#wp_stream_trigger_action");r.empty(),r.prop("disabled",!0);var e=s("<option/>",{value:"",text:""});r.append(e),s.post(window.ajaxurl,{action:"get_actions",connector:t},function(t){var e,n=t.success,a=t.data;if(n){for(var i in a)a.hasOwnProperty(i)&&(e=a[i],e=s("<option/>",{value:i,text:e}),r.append(e));r.prop("disabled",!1),s(document).trigger("alert-actions-updated")}})};t.change(function(){i(s(this).val())}),s("#wpbody-content").on("click","a.page-title-action",function(t){t.preventDefault(),s("#add-new-alert").remove(),0<s(".inline-edit-wp_stream_alerts").length&&s(".inline-edit-wp_stream_alerts .inline-edit-save button.button-secondary.cancel").trigger("click");var a;s.post(window.ajaxurl,{action:"get_new_alert_triggers_notifications"},function(t){var e,n;!0===t.success&&(a=t.data.html,s("tbody#the-list").prepend('<tr id="add-new-alert" class="inline-edit-row inline-edit-row-page inline-edit-page quick-edit-row quick-edit-row-page inline-edit-page inline-editor" style=""><td colspan="4" class="colspanchange">'+a+'<p class="submit inline-edit-save"> <button type="button" class="button-secondary cancel alignleft">Cancel</button> <input type="hidden" id="_inline_edit" name="_inline_edit" value="3550d271fe"> <button type="button" class="button-primary save alignright">Save</button> <span class="spinner"></span><span class="error" style="display:none"></span> <br class="clear"></p></td></tr>'),e=s("#add-new-alert"),n=e.css("background-color"),e.css("background-color","#C1E1B9"),setTimeout(function(){e.css("background-color",n)},250),s("#wp_stream_alert_type").change(function(){i(s(this).val())}),e.on("click",".button-secondary.cancel",function(){s("#add-new-alert").remove()}),e.on("click",".button-primary.save",r),l("#add-new-alert"))})});var n,r=function(t){t.preventDefault(),s("#add-new-alert").find("p.submit.inline-edit-save span.spinner").css("visibility","visible");var e={action:"save_new_alert",wp_stream_alerts_nonce:s("#wp_stream_alerts_nonce").val(),wp_stream_trigger_author:s("#wp_stream_trigger_author").val(),wp_stream_trigger_context:s("#wp_stream_trigger_connector_or_context").val(),wp_stream_trigger_action:s("#wp_stream_trigger_action").val(),wp_stream_alert_type:s("#wp_stream_alert_type").val(),wp_stream_alert_status:s("#wp_stream_alert_status").val()};s("#wp_stream_alert_type_form").find(":input").each(function(){var t=s(this).attr("id");s(this).val()&&(e[t]=s(this).val())}),s.post(window.ajaxurl,e,function(t){!0===t.success&&(s("#add-new-alert").find("p.submit.inline-edit-save span.spinner").css("visibility","hidden"),location.reload())})},p=inlineEditPost.edit;inlineEditPost.edit=function(t){p.apply(this,arguments);var e,n,a,i,r=0;0<(r="object"==typeof t?parseInt(this.getId(t),10):r)&&(c=s("#edit-"+r),a=(e=(o=s("#post-"+r)).find('input[name="wp_stream_trigger_connector"]').val())+"-"+(n=o.find('input[name="wp_stream_trigger_context"]').val()),i=o.find('input[name="wp_stream_trigger_action"]').val(),t=o.find('input[name="wp_stream_alert_status"]').val(),c.find('input[name="wp_stream_trigger_connector"]').attr("value",e),c.find('input[name="wp_stream_trigger_context"]').attr("value",n),c.find('select[name="wp_stream_trigger_connector_or_context"] option[value="'+a+'"]').attr("selected","selected"),s(document).one("alert-actions-updated",function(){c.find('input[name="wp_stream_trigger_action"]').attr("value",i),c.find('select[name="wp_stream_trigger_action"] option[value="'+i+'"]').attr("selected","selected").trigger("change")}),c.find('select[name="wp_stream_alert_status"] option[value="'+t+'"]').attr("selected","selected"),l("#edit-"+r),s("#wp_stream_alert_type_form").hide(),r=o.find('input[name="wp_stream_alert_type"]').val(),c.find('select[name="wp_stream_alert_type"] option[value="'+r+'"]').attr("selected","selected").trigger("change"))},!window.location.hash||(n=s(window.location.hash)).length&&(t=n.offset().top-s("#wpadminbar").height(),s("html, body").animate({scrollTop:t},1e3),n.find(".row-actions a.editinline").trigger("click"))});
|
ui/js/exclude.js
CHANGED
@@ -354,7 +354,7 @@ jQuery(
|
|
354 |
function() {
|
355 |
var parts = $( this ).val().split( '-' );
|
356 |
$( this ).siblings( '.connector' ).val( parts[0] );
|
357 |
-
$( this ).siblings( '.context' ).val( parts
|
358 |
$( this ).removeAttr( 'name' );
|
359 |
}
|
360 |
);
|
354 |
function() {
|
355 |
var parts = $( this ).val().split( '-' );
|
356 |
$( this ).siblings( '.connector' ).val( parts[0] );
|
357 |
+
$( this ).siblings( '.context' ).val( parts.slice( 1 ).join( '-' ) );
|
358 |
$( this ).removeAttr( 'name' );
|
359 |
}
|
360 |
);
|
ui/js/exclude.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(r){function t(e){var s;r("select.select2-select.connector_or_context",e).each(function(e,t){r(t).select2({allowClear:!0,templateResult:function(e){return void 0===e.id?e.text:-1===e.id.indexOf("-")?r('<span class="parent">'+e.text+"</span>"):r('<span class="child">'+e.text+"</span>")},matcher:function(e,t){var s=r.extend(!0,{},t);if(null===e.term||""===r.trim(e.term))return s;var n=e.term.toLowerCase();if(s.id=s.id.replace("blogs","sites"),0<=s.id.toLowerCase().indexOf(n))return s;if(s.children){for(var i=s.children.length-1;0<=i;i--)-1===s.children[i].id.toLowerCase().indexOf(n)&&s.children.splice(i,1);if(0<s.children.length)return s}return null}}).on("change",function(){var e=r(this).closest("tr"),t=r(this).val();!function(e,t){var l=r(".select2-select.action",e),c=l.val();l.empty(),l.prop("disabled",!0);e=r("<option/>",{value:"",text:""});l.append(e);t={action:"get_actions",connector:t};r.post(window.ajaxurl,t,function(e){var t,s=e.success,n=e.data;if(s){for(var i in n)n.hasOwnProperty(i)&&(t=n[i],t=r("<option/>",{value:i,text:t}),l.append(t));l.val(c),l.prop("disabled",!1),r(document).trigger("alert-actions-updated")}})}(e,t=t&&0<t.indexOf("-")?t.split("-")[0]:t)})}),r("select.select2-select.action",e).each(function(e,t){r(t).select2({allowClear:!0})}),r("select.select2-select.author_or_role",e).each(function(e,t){(s=r(t)).select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",quietMillis:500,data:function(e,t){return{find:e,limit:10,pager:t,action:"stream_get_users",nonce:s.data("nonce")}},processResults:function(e){var t={results:[{text:"",id:""},{text:"Roles",children:[]},{text:"Users",children:[]}]};if(!0!==e.success||void 0===e.data||!0!==e.data.status)return t;if(void 0===e.data.users||void 0===e.data.roles)return t;var s=[];return r.each(e.data.roles,function(e,t){s.push({id:e,text:t})}),t.results[1].children=s,t.results[2].children=e.data.users,t}},templateResult:function(e){var t=r("<div>").text(e.text);return void 0!==e.icon&&e.icon&&(t.prepend(r('<img src="'+e.icon+'" class="wp-stream-select2-icon">')),t.attr("title",e.tooltip)),void 0!==e.tooltip?t.attr("title",e.tooltip):void 0!==e.user_count&&t.attr("title",e.user_count),t},templateSelection:function(e){var t=r("<div>").text(e.text);return r.isNumeric(e.id)&&e.text.indexOf("icon-users")<0&&t.append(r('<i class="icon16 icon-users"></i>')),t},allowClear:!0,placeholder:s.data("placeholder")}).on("change",function(){var e=r(this).select2("data");r(this).data("selected-id",e.id),r(this).data("selected-text",e.text)})}),r("select.select2-select.ip_address",e).each(function(e,t){var s=r(t),n="";s.select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",quietMillis:500,data:function(e){return n=e.term,{find:e,limit:10,action:"stream_get_ips",nonce:s.data("nonce")}},processResults:function(e){var s={results:[]},t=[];return!0===e.success&&void 0!==e.data&&r.each(e.data,function(e,t){s.results.push({id:t,text:t})}),void 0===n||null===(t=n.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/))||(t.shift(),4<=(t=r.grep(t,function(e){var t=parseInt(e,10);return t<=255&&t.toString()===e})).length&&s.results.push({id:n,text:n})),s}},allowClear:!1,multiple:!0,maximumSelectionSize:1,placeholder:s.data("placeholder"),tags:!0})}).on("change",function(){r(this).prev(".select2-container").find("input.select2-input").blur()}),r("ul.select2-choices, ul.select2-choices li, input.select2-input",".stream-exclude-list tr:not(.hidden) .ip_address").on("mousedown click focus",function(){var e=r(this).closest(".select2-container"),t=e.find("input.select2-input");if(1<=e.select2("data").length)return t.blur(),!1}),r(".exclude_rules_remove_rule_row",e).on("click",function(e){r(this).closest("tr").remove(),i(),n(),e.preventDefault()})}var e=r(".stream-exclude-list tbody tr:not(.hidden)"),s=r(".stream-exclude-list tr.helper");function n(){var e=r("table.stream-exclude-list tbody tr:not( .hidden ) input.cb-select:checked"),t=r("#exclude_rules_remove_rules");0===e.length?t.prop("disabled",!0):t.prop("disabled",!1)}function i(){var e=r("table.stream-exclude-list tbody tr:not( .hidden )"),t=r("table.stream-exclude-list tbody tr.no-items"),s=r(".check-column.manage-column input.cb-select"),n=r("#exclude_rules_remove_rules");0===e.length?(t.show(),s.prop("disabled",!0),n.prop("disabled",!0)):(t.hide(),s.prop("disabled",!1)),wp_stream_regenerate_alt_rows(e)}t(e),r("select.select2-select.author_or_role",e).each(function(){var e=r("<option selected>"+r(this).data("selected-text")+"</option>").val(r(this).data("selected-id"));r(this).append(e).trigger("change")}),r("select.select2-select.connector_or_context",e).each(function(){var e=[r(this).siblings(".connector").val(),r(this).siblings(".context").val()];""===e[1]&&e.splice(1,1),r(this).val(e.join("-")).trigger("change")}),r("#exclude_rules_new_rule").on("click",function(){var e=s.clone();e.removeAttr("class"),e.insertBefore(s),t(e),i(),n()}),r("#exclude_rules_remove_rules").on("click",function(){var e=r("table.stream-exclude-list"),t=r("tbody input.cb-select:checked",e).closest("tr");2<=r("tbody tr",e).length-t.length?t.remove():(r(":input",t).val(""),r(t).not(":first").remove(),r(".select2-select",t).select2("val","")),e.find("input.cb-select").prop("checked",!1),i(),n()}),r(".stream-exclude-list").closest("form").submit(function(){r(".stream-exclude-list tbody tr.hidden",this).each(function(){r(this).find(":input").removeAttr("name")}),r(".stream-exclude-list tbody tr:not(.hidden) select.select2-select.connector_or_context",this).each(function(){var e=r(this).val().split("-");r(this).siblings(".connector").val(e[0]),r(this).siblings(".context").val(e.slice(1).join("-")),r(this).removeAttr("name")}),r(".stream-exclude-list tbody tr:not(.hidden) select.select2-select.ip_address",this).each(function(){var e=r("option:selected",this).first();e.length||r(this).append('<option selected="selected"></option>'),r("option:selected:not(:first)",this).each(function(){e.attr("value",e.attr("value")+","+r(this).attr("value")),r(this).removeAttr("selected")})})}),r(".stream-exclude-list").closest("td").prev("th").hide(),r("table.stream-exclude-list").on("click","input.cb-select",function(){n()}),r(document).ready(function(){i(),n()})});
|
ui/js/live-updates.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(p){p(document).ready(function(){var l;"toplevel_page_wp_stream"===wp_stream_live_updates.current_screen&&"1"===wp_stream_live_updates.current_page&&"asc"!==wp_stream_live_updates.current_order&&(1<parseInt(wp_stream_live_updates.current_query_count,10)||(l=".toplevel_page_wp_stream #the-list",wp.heartbeat.interval("fast"),p(document).on("heartbeat-send.stream",function(e,t){t["wp-stream-heartbeat"]="live-update";var a=p(l+" tr:first .column-date time"),r=1;0!==a.length&&(r=""===a.attr("datetime")?1:a.attr("datetime")),t["wp-stream-heartbeat-last-time"]=r,t["wp-stream-heartbeat-query"]=wp_stream_live_updates.current_query}),p(document).on("heartbeat-tick.stream",function(e,t){var a,r,s,n;t["wp-stream-heartbeat"]&&0!==t["wp-stream-heartbeat"].length&&(a=p("#edit_stream_per_page").val(),n=p(l+" tr"),(r=p(t["wp-stream-heartbeat"])).addClass("new-row"),s=n.first().hasClass("alternate"),1!==r.length||s?(s=0!=r.length%2||s?"odd":"even",r.filter(":nth-child("+s+")").addClass("alternate")):r.addClass("alternate"),p(l).prepend(r),p(".metabox-prefs input").each(function(){var e;!0!==p(this).prop("checked")&&(e=p(this).val(),p("td.column-"+e).hide())}),(n=a-(r.length+n.length))<0&&p(l+" tr").slice(n).remove(),p(l+" tr.no-items").remove(),(n=t.total_items_i18n||"")&&(p(".displaying-num").text(n),p(".total-pages").text(t.total_pages_i18n),p(".tablenav-pages").find(".next-page, .last-page").toggleClass("disabled",t.total_pages===p(".current-page").val()),p(".tablenav-pages .last-page").attr("href",t.last_page_link)),p(l).parent().trigger("updated"),wp_stream_regenerate_alt_rows(p(l+" tr")),setTimeout(function(){p(".new-row").addClass("fadeout"),setTimeout(function(){p(l+" tr").removeClass("new-row fadeout")},500)},3e3))})))})});
|
ui/js/settings.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(t){var e="wp_stream_network"===t('input[name="option_page"]').val()?"_network_affix":"",a=t("#wp_stream"+e+"\\[general_keep_records_indefinitely\\]"),n=t("#wp_stream"+e+"_general_records_ttl"),i=n.closest("tr");function o(){a.is(":checked")?(i.addClass("hidden"),n.addClass("hidden")):(i.removeClass("hidden"),n.removeClass("hidden"))}a.on("change",function(){o()}),o(),t("#wp_stream_general_reset_site_settings").click(function(e){confirm(wp_stream.i18n.confirm_defaults)||e.preventDefault()});var r=t(".nav-tab-wrapper"),s=t(".nav-tab-content table.form-table"),l=r.find(".nav-tab-active"),e=0<l.length?r.find("a").index(l):0,l=window.location.hash.match(/^#(\d+)$/),e=null!==l?l[1]:e;r.on("click","a",function(){var e,a=r.find("a").index(t(this)),n=window.location.hash.match(/^#(\d+)$/);return s.hide().eq(a).show(),r.find("a").removeClass("nav-tab-active").filter(t(this)).addClass("nav-tab-active"),""!==window.location.hash&&null===n||(window.location.hash=a),e=a,0!==(n=t('input[name="option_page"][value^="wp_stream"]').closest("form")).length&&(a=n.attr("action"),n.prop("action",a.replace(/(^[^#]*).*$/,"$1#"+e))),!1}),r.children().eq(e).trigger("click")});
|
ui/js/wpseo-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(o){var t,n
|
1 |
+
jQuery(function(o){var t,n;window.location.hash.substr("stream-highlight-")&&(n=window.location.hash.replace("stream-highlight-",""),t=o(":input"+n),window.location.hash="",t.length&&(o("#wpseo-tabs").length&&(n=t.parents(".wpseotab").first().attr("id"),window.location.hash="#top#"+n),jQuery(document).ready(function(){setTimeout(function(){o("body,html").animate({scrollTop:t.offset().top-50},"slow",function(){t.animate({backgroundColor:"yellow"},"slow")})},500)})))});
|