diff --git a/bootstrap.php.html b/bootstrap.php.html index b65f236b3..48ead5263 100644 --- a/bootstrap.php.html +++ b/bootstrap.php.html @@ -36,7 +36,7 @@

Source: bootstrap.php

* Bootstrap the main plugin. * * This file is included by the main plugin file and is responsible for - * bootstraping the plugin. This allows the main file to be used for version + * bootstrapping the plugin. This allows the main file to be used for version * support and therefore support earlier versions of PHP and WP than the * minimum requirements. * diff --git a/classes_Authentication.php.html b/classes_Authentication.php.html index 0ecbdae0e..6841a997d 100644 --- a/classes_Authentication.php.html +++ b/classes_Authentication.php.html @@ -145,7 +145,7 @@

Source: classes/Authentication.php

* Store pre-sanizited auth credentials in DB * * @param int $external_connection_id External connection ID. - * @param array $args Array of creds to store. Should be pre-sanitized. + * @param array $args Array of credentials to store. Should be pre-sanitized. * @since 0.8 */ public static function store_credentials( $external_connection_id, $args ) { diff --git a/classes_Authentications_WordPressDotcomOauth2Authentication.php.html b/classes_Authentications_WordPressDotcomOauth2Authentication.php.html index db3e70c07..aa1e56988 100644 --- a/classes_Authentications_WordPressDotcomOauth2Authentication.php.html +++ b/classes_Authentications_WordPressDotcomOauth2Authentication.php.html @@ -61,7 +61,7 @@

Source: classes/Authentications/WordPressDotcomOauth2Auth public static $requires_credentials = true; /** - * Auth hanlder pretty label + * Auth handler pretty label * * @var string */ diff --git a/classes_DistributorPost.php.html b/classes_DistributorPost.php.html index 73e79b1c5..2f282ff05 100644 --- a/classes_DistributorPost.php.html +++ b/classes_DistributorPost.php.html @@ -699,7 +699,9 @@

Source: classes/DistributorPost.php

$found = false; // Note: changes to the cache key or group should be reflected in `includes/settings.php` - $media = wp_cache_get( 'dt_media::{$post_id}', 'dt::post', false, $found ); + $cache_key = "dt_media::{$this->post->ID}"; + $cache_group = 'dt::post'; + $media = wp_cache_get( $cache_key, $cache_group, false, $found ); if ( ! $found ) { // Parse blocks to determine attached media. @@ -712,7 +714,7 @@

Source: classes/DistributorPost.php

} // Only the IDs are cached to keep the cache size down. - wp_cache_set( 'dt_media::{$post_id}', $media, 'dt::post' ); + wp_cache_set( $cache_key, $media, $cache_group ); } /* @@ -952,7 +954,7 @@

Source: classes/DistributorPost.php

