Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Aug 3, 2023
2 parents efe228c + fcbb772 commit 1de09c1
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 20 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file, per [the Ke
## [2.0.0] - TBD
**Note that Distributor now requires PHP 7.4 or later and WordPress 5.7 or later.**

_This entry was generated for the 2.0.0-beta2 release and will be updated during the Beta and Release Candidate processes._
_This entry was generated for the 2.0.0-rc1 release and will be updated during the Beta and Release Candidate processes._

### Added
- Migration guide for version 1 to version 2 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@faisal-alvi](https://github.com/faisal-alvi), [@jeffpaul](https://github.com/jeffpaul) via [#996](https://github.com/10up/distributor/pull/996)).
Expand All @@ -27,7 +27,7 @@ _This entry was generated for the 2.0.0-beta2 release and will be updated during
- Now requires PHP 7.4 or later and WordPress 5.7 or later (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@vikrampm1](https://github.com/vikrampm1), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#917](https://github.com/10up/distributor/pull/917)).
- Descriptive warning message copy on remote, distributed posts (props [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic) via [#1006](https://github.com/10up/distributor/pull/1006)).
- Indicate if the origin post has been deleted in Distributor push interface (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul), [@faisal-alvi](https://github.com/faisal-alvi) via [#1067](https://github.com/10up/distributor/pull/1067)).
- Toggles the Distributor admin bar element in Gutenberg based on the post status (props [@ggutenberg](https://github.com/ggutenberg), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1022](https://github.com/10up/distributor/pull/1022)).
- Toggles the Distributor admin bar element in Gutenberg based on the post status (props [@ggutenberg](https://github.com/ggutenberg), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1022](https://github.com/10up/distributor/pull/1022), [#1114](https://github.com/10up/distributor/pull/1114)).
- Reduced duplicate code pushing posts to connections (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul), [@faisal-alvi](https://github.com/faisal-alvi), [@aaronware](https://github.com/aaronware) via [#999](https://github.com/10up/distributor/pull/999)).
- Unified translator comments (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic) via [#949](https://github.com/10up/distributor/pull/949)).
- WordPress "tested up to" version 6.2 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi), [@jeffpaul](https://github.com/jeffpaul) via [#1047](https://github.com/10up/distributor/pull/1047)).
Expand Down Expand Up @@ -61,6 +61,7 @@ _This entry was generated for the 2.0.0-beta2 release and will be updated during
- Bump `loader-utils` from 2.0.2 to 2.0.4 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#963](https://github.com/10up/distributor/pull/963), [#970](https://github.com/10up/distributor/pull/970)).
- Bump `simple-git` from 3.11.0 to 3.15.1 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#983](https://github.com/10up/distributor/pull/983)).
- Bump `webpack` from 5.74.0 to 5.76.2 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1029](https://github.com/10up/distributor/pull/1029), [#1032](https://github.com/10up/distributor/pull/1032)).
- Bump `word-wrap` from 1.2.3 to 1.2.4 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1116](https://github.com/10up/distributor/pull/1116)).

## [1.9.1] - 2023-03-15
### Security
Expand Down
3 changes: 2 additions & 1 deletion assets/js/gutenberg-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ const DistributorPlugin = () => {
const post = useSelect( ( select ) =>
select( 'core/editor' ).getCurrentPost()
);
// Make the post title available to the top menu.
// Make the post title and status available to the top menu.
dt.postTitle = post.title;
dt.postStatus = post.status;

// If we are on a non-supported post status, change what we show
if (
Expand Down
4 changes: 1 addition & 3 deletions assets/js/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jQuery( window ).on( 'load', () => {
let selectAllConnections = '';
let selectNoConnections = '';
let connectionsSearchInput = '';
let postStatusInput = '';
let asDraftInput = '';
let errorDetails = '';

Expand Down Expand Up @@ -91,7 +90,6 @@ jQuery( window ).on( 'load', () => {
connectionsSearchInput = document.getElementById(
'dt-connection-search'
);
postStatusInput = document.getElementById( 'dt-post-status' );
asDraftInput = document.getElementById( 'dt-as-draft' );
errorDetails = document.querySelector( '.dt-error ul.details' );

Expand Down Expand Up @@ -516,7 +514,7 @@ jQuery( window ).on( 'load', () => {
data.postStatus =
null !== asDraftInput && asDraftInput.checked
? 'draft'
: postStatusInput.value;
: dt.postStatus;

const xhr = dt.usexhr ? { withCredentials: true } : false;

Expand Down
4 changes: 2 additions & 2 deletions distributor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://github.com/10up/distributor
* Update URI: https://distributorplugin.com
* Description: Makes it easy to distribute and reuse content across your websites, whether inside of a multisite or across the web.
* Version: 2.0.0-beta2
* Version: 2.0.0-rc1
* Requires at least: 5.7
* Requires PHP: 7.4
* Author: 10up Inc.
Expand All @@ -28,7 +28,7 @@
exit; // Exit if accessed directly.
}

define( 'DT_VERSION', '2.0.0-beta2' );
define( 'DT_VERSION', '2.0.0-rc1' );
define( 'DT_PLUGIN_FILE', preg_replace( '#^.*plugins/(.*)$#i', '$1', __FILE__ ) );
define( 'DT_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'DT_PLUGIN_FULL_FILE', __FILE__ );
Expand Down
1 change: 1 addition & 0 deletions includes/push-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ function enqueue_scripts( $hook ) {
'loadConnectionsNonce' => wp_create_nonce( 'dt-load-connections' ),
'postId' => (int) get_the_ID(),
'postTitle' => get_the_title(),
'postStatus' => get_post_status(),
'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),

/**
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "distributor",
"version": "2.0.0-beta.2",
"version": "2.0.0-rc.1",
"description": "Distributor is a WordPress plugin that makes it easy to distribute and reuse content across your websites — whether in a single multisite or across the web.",
"author": {
"name": "10up",
Expand Down
1 change: 0 additions & 1 deletion templates/show-connections-amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class="add-connection{{#syndicated}} syndicated{{/syndicated}}"
<div class="selected-connections-list"></div>

<div class="action-wrapper">
<input type="hidden" id="dt-post-status" value="<?php echo esc_attr( $post->post_status ); ?>">
<?php
$as_draft = ( 'draft' !== $post->post_status ) ? true : false;
/**
Expand Down
1 change: 0 additions & 1 deletion templates/show-connections.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class="add-connection<# if ( ! _.isEmpty( connections[ key ]['syndicated'] ) ) {
<div class="selected-connections-list"></div>

<div class="action-wrapper">
<input type="hidden" id="dt-post-status" value="<?php echo esc_attr( $post->post_status ); ?>">
<?php
$as_draft = ( 'draft' !== $post->post_status ) ? true : false;
/**
Expand Down
2 changes: 1 addition & 1 deletion tests/php/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
WP_Mock::bootstrap();

define( 'DT_PLUGIN_PATH', dirname( __DIR__, 2 ) );
define( 'DT_VERSION', '2.0.0-beta2' );
define( 'DT_VERSION', '2.0.0-rc1' );

require_once __DIR__ . '/includes/common.php';
require_once __DIR__ . '/includes/TestCase.php';
Expand Down

0 comments on commit 1de09c1

Please sign in to comment.