Skip to content

Commit

Permalink
deploy: 8744a57
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Sep 26, 2024
1 parent d277270 commit 475c326
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 17 deletions.
56 changes: 56 additions & 0 deletions classes_Authentications_WordPressBasicAuth.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,62 @@ <h1 class="page-title">Source: classes/Authentications/WordPressBasicAuth.php</h
*/
public static $label = 'Username/Password';

/**
* Site URL
*
* @var string
*/
public $site_url;

/**
* Username
*
* @var string
*/
public $username;

/**
* Password
*
* @var string
*/
public $password;

/**
* API Key
*
* @var string
*/
public $client_id;

/**
* API Secret
*
* @var string
*/
public $client_secret;

/**
* Redirect URI
*
* @var string
*/
public $redirect_uri;

/**
* Access Token
*
* @var string
*/
public $base64_encoded;

/**
* Created Post ID
*
* @var string
*/
public $dt_created_post_id;

/**
* Setup class
*
Expand Down
2 changes: 1 addition & 1 deletion dt_allow_post_unlink.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="syndicated-post-ui.php.html">syndicated-post-ui.php</a>, <a href="syndicated-post-ui.php.html#line301">line 301</a>
<a href="syndicated-post-ui.php.html">syndicated-post-ui.php</a>, <a href="syndicated-post-ui.php.html#line306">line 306</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion dt_auth_prepare_credentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="classes_Authentications_WordPressBasicAuth.php.html">classes/Authentications/WordPressBasicAuth.php</a>, <a href="classes_Authentications_WordPressBasicAuth.php.html#line154">line 154</a>
<a href="classes_Authentications_WordPressBasicAuth.php.html">classes/Authentications/WordPressBasicAuth.php</a>, <a href="classes_Authentications_WordPressBasicAuth.php.html#line210">line 210</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion dt_link_post.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="syndicated-post-ui.php.html">syndicated-post-ui.php</a>, <a href="syndicated-post-ui.php.html#line398">line 398</a>
<a href="syndicated-post-ui.php.html">syndicated-post-ui.php</a>, <a href="syndicated-post-ui.php.html#line403">line 403</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion dt_unlink_post.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="syndicated-post-ui.php.html">syndicated-post-ui.php</a>, <a href="syndicated-post-ui.php.html#line321">line 321</a>
<a href="syndicated-post-ui.php.html">syndicated-post-ui.php</a>, <a href="syndicated-post-ui.php.html#line326">line 326</a>
</li></ul></dd>


Expand Down
31 changes: 18 additions & 13 deletions syndicated-post-ui.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,23 @@ <h1 class="page-title">Source: syndicated-post-ui.php</h1>
$original_blog_id = get_post_meta( $post_id, 'dt_original_blog_id', true );
$original_source_id = get_post_meta( $post_id, 'dt_original_source_id', true );
$original_deleted = (bool) get_post_meta( $post_id, 'dt_original_post_deleted', true );
$connection_map = get_post_meta( $post_id, 'dt_connection_map', true );

if ( ( empty( $original_blog_id ) &amp;&amp; empty( $original_source_id ) ) || $original_deleted ) {
echo '';
if ( ( ( empty( $original_blog_id ) &amp;&amp; empty( $original_source_id ) ) || $original_deleted ) &amp;&amp; ! $connection_map ) {
echo '';
} else {
$unlinked = (bool) get_post_meta( $post_id, 'dt_unlinked', true );
$post_type_object = get_post_type_object( get_post_type( $post_id ) );
$post_url = get_post_meta( $post_id, 'dt_original_post_url', true );

if ( $unlinked ) {
echo '&lt;a href="' . esc_url( $post_url ) . '">&lt;img class="dt-unlinked" src="' . esc_url( plugins_url( 'assets/img/icon.svg', __DIR__ ) ) . '" alt="' . esc_attr__( 'Unlinked', 'distributor' ) . '" title="' . esc_attr__( 'Unlinked', 'distributor' ) . '">&lt;/a>';
if ( $connection_map ) {
// When a post is pushed from current site or pulled by other sites.
echo '&lt;span title="' . esc_attr__( 'Pushed', 'distributor' ) . '" class="dashicons dashicons-admin-page">&lt;/span>';
} else {
echo '&lt;a href="' . esc_url( $post_url ) . '">&lt;img src="' . esc_url( plugins_url( 'assets/img/icon.svg', __DIR__ ) ) . '" alt="' . esc_attr__( 'Linked', 'distributor' ) . '" title="' . esc_attr__( 'Linked', 'distributor' ) . '">&lt;/a>';
$unlinked = (bool) get_post_meta( $post_id, 'dt_unlinked', true );
$post_url = get_post_meta( $post_id, 'dt_original_post_url', true );

if ( $unlinked ) {
echo '&lt;a target="_blank" href="' . esc_url( $post_url ) . '">&lt;span title="' . esc_attr__( 'Unlinked', 'distributor' ) . '" class="dashicons dashicons-editor-unlink">&lt;/span>&lt;/span>&lt;/a>';
} else {
echo '&lt;a target="_blank" href="' . esc_url( $post_url ) . '">&lt;span title="' . esc_attr__( 'Linked', 'distributor' ) . '" class="dashicons dashicons-admin-links">&lt;/span>&lt;/a>';
}
}
}
}
Expand Down Expand Up @@ -406,12 +411,12 @@ <h1 class="page-title">Source: syndicated-post-ui.php</h1>

if ( ! empty( $update ) ) {
wp_update_post(
[
array(
'ID' => $post_id,
'post_title' => $update['post_title'],
'post_content' => $update['post_content'],
'post_excerpt' => $update['post_excerpt'],
]
)
);

if ( null !== $update['meta'] ) {
Expand Down Expand Up @@ -673,7 +678,7 @@ <h1 class="page-title">Source: syndicated-post-ui.php</h1>
'gutenberg-syndicated-post.min'
);

$localize_data = [
$localize_data = array(
'originalBlogId' => (int) $original_blog_id,
'originalPostId' => (int) $original_post_id,
'originalSourceId' => (int) $original_source_id,
Expand All @@ -691,7 +696,7 @@ <h1 class="page-title">Source: syndicated-post-ui.php</h1>
'supportedPostStati' => \Distributor\Utils\distributable_post_statuses(),
// Filter documented in includes/push-ui.php.
'noPermissions' => ! is_user_logged_in() || ! current_user_can( apply_filters( 'dt_syndicatable_capabilities', 'edit_posts' ) ),
];
);

$gutenberg_syndicated_post_script
->load_in_footer()
Expand Down

0 comments on commit 475c326

Please sign in to comment.