Skip to content

Commit

Permalink
Merge pull request #1633 from xwp/develop
Browse files Browse the repository at this point in the history
Update RC branch
  • Loading branch information
marcinkrzeminski authored Nov 21, 2024
2 parents 5de4d79 + 05615af commit b8f5c7c
Show file tree
Hide file tree
Showing 10 changed files with 499 additions and 453 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.0
22.11.0
4 changes: 2 additions & 2 deletions classes/class-alerts-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ public function save_alert_inline_edit( $data, $postarr ) {
$trigger_author = wp_stream_filter_input( INPUT_POST, 'wp_stream_trigger_author' );
$trigger_connector_and_context = wp_stream_filter_input( INPUT_POST, 'wp_stream_trigger_connector_or_context' );
$trigger_connector_and_context_split = explode( '-', $trigger_connector_and_context );
$trigger_connector = $trigger_connector_and_context_split[0];
$trigger_context = $trigger_connector_and_context_split[1];
$trigger_connector = array_shift( $trigger_connector_and_context_split ) ?? '';
$trigger_context = array_shift( $trigger_connector_and_context_split ) ?? '';

$trigger_action = wp_stream_filter_input( INPUT_POST, 'wp_stream_trigger_action' );
$alert_type = wp_stream_filter_input( INPUT_POST, 'wp_stream_alert_type' );
Expand Down
18 changes: 18 additions & 0 deletions classes/class-alerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,24 @@ public function display_triggers_box( $post = array() ) {
echo '<label>' . esc_html__( 'Alert me when', 'stream' ) . '</label>';
$form->render_fields();
wp_nonce_field( 'save_alert', 'wp_stream_alerts_nonce' );

if ( $post instanceof \WP_Post ) :
/**
* These fields are required for the post to be saved, as the Admin AJAX inline_save action is fired.
*
* @see get_inline_data()
* @see wp_ajax_inline_save()
*/
?>
<input type="hidden" name="_status" value="<?php echo esc_attr( get_post_status( $post->ID ) ); ?>" />
<input type="hidden" name="jj" value="<?php echo esc_attr( mysql2date( 'd', $post->post_date, false ) ); ?>" />
<input type="hidden" name="mm" value="<?php echo esc_attr( mysql2date( 'm', $post->post_date, false ) ); ?>" />
<input type="hidden" name="aa" value="<?php echo esc_attr( mysql2date( 'Y', $post->post_date, false ) ); ?>" />
<input type="hidden" name="hh" value="<?php echo esc_attr( mysql2date( 'H', $post->post_date, false ) ); ?>" />
<input type="hidden" name="mn" value="<?php echo esc_attr( mysql2date( 'i', $post->post_date, false ) ); ?>" />
<input type="hidden" name="ss" value="<?php echo esc_attr( mysql2date( 's', $post->post_date, false ) ); ?>" />
<?php
endif;
}

/**
Expand Down
1 change: 1 addition & 0 deletions classes/class-connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public function log( $message, $args, $object_id, $context, $action, $user_id =
/**
* Override the data logged. Returning false to this filter will stop the data from being logged.
* Examples of this filter in use can be found in some of the custom connectors.
*
* @see Connector_ACF::log_override()
*
* @return array|false An array of the data to be logged or false if it should not be logged.
Expand Down
28 changes: 14 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion connectors/class-connector-buddypress.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function action_links( $links, $record ) {

// Check we have access to BuddyPress on this blog and that the user will have access to the links.
if ( ! $this->is_dependency_satisfied() || ! bp_current_user_can_moderate() ) {
return [];
return array();
}

// In the links, we also need to check the functions themselves as they're dependent on the BuddyPress module being enabled.
Expand Down
Loading

0 comments on commit b8f5c7c

Please sign in to comment.