$display_data['distributor_original_site_url'] = $this->source_site['home_url']; /** - * Filters the post data for when they are being formated for a pull + * Filters the post data for when they are being formatted for a pull * * @since 2.0.3 * @hook dt_post_to_pull diff --git a/classes_ExternalConnections_WordPressExternalConnection.php.html b/classes_ExternalConnections_WordPressExternalConnection.php.html index 0e2740cbb..94ffa63f9 100644 --- a/classes_ExternalConnections_WordPressExternalConnection.php.html +++ b/classes_ExternalConnections_WordPressExternalConnection.php.html @@ -819,7 +819,7 @@

Source: classes/ExternalConnections/WordPressExternalConn /** - * Whether if the post type is not distibutor internal post type. + * Whether if the post type is not distributor internal post type. * * @param string $post_type Post type * diff --git a/classes_InternalConnections_NetworkSiteConnection.php.html b/classes_InternalConnections_NetworkSiteConnection.php.html index 1c4af9b96..9784b6567 100644 --- a/classes_InternalConnections_NetworkSiteConnection.php.html +++ b/classes_InternalConnections_NetworkSiteConnection.php.html @@ -807,7 +807,7 @@

Source: classes/InternalConnections/NetworkSiteConnection /** * Maybe set post modified date - * On wp_insert_post, modified date is overriden by post date + * On wp_insert_post, modified date is overridden by post date * * https://core.trac.wordpress.org/browser/tags/4.7.2/src/wp-includes/post.php#L3151 * diff --git a/debug-info.php.html b/debug-info.php.html index 3feb78c7e..5aae3bdef 100644 --- a/debug-info.php.html +++ b/debug-info.php.html @@ -157,11 +157,11 @@

Source: debug-info.php

], [ 'label' => __( 'Internal Connections', 'distributor' ), - 'value' => get_formatted_internal_connnections(), + 'value' => get_formatted_internal_connections(), ], [ 'label' => __( 'External Connections', 'distributor' ), - 'value' => get_formatted_external_connnections(), + 'value' => get_formatted_external_connections(), ], ] ); @@ -177,9 +177,19 @@

Source: debug-info.php

/** * Get and format internal connections. * - * @return array + * @deprecated x.x.x Use get_formatted_internal_connections */ function get_formatted_internal_connnections() { + _deprecated_function( __FUNCTION__, 'x.x.x.', __NAMESPACE__ . '\\get_formatted_internal_connections' ); + return get_formatted_internal_connections(); +} + +/** + * Get and format internal connections. + * + * @return array + */ +function get_formatted_internal_connections() { if ( empty( Connections::factory()->get_registered()['networkblog'] ) ) { return __( 'N/A', 'distributor' ); } @@ -209,9 +219,19 @@

Source: debug-info.php

/** * Get and format external connections. * - * @return array + * @deprecated x.x.x Use get_formatted_external_connections */ function get_formatted_external_connnections() { + _deprecated_function( __FUNCTION__, 'x.x.x', __NAMESPACE__ . '\\get_formatted_external_connections' ); + return get_formatted_external_connections(); +} + +/** + * Get and format external connections. + * + * @return array + */ +function get_formatted_external_connections() { $output = []; diff --git a/dt_parse_media_blocks.html b/dt_parse_media_blocks.html index 5a8c7ca89..a4829a92c 100644 --- a/dt_parse_media_blocks.html +++ b/dt_parse_media_blocks.html @@ -151,7 +151,7 @@
Parameters:
Source:
diff --git a/dt_post_to_pull.html b/dt_post_to_pull.html index 4c428e320..db00b0f8d 100644 --- a/dt_post_to_pull.html +++ b/dt_post_to_pull.html @@ -50,7 +50,7 @@

apply_filters( 'dt_post_to_pull', -

Filters the post data for when they are being formated for a pull

+

Filters the post data for when they are being formatted for a pull

@@ -144,7 +144,7 @@
Parameters:
Source:
diff --git a/external-connection-cpt.php.html b/external-connection-cpt.php.html index 5f4b01d4b..558b7189e 100644 --- a/external-connection-cpt.php.html +++ b/external-connection-cpt.php.html @@ -453,9 +453,9 @@

Source: external-connection-cpt.php

$connection_class = \Distributor\Connections::factory()->get_registered()[ sanitize_key( $_POST['dt_external_connection_type'] ) ]; $auth_handler_class_again = $connection_class::$auth_handler_class; - $auth_creds = $auth_handler_class_again::prepare_credentials( array_merge( (array) $current_auth, array_map( 'sanitize_text_field', (array) wp_unslash( $_POST['dt_external_connection_auth'] ) ) ) ); + $auth_credentials = $auth_handler_class_again::prepare_credentials( array_merge( (array) $current_auth, array_map( 'sanitize_text_field', (array) wp_unslash( $_POST['dt_external_connection_auth'] ) ) ) ); - $auth_handler_class_again::store_credentials( $post_id, $auth_creds ); + $auth_handler_class_again::store_credentials( $post_id, $auth_credentials ); } } @@ -630,7 +630,7 @@

Source: external-connection-cpt.php

global $connection_list_table; $_GET['post_type'] = 'dt_ext_connection'; - $_REQUEST['all_posts'] = true; // Default to replacite "All" tab + $_REQUEST['all_posts'] = true; // Default to replicate "All" tab $connection_list_table->prepare_items(); ?> diff --git a/push-ui.php.html b/push-ui.php.html index 53110da80..eef88e1f8 100644 --- a/push-ui.php.html +++ b/push-ui.php.html @@ -279,7 +279,7 @@

Source: push-ui.php

*/ function ajax_push() { if ( ! check_ajax_referer( 'dt-push', 'nonce', false ) ) { - wp_send_json_error( new \WP_Error( 'invalid-referal', __( 'Invalid Ajax referer.', 'distributor' ) ) ); + wp_send_json_error( new \WP_Error( 'invalid-referral', __( 'Invalid Ajax referer.', 'distributor' ) ) ); exit; } diff --git a/subscriptions.php.html b/subscriptions.php.html index e72d64ff5..e835a1eff 100644 --- a/subscriptions.php.html +++ b/subscriptions.php.html @@ -128,7 +128,7 @@

Source: subscriptions.php

* For a post that is distributed, for each distributed post, we create a subscription (CPT) to keep track * of the copy. Attached to each subscription is a unique signature. When a post is updated, we check for subscriptions. * If subscriptions exist, we grab the signature for each subscription and send the update to the remote copy along - * with the signature. The signature is a passcode of sorts. The subscription signature must match the copied post's + * with the signature. The signature is a pass code of sorts. The subscription signature must match the copied post's * signature otherwise the update is not authorized. * * You might be wondering why we don't just use HTTP Basic Auth or OAuth since we've already set that up. diff --git a/template-tags.php.html b/template-tags.php.html index 5c8b88482..997cfd218 100644 --- a/template-tags.php.html +++ b/template-tags.php.html @@ -248,8 +248,8 @@

Source: template-tags.php

/** * Display information about where a post was distributed from. * - * @param int|null|mixed $post_id Post ID. - * @param string |null|mixed $preface The string that will preceed the link. + * @param int|null|mixed $post_id Post ID. + * @param string|null|mixed $preface The string that will precede the link. */ function distributor_the_connection_source( $post_id = null, $preface = null ) { if ( ! $post_id ) { diff --git a/tutorial-connect-to-an-existing-post.html b/tutorial-connect-to-an-existing-post.html index e3eef2eb6..426c7c51c 100644 --- a/tutorial-connect-to-an-existing-post.html +++ b/tutorial-connect-to-an-existing-post.html @@ -89,7 +89,7 @@

External Connections

], ]; -

In the above example, the internal array will always be empty, unless an item is also linked to an interal site. For the external array, each item in the array will have a key that corresponds to the connection ID (2 in the example above) and then the post_id should be the destination post ID.

+

In the above example, the internal array will always be empty, unless an item is also linked to an internal site. For the external array, each item in the array will have a key that corresponds to the connection ID (2 in the example above) and then the post_id should be the destination post ID.

As a further example, if I have a post with an ID of 100 that lives on a site with an ID of 1 and I want that post to be linked to an existing post with an ID of 50 on the site with a connection ID of 2, the dt_connection_map data that is stored with the original item (ID of 100, site ID 1) would look like the following:

$data = [
   [
diff --git a/utils.php.html b/utils.php.html
index 92d238391..12da66547 100644
--- a/utils.php.html
+++ b/utils.php.html
@@ -606,7 +606,7 @@ 

Source: utils.php

function set_taxonomy_terms( $post_id, $taxonomy_terms ) { // Now let's add the taxonomy/terms to syndicated post foreach ( $taxonomy_terms as $taxonomy => $terms ) { - // Continue if taxonomy doesnt exist + // Continue if taxonomy doesn't exist if ( ! taxonomy_exists( $taxonomy ) ) { continue; } @@ -675,9 +675,9 @@

Source: utils.php

* * @return {bool} Whether term hierarchy should be updated. */ - $update_term_hierachy = apply_filters( 'dt_update_term_hierarchy', true, $taxonomy ); + $update_term_hierarchy = apply_filters( 'dt_update_term_hierarchy', true, $taxonomy ); - if ( ! empty( $update_term_hierachy ) ) { + if ( ! empty( $update_term_hierarchy ) ) { foreach ( $terms as $term_array ) { if ( ! is_array( $term_array ) ) { $term_array = (array) $term_array; @@ -973,8 +973,8 @@

Source: utils.php

$source_file = $args['source_file']; if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base' ) ) { - $creds = request_filesystem_credentials( site_url() ); - wp_filesystem( $creds ); + $credentials = request_filesystem_credentials( site_url() ); + wp_filesystem( $credentials ); } // Copy the source file so we don't mess with the original file.