-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch back to GatherContent plugin instead of Content Workflow plugin #447
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe GatherContent Plugin version 3.2.20 has been updated with several enhancements, including bug fixes, PHP8 compatibility, and improved synchronization between GatherContent and WordPress. Key changes involve renaming deprecated methods, updating CSS styles, refining JavaScript functionality, and revising plugin metadata. These improvements streamline content mapping, synchronization, and API connectivity, effectively replacing references from Content Workflow (by Bynder) to GatherContent. Changes
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@@ -1,8 +1,8 @@ | |||
/** | |||
* Content Workflow (by Bynder) - v1.0.0 - 2024-06-25 | |||
* | |||
* GatherContent Plugin - v3.1.13 - 2022-01-31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update version and date.
The version and date in the file header should be updated to reflect the latest changes.
- * GatherContent Plugin - v3.1.13 - 2022-01-31
+ * GatherContent Plugin - v3.2.20 - 2024-07-01
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* GatherContent Plugin - v3.1.13 - 2022-01-31 | |
* GatherContent Plugin - v3.2.20 - 2024-07-01 |
@@ -45,7 +45,7 @@ window.GatherContent = window.GatherContent || {}; | |||
var main = gc.main = {}; | |||
|
|||
main.init = function () { | |||
$(document.body).on('click', '.gc-nav-tab-wrapper:not( .gc-nav-tab-wrapper-bb ) .nav-tab', main.changeTabs).on('click', '.gc-reveal-items', main.maybeReveal).on('click', '.gc-reveal-items-component', main.maybeRevealComponent); | |||
$(document.body).on('click', '.gc-nav-tab-wrapper:not( .gc-nav-tab-wrapper-bb ) .nav-tab', main.changeTabs).on('click', '.gc-reveal-items', main.maybeReveal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declare variables at the root of the function.
The variable $menu
should be declared at the root of the function to avoid confusion.
- var $menu = gc.$id('toplevel_page_gathercontent-import');
+ var $menu;
+
+ $menu = gc.$id('toplevel_page_gathercontent-import');
Committable suggestion was skipped due to low confidence.
* @param string $title Original placeholder text | ||
* @return string Modifed placeholder text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in docblock.
Correct the typo in the docblock: "Modifed" should be "Modified".
- * @return string Modifed placeholder text
+ * @return string Modified placeholder text
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param string $title Original placeholder text | |
* @return string Modifed placeholder text | |
* @param string $title Original placeholder text | |
* @return string Modified placeholder text |
namespace GatherContent\Importer\Admin\Mapping\Field_Types; | ||
|
||
use GatherContent\Importer\Base as Plugin_Base; | ||
|
||
class Exception extends \Exception { | ||
} | ||
class Exception extends \Exception {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming the Exception
class to avoid conflicts.
Using a generic name like Exception
might cause conflicts with other exception classes. Consider renaming it to something more specific.
- class Exception extends \Exception {}
+ class FieldTypeException extends \Exception {}
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
class Exception extends \Exception {} | |
class FieldTypeException extends \Exception {} |
@@ -20,6 +20,7 @@ | |||
*/ | |||
class Pull extends Base { | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add visibility modifier to the property declaration.
The property $direction
should have a visibility modifier (e.g., protected
or private
) to adhere to best practices.
+protected $direction = 'pull';
Committable suggestion was skipped due to low confidence.
* @since 3.0.2 | ||
* | ||
* @return void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the return type.
The init_plugins_loaded_hooks
method should have a void
return type hint for better clarity.
-public static function init_plugins_loaded_hooks() {
+public static function init_plugins_loaded_hooks(): void {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @return void | |
* @return void | |
public static function init_plugins_loaded_hooks(): void { |
* @since 3.1.8 | ||
* | ||
* @return boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter type and return type.
The should_update_title_with_item_name
method should have type hints for its parameter and return type for better clarity and type safety.
-public function should_update_title_with_item_name( $post_data ) {
+public function should_update_title_with_item_name( array $post_data ): bool {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @return boolean | |
* @return boolean | |
public function should_update_title_with_item_name( array $post_data ): bool { |
} | ||
// @codingStandardsIgnoreStart | ||
} catch ( \Exception $e ) { | ||
} catch (\Exception $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add logging for exception handling.
Consider adding logging for the caught exceptions to aid in debugging.
-} catch (\Exception $e) {
- // @todo logging?
+} catch (\Exception $e) {
+ error_log( $e->getMessage() );
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
} catch (\Exception $e) { | |
} catch (\Exception $e) { | |
error_log( $e->getMessage() ); |
* @param array $post_data The WP Post data array. | ||
* | ||
* @return array Item config array on success. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter type and return type.
The map_gc_data_to_wp_data
method should have type hints for its parameter and return type for better clarity and type safety.
-/**
- * @param array $post_data The WP Post data array.
- * @return array Item config array on success.
- */
-protected function map_gc_data_to_wp_data( $post_data = array() ) {
+/**
+ * @param array $post_data The WP Post data array.
+ * @return array Item config array on success.
+ */
+protected function map_gc_data_to_wp_data( array $post_data = array() ): array {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param array $post_data The WP Post data array. | |
* | |
* @return array Item config array on success. | |
/** | |
* @param array $post_data The WP Post data array. | |
* @return array Item config array on success. | |
*/ | |
protected function map_gc_data_to_wp_data( array $post_data = array() ): array { |
* @param string $destination The media destination. | ||
* @param array $post_data The WP Post data array. | ||
* | ||
* @return array $post_data The modified WP Post data array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter types and return type.
The set_media_field_value
method should have type hints for its parameters and return type for better clarity and type safety.
-/**
- * @param string $destination The media destination.
- * @param array $post_data The WP Post data array.
- * @return array $post_data The modified WP Post data array.
- */
-protected function set_media_field_value( $destination, $post_data ) {
+/**
+ * @param string $destination The media destination.
+ * @param array $post_data The WP Post data array.
+ * @return array $post_data The modified WP Post data array.
+ */
+protected function set_media_field_value( string $destination, array $post_data ): array {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param string $destination The media destination. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
* @param string $destination The media destination. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
*/ | |
protected function set_media_field_value( string $destination, array $post_data ): array { |
* @since 3.1.8 | ||
* | ||
* @return boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the return type.
The has_post_title_mapping
method should have a return type hint for better clarity.
-public function has_post_title_mapping() {
+public function has_post_title_mapping(): bool {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @return boolean | |
* @return boolean | |
public function has_post_title_mapping(): bool { |
* @param int $mapping_post Mapping post ID or object. | ||
* @param int $item_id GC item id. | ||
* | ||
* @return mixed Result of pull. WP_Error on failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter types and return type.
The maybe_pull_item
method should have type hints for its parameters and return type for better clarity and type safety.
-public function maybe_pull_item( $mapping_post, $item_id ) {
+public function maybe_pull_item( int $mapping_post, int $item_id ): mixed {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param int $mapping_post Mapping post ID or object. | |
* @param int $item_id GC item id. | |
* | |
* @return mixed Result of pull. WP_Error on failure. | |
* @param int $mapping_post Mapping post ID or object. | |
* @param int $item_id GC item id. | |
* | |
* @return mixed Result of pull. WP_Error on failure. | |
public function maybe_pull_item( int $mapping_post, int $item_id ): mixed { |
* @since 3.0.0 | ||
* | ||
* @param string $field The post field to sanitize. | ||
* @param mixed $value The post field value to sanitize. | ||
* @param array $post_data The WP Post data array. | ||
* | ||
* @return mixed The sanitized post field value. | ||
* @throws Exception Will fail if the wrong kind of GC field is | ||
* attempting to be sanitized. | ||
* | ||
* @since 3.0.0 | ||
* | ||
* @return mixed The sanitized post field value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter types and return type.
The sanitize_post_field
method should have type hints for its parameters and return type for better clarity and type safety.
-/**
- * @param string $field The post field to sanitize.
- * @param mixed $value The post field value to sanitize.
- * @param array $post_data The WP Post data array.
- * @return mixed The sanitized post field value.
- */
-protected function sanitize_post_field( $field, $value, $post_data ) {
+/**
+ * @param string $field The post field to sanitize.
+ * @param mixed $value The post field value to sanitize.
+ * @param array $post_data The WP Post data array.
+ * @return mixed The sanitized post field value.
+ */
+protected function sanitize_post_field( string $field, mixed $value, array $post_data ): mixed {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @since 3.0.0 | |
* | |
* @param string $field The post field to sanitize. | |
* @param mixed $value The post field value to sanitize. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return mixed The sanitized post field value. | |
* @throws Exception Will fail if the wrong kind of GC field is | |
* attempting to be sanitized. | |
* | |
* @since 3.0.0 | |
* | |
* @return mixed The sanitized post field value. | |
/** | |
* @param string $field The post field to sanitize. | |
* @param mixed $value The post field value to sanitize. | |
* @param array $post_data The WP Post data array. | |
* @return mixed The sanitized post field value. | |
*/ | |
protected function sanitize_post_field( string $field, mixed $value, array $post_data ): mixed { |
if ( ! empty( $tax_terms ) ) { | ||
foreach ( $tax_terms as $taxonomy => $terms ) { | ||
$taxonomy_obj = get_taxonomy( $taxonomy ); | ||
if ( ! $taxonomy_obj ) { | ||
/* translators: %s: taxonomy name */ | ||
_doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'Invalid taxonomy: %s.' ), esc_html( $taxonomy ) ), '4.4.0' ); | ||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Invalid taxonomy: %s.' ), $taxonomy ), '4.4.0' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internationalization (i18n) best practices.
The __()
function should have the text domain specified to ensure proper localization.
- _doing_it_wrong( __FUNCTION__, sprintf( __( 'Invalid taxonomy: %s.' ), $taxonomy ), '4.4.0' );
+ _doing_it_wrong( __FUNCTION__, sprintf( __( 'Invalid taxonomy: %s.', 'gathercontent-import' ), $taxonomy ), '4.4.0' );
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Invalid taxonomy: %s.' ), $taxonomy ), '4.4.0' ); | |
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Invalid taxonomy: %s.', 'gathercontent-import' ), $taxonomy ), '4.4.0' ); |
* @param array $post_data The WP Post data array. | ||
* | ||
* @return array Modified post data array on success. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter type and return type.
The loop_item_elements_and_map
method should have type hints for its parameter and return type for better clarity and type safety.
-/**
- * @param array $post_data The WP Post data array.
- * @return array Modified post data array on success.
- */
-protected function loop_item_elements_and_map( $post_data ) {
+/**
+ * @param array $post_data The WP Post data array.
+ * @return array Modified post data array on success.
+ */
+protected function loop_item_elements_and_map( array $post_data ): array {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param array $post_data The WP Post data array. | |
* | |
* @return array Modified post data array on success. | |
/** | |
* @param array $post_data The WP Post data array. | |
* @return array Modified post data array on success. | |
*/ | |
protected function loop_item_elements_and_map( array $post_data ): array { |
$post_data = apply_filters( 'gc_update_wp_post_data', $post_data, $this ); | ||
} else { | ||
$post_data = apply_filters( 'cwby_new_wp_post_data', $post_data, $this ); | ||
$post_data = apply_filters( 'gc_new_wp_post_data', $post_data, $this ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve readability with early return.
Use early return to improve readability.
- if ( ! empty( $post_data['ID'] ) ) {
- $post_data = apply_filters( 'gc_update_wp_post_data', $post_data, $this );
- } else {
- $post_data = apply_filters( 'gc_new_wp_post_data', $post_data, $this );
- }
+ $post_data = ! empty( $post_data['ID'] )
+ ? apply_filters( 'gc_update_wp_post_data', $post_data, $this )
+ : apply_filters( 'gc_new_wp_post_data', $post_data, $this );
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
$post_data = apply_filters( 'gc_update_wp_post_data', $post_data, $this ); | |
} else { | |
$post_data = apply_filters( 'cwby_new_wp_post_data', $post_data, $this ); | |
$post_data = apply_filters( 'gc_new_wp_post_data', $post_data, $this ); | |
$post_data = ! empty( $post_data['ID'] ) | |
? apply_filters( 'gc_update_wp_post_data', $post_data, $this ) | |
: apply_filters( 'gc_new_wp_post_data', $post_data, $this ); |
* @param string $taxonomy The taxonomy name. | ||
* @param array $post_data The WP Post data array. | ||
* | ||
* @return array $post_data The modified WP Post data array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter types and return type.
The set_taxonomy_field_value
method should have type hints for its parameters and return type for better clarity and type safety.
-/**
- * @param string $taxonomy The taxonomy name.
- * @param array $post_data The WP Post data array.
- * @return array $post_data The modified WP Post data array.
- */
-protected function set_taxonomy_field_value( $taxonomy, $post_data ) {
+/**
+ * @param string $taxonomy The taxonomy name.
+ * @param array $post_data The WP Post data array.
+ * @return array $post_data The modified WP Post data array.
+ */
+protected function set_taxonomy_field_value( string $taxonomy, array $post_data ): array {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param string $taxonomy The taxonomy name. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
/** | |
* @param string $taxonomy The taxonomy name. | |
* @param array $post_data The WP Post data array. | |
* @return array $post_data The modified WP Post data array. | |
*/ | |
protected function set_taxonomy_field_value( string $taxonomy, array $post_data ): array { |
* @since 3.0.0 | ||
* | ||
* @return mixed Result of pull. | ||
* @throws Exception On failure. | ||
* @param int $id GC Item ID. | ||
* | ||
* @since 3.0.0 | ||
* @throws Exception On failure. | ||
* | ||
* @return mixed Result of pull. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter type and return type.
The do_item
method should have type hints for its parameter and return type for better clarity and type safety.
-/**
- * @param int $id GC Item ID.
- * @throws Exception On failure.
- * @return mixed Result of pull.
- */
-protected function do_item( $id ) {
+/**
+ * @param int $id GC Item ID.
+ * @throws Exception On failure.
+ * @return mixed Result of pull.
+ */
+protected function do_item( int $id ): mixed {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @since 3.0.0 | |
* | |
* @return mixed Result of pull. | |
* @throws Exception On failure. | |
* @param int $id GC Item ID. | |
* | |
* @since 3.0.0 | |
* @throws Exception On failure. | |
* | |
* @return mixed Result of pull. | |
* @since 3.0.0 | |
* | |
* @param int $id GC Item ID. | |
* | |
* @throws Exception On failure. | |
* | |
* @return mixed Result of pull. | |
protected function do_item( int $id ): mixed { |
* @param array $destination Destination array, includes type and value. | ||
* @param array $post_data The WP Post data array. | ||
* | ||
* @return array $post_data The modified WP Post data array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter types and return type.
The set_post_values
method should have type hints for its parameters and return type for better clarity and type safety.
-/**
- * @param array $destination Destination array, includes type and value.
- * @param array $post_data The WP Post data array.
- * @return array $post_data The modified WP Post data array.
- */
-protected function set_post_values( $destination, $post_data ) {
+/**
+ * @param array $destination Destination array, includes type and value.
+ * @param array $post_data The WP Post data array.
+ * @return array $post_data The modified WP Post data array.
+ */
+protected function set_post_values( array $destination, array $post_data ): array {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param array $destination Destination array, includes type and value. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
* @param array $destination Destination array, includes type and value. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
*/ | |
protected function set_post_values( array $destination, array $post_data ): array { |
* @param string $field The field to set. | ||
* @param mixed $value The value for the field. | ||
* @param array $array The array to check against. | ||
* | ||
* @return array The modified array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter types and return type.
The maybe_append
method should have type hints for its parameters and return type for better clarity and type safety.
-/**
- * @param string $field The field to set.
- * @param mixed $value The value for the field.
- * @param array $array The array to check against.
- * @return array The modified array.
- */
-protected function maybe_append( $field, $value, $array ) {
+/**
+ * @param string $field The field to set.
+ * @param mixed $value The value for the field.
+ * @param array $array The array to check against.
+ * @return array The modified array.
+ */
+protected function maybe_append( string $field, mixed $value, array $array ): array {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param string $field The field to set. | |
* @param mixed $value The value for the field. | |
* @param array $array The array to check against. | |
* | |
* @return array The modified array. | |
/** | |
* @param string $field The field to set. | |
* @param mixed $value The value for the field. | |
* @param array $array The array to check against. | |
* @return array The modified array. | |
*/ | |
protected function maybe_append( string $field, mixed $value, array $array ): array { |
* @return void | ||
*/ | ||
public function init_hooks() { | ||
parent::init_hooks(); | ||
add_action( 'wp_async_cwby_pull_items', array( $this, 'sync_items' ) ); | ||
add_action( 'wp_async_nopriv_cwby_pull_items', array( $this, 'sync_items' ) ); | ||
add_action( 'cwby_pull_complete', array( __CLASS__, 'associate_hierarchy' ) ); | ||
add_action( 'wp_async_gc_pull_items', array( $this, 'sync_items' ) ); | ||
add_action( 'wp_async_nopriv_gc_pull_items', array( $this, 'sync_items' ) ); | ||
add_action( 'gc_pull_complete', array( __CLASS__, 'associate_hierarchy' ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the return type and improve readability.
The init_hooks
method should have a void
return type hint, and the action hooks can be grouped for better readability.
-public function init_hooks() {
+public function init_hooks(): void {
parent::init_hooks();
add_action( 'wp_async_gc_pull_items', array( $this, 'sync_items' ) );
add_action( 'wp_async_nopriv_gc_pull_items', array( $this, 'sync_items' ) );
add_action( 'gc_pull_complete', array( __CLASS__, 'associate_hierarchy' ) );
}
Committable suggestion was skipped due to low confidence.
* @param string $meta_key The meta key. | ||
* @param array $post_data The WP Post data array. | ||
* | ||
* @return array $post_data The modified WP Post data array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter types and return type.
The set_meta_field_value
method should have type hints for its parameters and return type for better clarity and type safety.
-/**
- * @param string $meta_key The meta key.
- * @param array $post_data The WP Post data array.
- * @return array $post_data The modified WP Post data array.
- */
-protected function set_meta_field_value( $meta_key, $post_data ) {
+/**
+ * @param string $meta_key The meta key.
+ * @param array $post_data The WP Post data array.
+ * @return array $post_data The modified WP Post data array.
+ */
+protected function set_meta_field_value( string $meta_key, array $post_data ): array {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param string $meta_key The meta key. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
/** | |
* @param string $meta_key The meta key. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
*/ | |
protected function set_meta_field_value( string $meta_key, array $post_data ): array { |
* @param string $post_column The post data column. | ||
* @param array $post_data The WP Post data array. | ||
* | ||
* @return array $post_data The modified WP Post data array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the parameter types and return type.
The set_post_field_value
method should have type hints for its parameters and return type for better clarity and type safety.
-/**
- * @param string $post_column The post data column.
- * @param array $post_data The WP Post data array.
- * @return array $post_data The modified WP Post data array.
- */
-protected function set_post_field_value( $post_column, $post_data ) {
+/**
+ * @param string $post_column The post data column.
+ * @param array $post_data The WP Post data array.
+ * @return array $post_data The modified WP Post data array.
+ */
+protected function set_post_field_value( string $post_column, array $post_data ): array {
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param string $post_column The post data column. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
/** | |
* @param string $post_column The post data column. | |
* @param array $post_data The WP Post data array. | |
* | |
* @return array $post_data The modified WP Post data array. | |
*/ | |
protected function set_post_field_value( string $post_column, array $post_data ): array { |
protected function __construct() { | ||
parent::__construct( $_GET, $_POST ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
Ensure proper initialization of new instances.
The constructors for the classes Utils
, API
, Admin\Admin
, Admin\Support
, Debug
, Sync\Pull
, Sync\Push
, and Admin\Ajax\Handlers
do have dependencies and potential side effects that need to be managed. Here are the details:
- API: Initializes
$http
and manages cache settings. - Admin\Admin: Sets API, performs initialization based on settings, and updates settings if migration is needed.
- Admin\Support: Verifies nonce and downloads system info if conditions are met.
- Debug: Sets admin property, log path, and manages debug mode options.
- Sync\Pull: Calls the parent constructor with
API
andAsync_Pull_Action
. - Sync\Push: Calls the parent constructor with
API
andAsync_Push_Action
. - Admin\Ajax\Handlers: Initializes
API
,Sync_Items
, andSync_Bulk
.
Ensure these dependencies and side effects are properly managed during initialization.
Analysis chain
Ensure proper initialization of new instances.
The constructor initializes several new instances. Ensure that these instances do not have side effects or dependencies that need to be managed.
Verify the constructors of Utils
, API
, Admin\Admin
, Admin\Support
, Debug
, Sync\Pull
, Sync\Push
, and Admin\Ajax\Handlers
for potential side effects or dependencies.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify constructors of new instances for potential side effects or dependencies.
# Test: Search for constructors of the classes.
rg --type php 'function __construct' wp-content/plugins/gathercontent-import/includes/classes/
Length of output: 4376
Script:
#!/bin/bash
# Extract the full constructor implementations for the relevant classes to check for side effects or dependencies.
# Define the relevant files
files=(
"wp-content/plugins/gathercontent-import/includes/classes/api.php"
"wp-content/plugins/gathercontent-import/includes/classes/admin/admin.php"
"wp-content/plugins/gathercontent-import/includes/classes/admin/support.php"
"wp-content/plugins/gathercontent-import/includes/classes/debug.php"
"wp-content/plugins/gathercontent-import/includes/classes/sync/pull.php"
"wp-content/plugins/gathercontent-import/includes/classes/sync/push.php"
"wp-content/plugins/gathercontent-import/includes/classes/admin/ajax/handlers.php"
)
# Loop through each file and extract the constructor
for file in "${files[@]}"; do
echo "File: $file"
# Extract the constructor function
sed -n '/function __construct/,/}/p' "$file"
echo
done
Length of output: 4402
* @return void | ||
*/ | ||
function gathercontent_importer_php_version_too_low_notice() { | ||
$message = esc_html__( 'Sorry, the Content Workflow plugin requires a minimum PHP version of 5.3. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: ', 'content-workflow-by-bynder' ); | ||
|
||
echo '<div id="message" class="error"> | ||
<p> ' . | ||
esc_html($message) . | ||
'<a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>' . | ||
'</p> | ||
</div>'; | ||
|
||
printf( | ||
'<div id="message" class="error"><p>%s</p></div>', | ||
__( 'Sorry, the GatherContent plugin requires a minimum PHP version of 5.3. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' ) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the PHP version requirement in the error message.
The error message mentions a minimum PHP version of 5.3, but the plugin requires PHP 7.0. Update the error message to reflect the correct version.
__( 'Sorry, the GatherContent plugin requires a minimum PHP version of 7.0. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' )
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @return void | |
*/ | |
function gathercontent_importer_php_version_too_low_notice() { | |
$message = esc_html__( 'Sorry, the Content Workflow plugin requires a minimum PHP version of 5.3. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: ', 'content-workflow-by-bynder' ); | |
echo '<div id="message" class="error"> | |
<p> ' . | |
esc_html($message) . | |
'<a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>' . | |
'</p> | |
</div>'; | |
printf( | |
'<div id="message" class="error"><p>%s</p></div>', | |
__( 'Sorry, the GatherContent plugin requires a minimum PHP version of 5.3. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' ) | |
); | |
* @return void | |
*/ | |
function gathercontent_importer_php_version_too_low_notice() { | |
printf( | |
'<div id="message" class="error"><p>%s</p></div>', | |
__( 'Sorry, the GatherContent plugin requires a minimum PHP version of 7.0. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' ) | |
); |
* Plugin Name: GatherContent Plugin | ||
* Plugin URI: http://www.gathercontent.com | ||
* Description: Imports items from GatherContent to your wordpress site | ||
* Version: 3.2.20 | ||
* Author: GatherContent | ||
* Requires PHP: 7.0 | ||
* Author URI: https://www.bynder.com/products/content-workflow/ | ||
* Text Domain: content-workflow | ||
* Author URI: http://www.gathercontent.com | ||
* Text Domain: gathercontent-import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
Metadata Update: Ensure accuracy and consistency.
The Plugin URI
and Author URI
have been verified and are correctly redirecting to "https://gathercontent.com/". However, the Text Domain
"gathercontent-import" is missing in the codebase.
- Ensure that the
Text Domain
is correctly defined and used within the plugin files to support internationalization.
Analysis chain
Metadata Update: Ensure accuracy and consistency.
The plugin metadata has been updated. Ensure that the new metadata values are accurate and consistent with the plugin's purpose.
Verify the accuracy of the metadata values, especially the Plugin URI
, Author URI
, and Text Domain
.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the accuracy of the metadata values.
# Test: Check if the Plugin URI and Author URI are accessible and correct.
curl -Is http://www.gathercontent.com | head -n 1
Length of output: 82
Script:
#!/bin/bash
# Description: Verify the accuracy of the metadata values by following redirects and checking the final destination URLs.
# Test: Follow redirects for the Plugin URI and Author URI to get the final destination URLs.
final_plugin_uri=$(curl -Ls -o /dev/null -w %{url_effective} http://www.gathercontent.com)
final_author_uri=$(curl -Ls -o /dev/null -w %{url_effective} http://www.gathercontent.com)
# Output the final destination URLs.
echo "Final Plugin URI: $final_plugin_uri"
echo "Final Author URI: $final_author_uri"
# Verify the Text Domain in the codebase.
text_domain_count=$(grep -r "Text Domain: gathercontent-import" wp-content/plugins/gathercontent-import | wc -l)
# Output the count of Text Domain occurrences.
echo "Text Domain occurrences: $text_domain_count"
Length of output: 622
### 3.2.13 ### | ||
* Fixed issue where content and status updates were not pushing to GatherContent from the plugin | ||
|
||
### 3.2.12 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.2.12 ###
* Reformat readme.txt
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
77-77: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
1. Upload `gathercontent-import` to the `/wp-content/plugins/` directory | ||
1. Activate the GatherContent plugin through the 'Plugins' menu in WordPress | ||
1. Click on the menu item "GatherContent" | ||
2. Link your accounts. You will need to enter your GatherContent account URL (e.g. http://mywebsite.gathercontent.com) and your personal GatherContent API key. You can find your API key in your [Settings area within GatherContent](https://gathercontent.com/developers/authentication/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using bare URLs.
Use descriptive text for the link.
- For more detailed installation instructions please visit our [Help Centre](http://help.gathercontent.com/importing-and-exporting-content#wordpress-integration).
+ For more detailed installation instructions, please visit our [Help Centre](http://help.gathercontent.com/importing-and-exporting-content#wordpress-integration).
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
33-33: null
Bare URL used(MD034, no-bare-urls)
|
||
Installing our WordPress plugin on your site allows you to quickly perform updates of your content from your GatherContent account to WordPress as well as push your WordPress content updates back to GatherContent. Content can be imported as new pages/posts or custom post types, and you can also import your WordPress content back to new GatherContent items. | ||
|
||
The plugin allows you to map each field in your GatherContent Templates with WordPress fields. This is accomplished by creating a Template Mapping, which allows you to map each field in GatherContent to various fields in WordPress; title, body content, custom fields, tags, categories, Yoast fields, advanced custom fields, featured images … and many more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the collocation for "WordPress".
The usual collocation for “WordPress” is “on”.
- This is accomplished by creating a Template Mapping, which allows you to map each field in GatherContent to various fields in WordPress; title, body content, custom fields, tags, categories, Yoast fields, advanced custom fields, featured images … and many more.
+ This is accomplished by creating a Template Mapping, which allows you to map each field in GatherContent to various fields on WordPress; title, body content, custom fields, tags, categories, Yoast fields, advanced custom fields, featured images … and many more.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
The plugin allows you to map each field in your GatherContent Templates with WordPress fields. This is accomplished by creating a Template Mapping, which allows you to map each field in GatherContent to various fields in WordPress; title, body content, custom fields, tags, categories, Yoast fields, advanced custom fields, featured images … and many more. | |
The plugin allows you to map each field in your GatherContent Templates with WordPress fields. This is accomplished by creating a Template Mapping, which allows you to map each field in GatherContent to various fields on WordPress; title, body content, custom fields, tags, categories, Yoast fields, advanced custom fields, featured images … and many more. |
Tools
LanguageTool
[grammar] ~9-~9: The usual collocation for “WordPress” is “on”. Did you mean “on WordPress”?
Context: ...ield in GatherContent to various fields in WordPress; title, body content, custom fields, ta...(IN_FACEBOOK)
### 3.2.19 ### | ||
* Bumping version due to GitHub actions failing to deploy | ||
|
||
### 3.2.18 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.2.18 ###
* Removed references to deprecated WPSEO_Social_Admin class
* Fixed bug where Taxonomy terms from checkboxes were not importing correctly
* Fixed bug where fields imported to the WordPress Title were incorrectly encoding special characters
* Bumped select2 library from 4.0.13 to 4.0.3
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
56-56: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
### 3.2.4 ### | ||
* Updated readme.txt stable tag version and changelog | ||
|
||
### 3.2.3 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.2.3 ###
* Update change log and readme, forgotten during previous tag
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
105-105: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
### 3.2.8 ### | ||
* Pulling will no longer happen using wp_remote_post as it was causing issues with local environments and firewalls, where leaving the server and re-calling it via the host wasn't possible. | ||
|
||
### 3.2.7 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.2.7 ###
* Fixed issue where GatherContent to WordPress mapping was not taking effect
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
93-93: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
public function wp_remote_post() { | ||
$request['cmd'] = '_notify-validate'; | ||
$response = wp_remote_post( | ||
'https://www.paypal.com/cgi-bin/webscr', | ||
array( | ||
'sslverify' => false, | ||
'timeout' => 60, | ||
'body' => $request, | ||
) | ||
); | ||
|
||
if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) { | ||
$works = 'wp_remote_post() works' . "\n"; | ||
} else { | ||
$works = 'wp_remote_post() does not work' . "\n"; | ||
} | ||
|
||
return $works; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
Ensure secure usage of wp_remote_post
.
The wp_remote_post
function is used consistently across the codebase. However, in the provided snippet, the sslverify
parameter is set to false
, which is a potential security risk. It is recommended to ensure that SSL verification is enabled (sslverify
set to true
) to maintain secure communications.
- File:
wp-content/plugins/gathercontent-import/includes/classes/admin/support.php
- Lines: 197-215
Analysis chain
Verify the wp_remote_post
usage.
Ensure that the wp_remote_post
function is correctly implemented and used consistently throughout the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the usage of `wp_remote_post` in the codebase.
# Test: Search for the `wp_remote_post` usage. Expect: Consistent usage of the `wp_remote_post`.
rg --type php $'wp_remote_post'
Length of output: 4899
### 3.1.12 ### | ||
* Remove importing hierarchy | ||
|
||
### 3.1.11 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.1.11 ###
* Fix for post date not updating
* Allow user to disconnect post from GatherContent Item
* Update to use authenticated file downloads
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
128-128: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
@@ -53,15 +52,15 @@ class WPSEO extends Base implements Type { | |||
public function __construct( array $post_types ) { | |||
$this->post_types = $post_types; | |||
$this->seo_options = $this->get_seo_options(); | |||
$this->option_label = __( 'SEO', 'content-workflow-by-bynder' ); | |||
$this->option_label = __( 'SEO', 'gathercontent-import' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
Ensure proper translation of the option label.
The translation string SEO
is not found in the language files, which indicates that the translation might not be set up correctly. Please add the translation string SEO
to the language files to ensure proper translation.
- The translation function
__( 'SEO', 'gathercontent-import' )
is correctly used in the code. - The string
SEO
needs to be added to the language files for translation.
Analysis chain
Ensure proper translation of the option label.
The option label SEO
has been added with a translation function. Ensure that the translation is working correctly.
Verify the translation of the option label SEO
in the plugin's language files.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the translation of the option label `SEO`.
# Test: Search for the translation string in the language files.
rg --type php 'SEO' wp-content/plugins/gathercontent-import/languages/
Length of output: 70
Script:
#!/bin/bash
# Description: Verify the translation of the option label `SEO`.
# Test: Search for the translation string 'SEO' in all relevant files.
rg 'SEO' wp-content/plugins/gathercontent-import/languages/
# Test: Search for the translation function '__( 'SEO', 'gathercontent-import' )' to ensure it is being picked up correctly.
rg "__\( 'SEO', 'gathercontent-import' \)" wp-content/plugins/gathercontent-import/
Length of output: 311
### 3.1.10 ### | ||
* Fix push to GatherContent for new and old editor | ||
|
||
### 3.1.9 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.1.9 ###
* Fix the 3rd param passed to `Pull::sanitize_post_field()`, which needs to be the entire post data array.
* Updated the help centre links.
* Fixed quoted attributes (like alt text) for the pseudo-shortcodes used for media in the GatherContent content, e.g. `[media-1 align=right linkto=file alt="This will go to the image alt tag"]`
* Allow using new shortcode syntax (like `[media_2-1]`) to include media from multiple media fields in GatherContent mapped to the content or excerpt. The original syntax will continue to work (e.g. `[media-1]`), but will be assumed to be the first media field, and will be the same as using the new syntax, `[media_1-1]`.
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
136-136: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 78
Outside diff range and nitpick comments (4)
wp-content/plugins/gathercontent-import/assets/js/gathercontent-single.js (2)
Line range hint
9-9
: Declare variable at the root of the enclosing function.The
var thisView
should be declared at the root of the enclosing function to avoid confusion.- var thisView;
Line range hint
300-300
: Change to an optional chain.Use an optional chain for safer property access.
- $this->item->content->$component_uuid ?? null + $this->item->content?->$component_uuid ?? nullwp-content/plugins/gathercontent-import/assets/js/gathercontent-general.js (2)
Line range hint
164-164
: Remove redundant 'use strict' directive.The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
- 'use strict';
Line range hint
191-191
: Remove redundant 'use strict' directive.The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
- 'use strict';
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (22)
wp-content/plugins/cw-wordpress-plugin-main/assets/css/gathercontent-importer.css.map
is excluded by!**/*.map
wp-content/plugins/cw-wordpress-plugin-main/assets/js/gathercontent-database.min.js
is excluded by!**/*.min.js
wp-content/plugins/cw-wordpress-plugin-main/assets/js/gathercontent-general.min.js
is excluded by!**/*.min.js
wp-content/plugins/cw-wordpress-plugin-main/assets/js/gathercontent-mapping.min.js
is excluded by!**/*.min.js
wp-content/plugins/cw-wordpress-plugin-main/assets/js/gathercontent-single.min.js
is excluded by!**/*.min.js
wp-content/plugins/cw-wordpress-plugin-main/assets/js/gathercontent-sync.min.js
is excluded by!**/*.min.js
wp-content/plugins/cw-wordpress-plugin-main/assets/js/gathercontent.min.js
is excluded by!**/*.min.js
wp-content/plugins/cw-wordpress-plugin-main/composer.lock
is excluded by!**/*.lock
wp-content/plugins/cw-wordpress-plugin-main/images/avatar.png
is excluded by!**/*.png
wp-content/plugins/cw-wordpress-plugin-main/images/logo.svg
is excluded by!**/*.svg
wp-content/plugins/cw-wordpress-plugin-main/images/menu-logo.svg
is excluded by!**/*.svg
wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.min.js
is excluded by!**/*.min.js
wp-content/plugins/gathercontent-import/assets/js/gathercontent-mapping.min.js
is excluded by!**/*.min.js
wp-content/plugins/gathercontent-import/assets/js/gathercontent-single.min.js
is excluded by!**/*.min.js
wp-content/plugins/gathercontent-import/assets/js/gathercontent-sync.min.js
is excluded by!**/*.min.js
wp-content/plugins/gathercontent-import/assets/js/gathercontent.min.js
is excluded by!**/*.min.js
wp-content/plugins/gathercontent-import/assets/js/vendor/select2-4.0.13/select2.min.js
is excluded by!**/*.min.js
wp-content/plugins/gathercontent-import/assets/js/vendor/underscore-1.8.3/underscore.min.js
is excluded by!**/*.min.js
wp-content/plugins/gathercontent-import/cacert.pem
is excluded by!**/*.pem
wp-content/plugins/gathercontent-import/composer.lock
is excluded by!**/*.lock
wp-content/plugins/gathercontent-import/images/logo.svg
is excluded by!**/*.svg
wp-content/plugins/gathercontent-import/images/menu-logo.svg
is excluded by!**/*.svg
Files selected for processing (57)
- wp-content/plugins/gathercontent-import/README.md (1 hunks)
- wp-content/plugins/gathercontent-import/assets/css/gathercontent-importer.css (4 hunks)
- wp-content/plugins/gathercontent-import/assets/css/gathercontent-importer.min.css (1 hunks)
- wp-content/plugins/gathercontent-import/assets/css/vendor/select2-4.0.13/select2.css (1 hunks)
- wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.js (9 hunks)
- wp-content/plugins/gathercontent-import/assets/js/gathercontent-mapping.js (4 hunks)
- wp-content/plugins/gathercontent-import/assets/js/gathercontent-single.js (8 hunks)
- wp-content/plugins/gathercontent-import/assets/js/gathercontent-sync.js (3 hunks)
- wp-content/plugins/gathercontent-import/assets/js/gathercontent.js (4 hunks)
- wp-content/plugins/gathercontent-import/assets/js/vendor/underscore-1.8.3/underscore.js (1 hunks)
- wp-content/plugins/gathercontent-import/gathercontent-importer.php (3 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/admin.php (13 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/ajax/handlers.php (16 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/ajax/sync-bulk.php (4 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/ajax/sync-items.php (10 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/base.php (12 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/bulk.php (13 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/enqueue.php (5 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping-wizard.php (29 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/base.php (14 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/base.php (3 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/media.php (1 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/meta.php (2 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/post.php (3 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/taxonomy.php (3 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/type.php (1 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/types.php (2 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/wpseo.php (5 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/items-sync.php (8 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/template-mapper.php (14 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/post-base.php (4 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/single.php (7 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/admin/support.php (1 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/api.php (38 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/base.php (5 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/compatibility/acf.php (11 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/compatibility/wpml.php (2 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/debug.php (16 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/dom.php (2 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/exception.php (2 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/general.php (6 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/mapping-post.php (25 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/post-types/async-save-hook.php (2 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/post-types/base.php (2 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/post-types/template-mappings.php (19 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/settings/form-section.php (6 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/settings/setting.php (2 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/sync/async-base.php (3 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/sync/async-pull-action.php (1 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/sync/async-push-action.php (1 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/sync/base.php (29 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/sync/log.php (3 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/sync/pull.php (44 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/sync/push.php (28 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/utils.php (7 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/views/form-element.php (3 hunks)
- wp-content/plugins/gathercontent-import/includes/classes/views/input.php (1 hunks)
Files not processed due to max files limit (4)
- wp-content/plugins/gathercontent-import/includes/classes/views/radio.php
- wp-content/plugins/gathercontent-import/includes/classes/views/view.php
- wp-content/plugins/gathercontent-import/includes/functions/core.php
- wp-content/plugins/gathercontent-import/includes/functions/functions.php
Files not summarized due to errors (2)
- wp-content/plugins/gathercontent-import/assets/js/vendor/underscore-1.8.3/underscore.js: Error: Message exceeds token limit
- wp-content/plugins/gathercontent-import/includes/classes/sync/pull.php: Error: Message exceeds token limit
Files not reviewed due to errors (5)
- wp-content/plugins/gathercontent-import/includes/classes/compatibility/acf.php (no review received)
- wp-content/plugins/gathercontent-import/assets/css/gathercontent-importer.min.css (no review received)
- wp-content/plugins/gathercontent-import/assets/css/gathercontent-importer.css (no review received)
- wp-content/plugins/gathercontent-import/includes/classes/mapping-post.php (no review received)
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/template-mapper.php (no review received)
Files skipped from review due to trivial changes (9)
- wp-content/plugins/gathercontent-import/includes/classes/admin/admin.php
- wp-content/plugins/gathercontent-import/includes/classes/admin/ajax/sync-items.php
- wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/types.php
- wp-content/plugins/gathercontent-import/includes/classes/admin/single.php
- wp-content/plugins/gathercontent-import/includes/classes/base.php
- wp-content/plugins/gathercontent-import/includes/classes/dom.php
- wp-content/plugins/gathercontent-import/includes/classes/post-types/template-mappings.php
- wp-content/plugins/gathercontent-import/includes/classes/utils.php
- wp-content/plugins/gathercontent-import/includes/classes/views/input.php
Additional context used
Biome
wp-content/plugins/gathercontent-import/assets/js/gathercontent.js
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: The comma operator is disallowed.
Its use is often confusing and obscures side effects.
(lint/style/noCommaOperator)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-10: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 27-28: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 32-32: Do not shadow the global "undefined" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
[error] 33-33: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 45-45: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 51-51: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 15-15: Use the rest parameters instead of arguments.
arguments does not have Array.prototype methods and can be inconvenient to use.
(lint/style/noArguments)
[error] 16-16: Use the rest parameters instead of arguments.
arguments does not have Array.prototype methods and can be inconvenient to use.
(lint/style/noArguments)
[error] 20-20: Use the rest parameters instead of arguments.
arguments does not have Array.prototype methods and can be inconvenient to use.
(lint/style/noArguments)
[error] 23-23: Use the rest parameters instead of arguments.
arguments does not have Array.prototype methods and can be inconvenient to use.
(lint/style/noArguments)
wp-content/plugins/gathercontent-import/assets/css/gathercontent-importer.css
[error] 363-363: expected
,
but instead foundtext-indent
Remove text-indent
(parse)
[error] 363-363: Unexpected value or character.
Expected one of:
(parse)
[error] 363-363: expected
,
but instead foundpx
Remove px
(parse)
[error] 363-363: expected
,
but instead found;
Remove ;
(parse)
[error] 364-365: expected
,
but instead found.
Remove .
(parse)
[error] 462-462: expected
}
but instead the file endsthe file ends here
(parse)
wp-content/plugins/gathercontent-import/assets/js/gathercontent-mapping.js
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: The comma operator is disallowed.
Its use is often confusing and obscures side effects.
(lint/style/noCommaOperator)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-10: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 21-22: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 34-35: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 43-44: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 52-53: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 57-57: Do not shadow the global "undefined" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
[error] 58-58: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 103-104: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 112-113: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 136-137: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 177-178: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 203-204: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 237-238: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
wp-content/plugins/gathercontent-import/assets/css/vendor/select2-4.0.13/select2.css
[error] 116-116: Unexpected value or character.
Expected one of:
(parse)
[error] 307-307: Unexpected value or character.
Expected one of:
(parse)
[error] 335-335: Unexpected value or character.
Expected one of:
(parse)
[error] 377-377: Unexpected value or character.
Expected one of:
(parse)
[error] 387-387: Unexpected value or character.
Expected one of:
(parse)
wp-content/plugins/gathercontent-import/assets/js/gathercontent-single.js
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: The comma operator is disallowed.
Its use is often confusing and obscures side effects.
(lint/style/noCommaOperator)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-10: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 21-22: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 30-31: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 39-40: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 63-64: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 130-131: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 135-135: Do not shadow the global "undefined" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
[error] 136-136: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 182-183: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 216-217: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 300-300: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 396-397: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 431-432: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
wp-content/plugins/gathercontent-import/assets/js/gathercontent-sync.js
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: The comma operator is disallowed.
Its use is often confusing and obscures side effects.
(lint/style/noCommaOperator)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-10: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 21-22: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 44-44: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 140-150: This else clause can be omitted because previous branches break early.
Unsafe fix: Omit the else clause.
(lint/style/noUselessElse)
[error] 164-165: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 186-186: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 242-242: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 259-260: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 268-269: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 324-325: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 333-334: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 380-381: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 404-405: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.js
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: The comma operator is disallowed.
Its use is often confusing and obscures side effects.
(lint/style/noCommaOperator)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-9: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 9-9: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 9-10: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 21-22: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 44-44: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 140-150: This else clause can be omitted because previous branches break early.
Unsafe fix: Omit the else clause.
(lint/style/noUselessElse)
[error] 164-165: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 191-192: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 247-248: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 269-269: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 325-325: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 342-343: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 347-347: Do not shadow the global "undefined" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
[error] 348-348: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
[error] 435-436: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
wp-content/plugins/gathercontent-import/assets/js/vendor/underscore-1.8.3/underscore.js
[error] 24-24: Do not shadow the global "toString" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
[error] 25-25: Do not shadow the global "hasOwnProperty" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
[error] 102-102: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 103-105: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 106-106: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 107-107: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 156-156: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 170-170: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 171-171: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 183-183: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 243-243: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 244-244: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 256-256: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 257-257: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 304-304: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 329-329: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 354-354: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 492-492: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 493-494: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
[error] 497-498: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
LanguageTool
wp-content/plugins/gathercontent-import/README.md
[grammar] ~3-~3: The expression “vice versa” is spelled without hyphens.
Context: ...t projects into your WordPress site and vice-versa. ## Description ## Installing our Wor...(VICE_VERSA)
[grammar] ~9-~9: The usual collocation for “WordPress” is “on”. Did you mean “on WordPress”?
Context: ...ield in GatherContent to various fields in WordPress; title, body content, custom fields, ta...(IN_FACEBOOK)
[grammar] ~15-~15: The usual collocation for “Wordpress” is “on”. Did you mean “on Wordpress”?
Context: ...ntent to GatherContent * Update content in Wordpress from GatherContent * Update content fro...(IN_FACEBOOK)
[grammar] ~22-~22: The usual collocation for “WordPress” is “on”. Did you mean “on WordPress”?
Context: ...content, and then continue to update it in WordPress with a few clicks. Connecting a powerf...(IN_FACEBOOK)
[typographical] ~35-~35: Consider adding a comma here.
Context: ... more detailed installation instructions please visit our [Help Centre](http://help.gat...(PLEASE_COMMA)
[uncategorized] ~45-~45: A comma may be missing after the conjunctive/linking adverb ‘However’.
Context: ...y deliver it to anyone who needs it. However, this information contains potentiall...(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
[uncategorized] ~143-~143: Possible missing article found.
Context: ... to thepost_title
, be sure to update title from the GC item name. * Fix bug with i...(AI_HYDRA_LEO_MISSING_THE)
[grammar] ~147-~147: The expression “vice versa” is spelled without hyphens.
Context: ...ge taxonomy terms where applicable, and vice-versa. Note: If the GC item uses the fore...(VICE_VERSA)
[duplication] ~170-~170: Possible typo: you repeated a word
Context: ...ested wp-async tasks causing the action name name to be modified and the hooked callbacks...(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~180-~180: Possible missing preposition found.
Context: ...Content. ### 3.1.1 ### * Added ability log the async requests in debug mode. * Rem...(AI_HYDRA_LEO_MISSING_TO)
[style] ~193-~193: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ray to thegc_content_image
filter. * Addgc_admin_enqueue_style
and `gc_admin_...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[uncategorized] ~200-~200: Possible missing article found.
Context: ... to the "1%" sync error, Now detects if site has HTTP authentication enabled, and pr...(AI_HYDRA_LEO_MISSING_THE)
[style] ~203-~203: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...### * Improved stability when importing a very large number of items. ### 3.0.5 ### * Add a...(EN_WEAK_ADJECTIVE)
[uncategorized] ~221-~221: Possible missing comma found.
Context: ...c_pull_completeand
gc_push_complete` hook which is triggered after all items are ...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~260-~260: Possible missing article found.
Context: ...ces. ### 3.0.0 ### * Complete rewrite. Plugin no longer uses the legacy API, and allo...(AI_HYDRA_LEO_MISSING_THE)
[misspelling] ~272-~272: This expression is normally spelled as one or with a hyphen.
Context: ...xt content ### 2.6.1 ### * Fix bug for multi site installs ### 2.6.0 ### * Add support f...(EN_COMPOUNDS_MULTI_SITE)
[uncategorized] ~284-~284: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...ugin stores page data to allow a larger amount of pages with larger content ### 2.3.0...(AMOUNTOF_TO_NUMBEROF)
Markdownlint
wp-content/plugins/gathercontent-import/README.md
20-20: Expected: atx_closed; Actual: atx
Heading style(MD003, heading-style)
150-150: Column: 1
Hard tabs(MD010, no-hard-tabs)
151-151: Column: 1
Hard tabs(MD010, no-hard-tabs)
153-153: Column: 1
Hard tabs(MD010, no-hard-tabs)
154-154: Column: 1
Hard tabs(MD010, no-hard-tabs)
155-155: Column: 1
Hard tabs(MD010, no-hard-tabs)
47-47: Expected: 1; Actual: 2
Multiple consecutive blank lines(MD012, no-multiple-blanks)
50-50: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
53-53: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
56-56: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
62-62: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
65-65: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
68-68: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
71-71: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
74-74: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
77-77: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
80-80: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
83-83: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
86-86: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
90-90: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
93-93: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
96-96: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
99-99: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
102-102: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
105-105: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
108-108: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
111-111: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
114-114: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
119-119: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
122-122: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
125-125: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
128-128: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
133-133: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
136-136: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
142-142: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
146-146: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
159-159: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
164-164: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
169-169: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
173-173: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
176-176: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
179-179: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
183-183: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
186-186: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
189-189: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
198-198: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
202-202: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
205-205: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
208-208: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
212-212: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
217-217: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
225-225: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
231-231: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
234-234: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
237-237: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
241-241: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
244-244: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
247-247: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
250-250: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
253-253: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
256-256: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
259-259: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
262-262: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
265-265: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
268-268: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
271-271: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
274-274: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
277-277: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
280-280: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
283-283: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
286-286: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
289-289: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
292-292: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
295-295: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
298-298: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
301-301: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
304-304: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
307-307: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
310-310: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
148-148: null
Fenced code blocks should be surrounded by blank lines(MD031, blanks-around-fences)
51-51: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
54-54: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
57-57: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
63-63: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
66-66: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
69-69: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
72-72: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
75-75: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
78-78: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
81-81: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
84-84: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
87-87: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
91-91: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
94-94: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
97-97: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
100-100: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
103-103: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
106-106: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
109-109: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
112-112: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
115-115: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
120-120: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
123-123: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
126-126: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
129-129: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
134-134: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
137-137: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
143-143: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
147-147: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
147-147: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
160-160: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
165-165: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
170-170: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
174-174: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
177-177: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
180-180: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
184-184: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
187-187: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
190-190: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
199-199: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
203-203: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
206-206: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
209-209: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
213-213: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
218-218: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
226-226: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
232-232: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
235-235: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
238-238: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
242-242: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
245-245: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
248-248: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
251-251: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
254-254: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
257-257: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
260-260: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
263-263: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
266-266: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
269-269: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
272-272: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
275-275: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
278-278: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
281-281: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
284-284: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
287-287: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
290-290: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
293-293: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
296-296: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
299-299: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
302-302: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
305-305: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
308-308: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
311-311: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
33-33: null
Bare URL used(MD034, no-bare-urls)
Additional comments not posted (174)
wp-content/plugins/gathercontent-import/includes/classes/sync/async-pull-action.php (1)
5-5
: LGTM!The change to the
$action
property aligns with the GatherContent naming conventions.wp-content/plugins/gathercontent-import/includes/classes/sync/async-push-action.php (1)
5-5
: LGTM!The change to the
$action
property aligns with the GatherContent naming conventions.wp-content/plugins/gathercontent-import/includes/classes/views/form-element.php (1)
22-24
: LGTM! The function changes are consistent with its purpose.The added parameter
$echo
and the return type annotation align with the function's purpose of optionally echoing the content.wp-content/plugins/gathercontent-import/includes/classes/post-types/async-save-hook.php (1)
16-26
: LGTM! Exception handling is a good addition.The added exception handling mechanism ensures that only relevant async tasks are processed, which improves the robustness of the function.
wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/post.php (2)
30-30
: LGTM! The constructor changes are consistent with the class's purpose.The added initialization of
option_label
aligns with the class's purpose of handling post options.
36-41
: LGTM! The function changes are consistent with its purpose.The added lines for rendering select options align with the function's purpose of rendering a select element based on the
post_options
.wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/meta.php (2)
30-30
: LGTM! The constructor changes are consistent with the class's purpose.The added initialization of
option_label
aligns with the class's purpose of handling custom fields.
36-41
: LGTM! The function changes are consistent with its purpose.The added lines for rendering select options align with the function's purpose of rendering a select element based on
metaKeys
.wp-content/plugins/gathercontent-import/includes/classes/post-types/base.php (2)
16-16
: Enhance the docblock for the constructor parameter.The parameter
$labels
is missing from the docblock. Add a description for better clarity.* @param $api API object + * @param array $labels Labels for the custom post type * @param array $args Arguments for the custom post type
41-42
: Fix typo in docblock.Correct the typo in the docblock: "Modifed" should be "Modified".
* @return string Modifed placeholder text + * @return string Modified placeholder text
wp-content/plugins/gathercontent-import/includes/classes/settings/setting.php (1)
30-31
: Fix the docblock formatting.The docblock for the
get
method has an incomplete parameter description. Provide a meaningful description and correct the formatting.* @param [type] $key [description] * * @return [type] [description] + * @param string $key The key of the option to retrieve + * @return mixed The value of the option or false if the key does not existwp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/media.php (2)
1-1
: Add file header comment.Consider adding a file header comment to provide an overview of the file's purpose.
<?php /** * Media Field Type Class * * Handles the mapping of media fields in GatherContent. * * @package GatherContent\Importer */
8-8
: Fix visibility for the property.Specify the visibility for the property
$type_id
for better clarity and consistency.- protected $type_id = 'wp-type-media'; + protected $type_id = 'wp-type-media';wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/taxonomy.php (2)
8-8
: Fix visibility for the property.Specify the visibility for the property
$type_id
and$post_types
for better clarity and consistency.- protected $type_id = 'wp-type-taxonomy'; + protected $type_id = 'wp-type-taxonomy'; + protected $post_types = array();
29-29
: Fix constructor parameter description.The docblock for the constructor parameter
$post_types
is missing. Add a description for better clarity.* @param array $post_types Array of post typeswp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/base.php (6)
64-64
: LGTM!The function is straightforward and has no issues.
Line range hint
66-73
: Verify the correctness of the templating logic.Ensure that the
type_id
method is called correctly and the supported types are handled properly.public function option_underscore_template( View $view ) { $option = '<option <# if ( "' . $this->type_id() . '" === data.field_type ) { #>selected="selected"<# } #> value="' . $this->type_id() . '">' . $this->option_label . '</option>'; if ( $types = $this->get_supported_types() ) { $option = '<# if ( data.type in ' . $types . ' ) { #>' . $option . '<# } #>'; } echo "\n\t" . $option; }
Line range hint
75-78
: LGTM!The function is straightforward and has no issues.
84-84
: Verify the correctness of the templating logic.Ensure that the
value
andlabel
parameters are handled correctly.public function underscore_option( $value, $label ) { echo '<option <# if ( "' . $value . '" === data.field_value ) { #>selected="selected"<# } #> value="' . $value . '">' . $label . '</option>'; }
86-87
: LGTM!The function is straightforward and has no issues.
Line range hint
89-93
: Verify the correctness of the logic for encoding supported types.Ensure that the logic handles edge cases properly.
protected function get_supported_types() { if ( ! empty( $this->supported_types ) && ! is_string( $this->supported_types ) ) { $this->supported_types = wp_json_encode( array_flip( $this->supported_types ) ); } return $this->supported_types; }wp-content/plugins/gathercontent-import/includes/classes/admin/post-base.php (3)
Line range hint
62-68
: Verify the correctness of the constructor logic.Ensure that the dependencies are correctly injected and the class properties are properly initialized.
public function __construct( API $api, Mapping_Wizard $wizard ) { $this->api = $api; $this->wizard = $wizard; $this->doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX; $this->enqueue = new Post_Enqueue(); }
77-92
: Verify the correctness of the localizable data array.Ensure that the data returned is accurate and properly formatted.
protected function get_localize_data() { return array( '_edit_nonce' => wp_create_nonce( General::get_instance()->admin->mapping_wizard->option_group . '-options' ), '_statuses' => array( 'starting' => __( 'Starting Sync', 'gathercontent-importer' ), 'syncing' => __( 'Syncing', 'gathercontent-importer' ), 'complete' => __( 'Sync Complete', 'gathercontent-importer' ), 'failed' => __( 'Sync Failed (review?)', 'gathercontent-importer' ), ), '_errors' => array( 'unknown' => __( 'There was an unknown error', 'gathercontent-importer' ), ), '_step_labels' => Utils::get_step_label( 'all' ), ); }
Line range hint
43-46
: LGTM!The function is straightforward and adds an action hook correctly.
wp-content/plugins/gathercontent-import/assets/js/gathercontent.js (3)
Line range hint
48-53
: Verify the correctness of the event handlers and menu initialization logic.Ensure that the event handlers are correctly set up and the menu initialization logic is correct.
main.init = function () { $(document.body).on('click', '.gc-nav-tab-wrapper:not( .gc-nav-tab-wrapper-bb ) .nav-tab', main.changeTabs).on('click', '.gc-reveal-items', main.maybeReveal); if (gc.queryargs.mapping) { var $menu = gc.$id('toplevel_page_gathercontent-import'); $menu.find('.current').removeClass('current'); $menu.find('[href="edit.php?post_type=gc_templates"]').parent().addClass('current'); } };Tools
Biome
[error] 45-45: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
[error] 51-51: This var should be declared at the root of the enclosing function.
The var is accessible in the whole body of the enclosing function.
To avoid confusion, it should be declared at the root of the enclosing function.(lint/correctness/noInnerDeclarations)
Line range hint
55-63
: LGTM!The function is straightforward and handles tab navigation correctly.
Line range hint
65-73
: LGTM!The function is straightforward and handles the reveal logic correctly.
wp-content/plugins/gathercontent-import/includes/classes/sync/log.php (4)
43-46
: LGTM!The function is straightforward and adds an action hook correctly.
Line range hint
54-72
: Verify the correctness of the error handling logic.Ensure that the error handling logic is correct and robust.
public function handle_logging( $maybe_error, $sync ) { if ( ! is_wp_error( $maybe_error ) || ! $sync->mapping || "gc_{$sync->direction}_item_in_progress" === $maybe_error->get_error_code() ) { // Nothing to do here. return; } $this->sync = $sync; $this->error = $maybe_error; $this->log_errors(); }
Line range hint
79-112
: Verify the correctness of the error logging logic.Ensure that the error logging logic is correct and robust.
public function log_errors() { if ( 0 === strpos( $this->error->get_error_code(), "gc_{$this->sync->direction}_item_fail_" ) ) { $data = $this->error->get_error_data(); $item_errors = $this->sync->mapping->get_meta( 'item_errors' ); $item_errors = is_array( $item_errors ) ? $item_errors : array(); if ( isset( $item_errors[ $data['sync_item_id'] ] ) && $this->error_same( $item_errors[ $data['sync_item_id'] ] ) ) { return; } $item_errors[ $data['sync_item_id'] ] = $this->error; $this->sync->mapping->update_meta( 'item_errors', $item_errors ); } else { $last = $this->sync->mapping->get_meta( 'last_error' ); if ( $this->error_same( $last ) ) { // Don't resave existing error. return; } $this->sync->mapping->update_meta( 'last_error', $this->error ); } }
115-120
: LGTM!The function is straightforward and compares the error objects correctly.
wp-content/plugins/gathercontent-import/includes/classes/admin/ajax/sync-bulk.php (2)
12-16
: Renamed methodcwby_pull_items_cb
togc_pull_items_cb
.The method name has been updated to align with the GatherContent branding. Ensure that all references to this method in the codebase are updated accordingly.
Line range hint
18-22
: Renamed methodcwby_push_items_cb
togc_push_items_cb
.The method name has been updated to align with the GatherContent branding. Ensure that all references to this method in the codebase are updated accordingly.
wp-content/plugins/gathercontent-import/includes/classes/admin/enqueue.php (5)
27-28
: Enqueueing GatherContent stylesheets.The stylesheets are being enqueued using the GatherContent namespace. Ensure that the paths and dependencies are correct.
30-30
: Triggering custom action after enqueuing stylesheets.The custom action
gc_admin_enqueue_style
is triggered after enqueuing the stylesheets. Ensure that any necessary hooks are added to this action.
65-65
: Enqueueing GatherContent scripts.The scripts are being enqueued using the GatherContent namespace. Ensure that the paths and dependencies are correct.
67-67
: Triggering custom action after enqueuing scripts.The custom action
gc_admin_enqueue_script
is triggered after enqueuing the scripts. Ensure that any necessary hooks are added to this action.
Line range hint
79-89
: Localizing data for GatherContent scripts.The data is being localized for the GatherContent scripts. Ensure that the data being localized is correct and that the
gathercontent_localized_data
filter is properly hooked.wp-content/plugins/gathercontent-import/includes/classes/settings/form-section.php (4)
11-12
: Added public properties for title and callback.The properties
title
andcallback
have been added as public properties. Ensure that these properties are used correctly within the class.
41-43
: Generating HTML for form section fields.The method
get_section
generates HTML for the form section fields. Ensure that the HTML structure is correct and that the fields are rendered properly.
74-79
: Rendering form fields with labels.The method
do_fields
renders form fields with labels. Ensure that the labels and fields are rendered correctly and that the HTML structure is valid.
107-109
: Added method to output field parameters.The method
do_param
outputs field parameters. Ensure that the parameters are correctly retrieved and output.wp-content/plugins/gathercontent-import/includes/classes/sync/async-base.php (3)
43-49
: Validating request data before launching async task.The request data is validated before launching the async task. Ensure that the data validation is thorough and that the async task is correctly launched.
59-78
: Handling postback for async task.The postback for the async task is handled, and the data is validated. Ensure that the postback handling is secure and that the data is correctly processed.
114-121
: Running the given async task action.The method
run_given_action
runs the given async task action. Ensure that the action is correctly executed and that the data is processed properly.wp-content/plugins/gathercontent-import/includes/classes/general.php (3)
Line range hint
91-96
: LGTM!The
get_instance
function correctly implements the singleton pattern.
Line range hint
148-167
: LGTM!The
init_hooks
function correctly initializes hooks for various components.
Line range hint
101-135
: Ensure proper initialization of new instances.The constructor initializes several new instances. Ensure that these instances do not have side effects or dependencies that need to be managed.
wp-content/plugins/gathercontent-import/gathercontent-importer.php (3)
83-84
: LGTM!The error message correctly mentions the minimum WordPress version.
102-105
: LGTM!The text domain is correctly registered and loaded for internationalization.
3-10
: Metadata Update: Ensure accuracy and consistency.The metadata values are accurate and consistent with the plugin's purpose.
wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/field-types/wpseo.php (5)
55-57
: LGTM!The
__construct
function correctly initializes properties and sets the option label.
Line range hint
63-95
: LGTM!The
get_seo_options
function correctly retrieves and initializes SEO options for different post types.
Line range hint
97-121
: LGTM!The
build_options
function correctly builds and sanitizes SEO options based on the provided fields.
125-133
: LGTM!The
initialize_wpseo
function correctly initializes WPSEO components if not already initialized.
149-157
: LGTM!The
underscore_template
function correctly generates an underscore.js template for SEO options.wp-content/plugins/gathercontent-import/includes/classes/compatibility/wpml.php (5)
29-31
: LGTM!The
init_hooks
function correctly initializes hooks for WPML compatibility.
Line range hint
41-61
: LGTM!The
maybe_transform_meta_for_wpml
function correctly transforms multilingual taxonomy values from GC to WPML.
Line range hint
89-118
: LGTM!The
maybe_update_taxonomy_item_value_from_wpml
function correctly updates taxonomy item values from WPML to GC.
Line range hint
144-145
: LGTM!The
wpml_installed
function correctly checks if WPML is installed.
Line range hint
147-148
: LGTM!The
get_post_lang
function correctly retrieves the language details of a post.wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/items-sync.php (6)
28-28
: Consider using a more descriptive property name.The property
$url
is initialized but it is not clear what URL it represents. Consider renaming it to something more descriptive like$mapping_url
.- protected $url = ''; + protected $mapping_url = '';
39-39
: Ensure themapping_id
is set before using it.The constructor uses
$this->mapping_id
without ensuring it is set. Make suremapping_id
is properly initialized before callingMapping_Post::get($this->mapping_id)
.
105-105
: Provide context for the error.Consider adding more context to the error message to make debugging easier.
- $msg_parts[] = __( 'Error!', 'gathercontent-import' ); + $msg_parts[] = __( 'An error occurred during the import process!', 'gathercontent-import' );
Line range hint
115-115
: LGTM!The function correctly prepares items for JavaScript.
121-123
: LGTM!The function correctly returns the script ID.
166-166
: Escape localized strings.Ensure that localized strings are properly escaped.
- 'no_items' => esc_html__( 'No items found.', 'gathercontent-import' ), + 'no_items' => esc_html__( 'No items found.', 'gathercontent-import' ),Likely invalid or redundant comment.
wp-content/plugins/gathercontent-import/includes/classes/admin/base.php (13)
9-13
: Consider using more descriptive property names.The properties
$url
,$step
, and$menu_priority
are generic and could benefit from more descriptive names.- public $url = ''; - public $step = 0; - public $menu_priority = 9; + public $admin_url = ''; + public $current_step = 0; + public $menu_priority_level = 9;
Line range hint
61-74
: LGTM!The function correctly initializes and adds hooks.
Line range hint
94-98
: LGTM!The function correctly initializes and registers settings sections.
116-121
: Consider adding more context to error messages.Adding more context to error messages can help in debugging and understanding the issue.
- $wp_settings_errors[] = array( - 'setting' => $setting, - 'code' => $code, - 'message' => $message, - 'type' => $type, - ); + $wp_settings_errors[] = array( + 'setting' => $setting, + 'code' => $code, + 'message' => $message . ' (Setting: ' . $setting . ', Code: ' . $code . ')', + 'type' => $type, + );
145-147
: LGTM!The function correctly returns the current step.
158-160
: LGTM!The function correctly retrieves and returns the setting value.
Line range hint
171-175
: LGTM!The function correctly returns the settings object.
183-183
: Consider providing a more descriptive error message.Providing a more descriptive error message can help in debugging.
- throw new \Exception( 'Must set the API object with ' . get_class( $this ) . '::set_api( $api ).' ); + throw new \Exception( 'The API object must be set using ' . get_class( $this ) . '::set_api( $api ).' );
Line range hint
186-188
: LGTM!The function correctly sets the API object.
Line range hint
199-219
: LGTM!The function correctly sets the account based on the platform URL.
223-226
: LGTM!The function correctly returns the platform URL.
Line range hint
229-242
: LGTM!The function correctly retrieves and returns the account slug.
Line range hint
244-252
: LGTM!The function correctly retrieves and returns the account ID.
wp-content/plugins/gathercontent-import/includes/classes/admin/support.php (9)
60-60
: Consider adding a comment explaining the purpose of this method.The method is empty and a comment explaining why it needs to remain empty would be helpful for future maintainers.
- public function initialize_settings_sections() {} + /** + * This method is intentionally left empty as required by the parent class. + */ + public function initialize_settings_sections() {}
69-78
: LGTM!The
admin_menu
method correctly registers a submenu page for the support section.
168-178
: LGTM!The
theme
method correctly retrieves the theme information.
180-190
: Consider expanding the hosting provider identification.The current implementation only checks for WP Engine and Pagely. Consider adding more hosting providers if necessary.
192-195
: LGTM!The
pre_length
method correctly calculates and returns the length of the database prefix.
197-215
: LGTM!The
wp_remote_post
method correctly checks the functionality ofwp_remote_post
.
217-231
: LGTM!The
active_plugins
method correctly retrieves and formats the list of active plugins.
234-257
: LGTM!The
network_active_plugins
method correctly retrieves and formats the list of network active plugins.
260-264
: LGTM!The
get_page
method correctly retrieves and formats the page title based on the option key.wp-content/plugins/gathercontent-import/includes/classes/admin/bulk.php (7)
34-34
: LGTM!The
script_id
method correctly returns the script ID.
Line range hint
45-71
: LGTM!The
init_hooks
method correctly initializes the required hooks for bulk editing.
Line range hint
79-106
: LGTM!The
ui_page
method correctly handles the UI for bulk editing.
Line range hint
108-116
: LGTM!The
hook_columns
method correctly hooks the column callbacks for the current screen's post-type.
126-133
: LGTM!The
register_column_headers
method correctly registers the GatherContent column header.
Line range hint
141-163
: LGTM!The
column_display
method correctly handles the display of the GatherContent column.
Line range hint
175-191
: LGTM!The
ajax_view
method correctly handles the AJAX view of the GatherContent column.wp-content/plugins/gathercontent-import/includes/classes/admin/ajax/handlers.php (13)
50-53
: LGTM!The constructor correctly initializes the
API
,Sync_Items
, andSync_Bulk
instances.
64-78
: LGTM!The AJAX callbacks have been correctly updated to reflect the new GatherContent branding.
Line range hint
88-115
: LGTM!The function correctly handles input validation and returns appropriate JSON responses.
Line range hint
119-167
: LGTM!The function correctly handles input validation, fetches the necessary data, and returns appropriate JSON responses.
Line range hint
172-203
: LGTM!The function correctly handles input validation, fetches the necessary data, and returns appropriate JSON responses.
Line range hint
206-232
: LGTM!The function correctly handles input validation, updates the item status, and returns appropriate JSON responses.
Line range hint
235-246
: LGTM!The function correctly handles input validation and returns appropriate JSON responses.
Line range hint
247-270
: LGTM!The function correctly handles input validation, updates the post metadata, and returns appropriate JSON responses.
Line range hint
273-315
: LGTM!The function correctly handles input validation, updates the mapping ID, and returns appropriate JSON responses.
Line range hint
318-384
: LGTM!The function correctly handles input validation, fetches the necessary data, and returns appropriate JSON responses.
Line range hint
387-414
: LGTM!The function correctly handles input validation, updates the post metadata, and returns appropriate JSON responses.
Line range hint
416-448
: LGTM!The function correctly handles input validation, fetches the necessary data, and returns appropriate JSON responses.
450-454
: LGTM!The function correctly verifies the nonce value.
wp-content/plugins/gathercontent-import/includes/classes/admin/mapping/base.php (16)
Line range hint
66-73
: LGTM!The constructor correctly initializes the necessary properties based on the provided arguments.
82-84
: LGTM!The function correctly returns the script ID.
91-93
: LGTM!The abstract function definition is appropriate.
100-102
: LGTM!The abstract function definition is appropriate.
109-111
: LGTM!The abstract function definition is appropriate.
Line range hint
118-140
: LGTM!The function correctly sets up the UI and enqueues the necessary scripts.
Line range hint
141-153
: LGTM!The function correctly outputs the underscore templates.
156-161
: LGTM!The function correctly merges the localized data with additional data.
Line range hint
169-197
: LGTM!The function correctly handles different post columns and returns appropriate options.
Line range hint
208-235
: LGTM!The function correctly handles the retrieval and filtering of post table columns.
Line range hint
237-311
: LGTM!The function correctly handles the retrieval, filtering, and caching of custom field keys.
Line range hint
312-337
: LGTM!The function correctly checks if a column is in the blacklist.
339-381
: LGTM!The function correctly maps columns to human-readable values.
Line range hint
390-414
: LGTM!The function correctly handles the retrieval and formatting of post types and their taxonomies.
Line range hint
422-443
: LGTM!The function correctly handles the retrieval and optional processing of values.
Line range hint
445-462
: LGTM!The function correctly handles the retrieval and processing of stored mapping values.
wp-content/plugins/gathercontent-import/README.md (3)
9-9
: Correct the collocation for "WordPress".The usual collocation for “WordPress” is “on”.
- ...fields in WordPress; title, body content, custom fields, tags, categories, Yoast fields, advanced custom fields, featured images … and many more. + ...fields on WordPress; title, body content, custom fields, tags, categories, Yoast fields, advanced custom fields, featured images … and many more.Likely invalid or redundant comment.
Tools
LanguageTool
[grammar] ~9-~9: The usual collocation for “WordPress” is “on”. Did you mean “on WordPress”?
Context: ...ield in GatherContent to various fields in WordPress; title, body content, custom fields, ta...(IN_FACEBOOK)
33-33
: Avoid using bare URLs.Use descriptive text for the link.
- For more detailed installation instructions please visit our [Help Centre](http://help.gathercontent.com/importing-and-exporting-content#wordpress-integration). + For more detailed installation instructions, please visit our [Help Centre](http://help.gathercontent.com/importing-and-exporting-content#wordpress-integration).Likely invalid or redundant comment.
Tools
Markdownlint
33-33: null
Bare URL used(MD034, no-bare-urls)
77-77
: Ensure headings are surrounded by blank lines.Headings should be surrounded by blank lines.
### 3.2.12 ### * Reformat readme.txt
Likely invalid or redundant comment.
Tools
Markdownlint
77-77: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
wp-content/plugins/gathercontent-import/includes/classes/sync/push.php (2)
74-75
: LGTM!The hooks for async actions are correctly added.
129-134
: Fix: Use null coalescing operator.Use the null coalescing operator for better readability.
- 'item_id' => $this->item->id ?? 0, + 'item_id' => $this->item->id ?? 0,Likely invalid or redundant comment.
wp-content/plugins/gathercontent-import/assets/js/gathercontent-single.js (7)
93-93
: Update action name inurl
method.The action name has been updated from
cwby_fetch_js_post
togc_fetch_js_post
. Ensure that this change is consistent across the codebase.
271-271
: Update action name insetMapping
method.The action name has been updated from
cwby_save_mapping_id
togc_save_mapping_id
. Ensure that this change is consistent across the codebase.
306-306
: Update action name instep
method.The action name has been updated from
cwby_wp_filter_mappings
togc_wp_filter_mappings
. Ensure that this change is consistent across the codebase.
470-470
: Update action name inasyncInit
method.The action name has been updated from
cwby_get_post_statuses
togc_get_post_statuses
. Ensure that this change is consistent across the codebase.
617-617
: Update action name insaveStatus
method.The action name has been updated from
set_cwby_status
toset_gc_status
. Ensure that this change is consistent across the codebase.
628-628
: Update action name indisconnect
method.The action name has been updated from
cwby_disconnect_post
togc_disconnect_post
. Ensure that this change is consistent across the codebase.
678-678
: Update action name indoSync
method.The action name has been updated from
cwby_
+ direction +_items
togc_
+ direction +_items
. Ensure that this change is consistent across the codebase.wp-content/plugins/gathercontent-import/includes/classes/sync/base.php (1)
145-145
: Update action name insync_items
method.The action name has been updated from
cwby_sync_items
togc_sync_items
. Ensure that this change is consistent across the codebase.wp-content/plugins/gathercontent-import/assets/js/gathercontent-sync.js (2)
Line range hint
440-444
: LGTM!The action name change from 'cwby_dismiss_notice' to 'gc_dismiss_notice' is consistent with the new plugin branding.
2-5
: Remove redundant 'use strict' directive.JavaScript modules are automatically in strict mode, making the 'use strict' directive unnecessary.
- 'use strict';
Likely invalid or redundant comment.
wp-content/plugins/gathercontent-import/includes/classes/api.php (1)
178-180
: LGTM!Appending status to items if
include_status
is true is correctly implemented.wp-content/plugins/gathercontent-import/includes/classes/admin/mapping-wizard.php (10)
16-20
: Constants added for mapping wizard steps.The constants for the different steps in the mapping wizard improve readability and maintainability.
99-113
: Admin menu registration updated.The changes ensure that the necessary styles and scripts are loaded for the admin page.
Line range hint
118-130
: Step label retrieval updated.The changes centralize the logic for obtaining step labels, improving consistency and readability.
148-169
: Help tabs and sidebar updated.The changes provide helpful information and links in the help tabs and sidebar, improving the user experience.
Line range hint
184-205
: Admin page view arguments updated.The changes provide more context and options for the admin page view, improving functionality.
Line range hint
220-246
: User notices updated.The changes improve user feedback by providing a notice when the GatherContent API data is refreshed.
Line range hint
286-315
: Settings sections initialization updated.The changes ensure that settings sections are initialized based on the current step in the wizard, improving functionality.
Line range hint
339-377
: Project selection UI updated.The changes provide a more intuitive way to select a project from the list of accounts, improving the user experience.
Line range hint
416-492
: Template selection UI updated.The changes provide a more intuitive way to select a template in the chosen project, improving the user experience.
543-547
: Template mapping process updated.The changes improve the functionality of the mapping process by handling the creation or updating of a mapping post.
wp-content/plugins/gathercontent-import/includes/classes/sync/pull.php (19)
36-38
: Constructor looks good.The constructor function is straightforward and follows best practices.
47-49
: Hook initialization looks good.The
init_plugins_loaded_hooks
method correctly initializes the hook.
58-64
: Hook initialization looks good.The
init_hooks
method correctly initializes multiple hooks.
72-75
: Exception handling looks good.The
maybe_pull_item
method properly handles exceptions and returns a WP_Error on failure.
234-236
: Data mapping looks good.The
map_gc_data_to_wp_data
method correctly maps GatherContent data to WordPress data.
290-290
: Logic looks good.The
should_update_title_with_item_name
method correctly implements the logic to check if the post title should be updated.
307-307
: Logic looks good.The
has_post_title_mapping
method correctly implements the logic to check if there is a mapping for the post title.
335-337
: Data mapping looks good.The
loop_item_elements_and_map
method correctly loops through item elements and maps the post data.
396-399
: Data setting looks good.The
set_post_values
method correctly sets the post data value for each data type.
438-441
: Data setting looks good.The
set_post_field_value
method correctly sets the WP post fields based on the item config.
459-462
: Data setting looks good.The
set_taxonomy_field_value
method correctly sets the WP taxonomy terms based on the item config.
483-486
: Data setting looks good.The
set_meta_field_value
method correctly sets the WP meta data based on the item config.
508-511
: Data setting looks good.The
set_media_field_value
method correctly sets the WP media destination based on the item config.
548-552
: Logic looks good.The
maybe_append
method correctly implements the logic to append or set data based on the field type.
571-580
: Sanitization looks good.The
sanitize_post_field
method correctly sanitizes the post field value.
620-622
: Term extraction looks good.The
get_element_terms
method correctly gets the terms from the current item element object.
668-668
: Sanitization looks good.The
sanitize_element_meta
method correctly sanitizes the element value when stored as post-meta.
684-684
: Sanitization looks good.The
sanitize_element_media
method correctly sanitizes the element media.
697-700
: Attachment handling looks good.The
sideload_attachments
method correctly sideloads the attachments and sends them to the requested location.wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.js (4)
577-577
: Update action name to match new convention.Ensure the action name is updated to
gc_fetch_js_post
.Verification successful
Update action name to match new convention.
The action name
gc_fetch_js_post
is correctly used in the codebase. No instances of the old action namecwby_
were found.
wp-content/plugins/gathercontent-import/assets/js/gathercontent-single.js
wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.js
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all action names match the new convention. # Test: Search for the old action names. Expect: No occurrences of old action names. rg --type js $'cwby_'Length of output: 20
Script:
#!/bin/bash # Description: Verify all instances of the new action name `gc_fetch_js_post`. # Test: Search for the new action name. Expect: Occurrences of `gc_fetch_js_post`. rg --type js 'gc_fetch_js_post'Length of output: 41288
736-736
: Update action name to match new convention.Ensure the action name is updated to
gc_save_mapping_id
.Verification successful
Action name updated successfully.
The action name
gc_save_mapping_id
is consistently used across the JavaScript files in the codebase.
wp-content/plugins/gathercontent-import/assets/js/gathercontent-single.js
wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.js
wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.min.js
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all action names match the new convention. # Test: Search for the old action names. Expect: No occurrences of old action names. rg --type js $'cwby_'Length of output: 20
Script:
#!/bin/bash # Description: Verify the usage of the new action name `gc_save_mapping_id`. # Test: Search for occurrences of the new action name in JavaScript files. rg --type js 'gc_save_mapping_id'Length of output: 41198
1053-1053
: Update action name to match new convention.Ensure the action name is updated to
gc_pull_items
.Verification successful
Action name updated correctly.
The action name
gc_pull_items
has been updated to match the new convention as requested.
- Files updated:
wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.js
wp-content/plugins/gathercontent-import/assets/js/gathercontent-general.min.js
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all action names match the new convention. # Test: Search for the old action names. Expect: No occurrences of old action names. rg --type js $'cwby_'Length of output: 20
Script:
#!/bin/bash # Description: Verify the new action name `gc_pull_items` is used correctly and consistently. # Search for the usage of the new action name `gc_pull_items` in JavaScript files rg --type js $'gc_pull_items'Length of output: 27829
771-771
: Update action name to match new convention.Ensure the action name is updated to
gc_wp_filter_mappings
.Verification successful
Action name
gc_wp_filter_mappings
follows the new convention.The action name
gc_wp_filter_mappings
is consistent with other action names used in thegathercontent-import
plugin. No further changes are necessary.
- Action names found in the
gathercontent-import
plugin include:
gc_sync_items
gc_save_mapping_id
gc_wp_filter_mappings
gc_get_post_statuses
gc_disconnect_post
gc_pull_items
gc_get_posts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all action names match the new convention. # Test: Search for the old action names. Expect: No occurrences of old action names. rg --type js $'cwby_'Length of output: 20
Script:
#!/bin/bash # Description: Verify all action names in the codebase to ensure they follow the new convention. # Test: Search for all action names in JavaScript files and check if they follow the new convention. rg --type js $'action: 'Length of output: 160032
* @param strin $message Exception message. | ||
* @param int $code Exception code. | ||
* @param mixed $data Additional data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in docstring.
The @param
tag for $message
has a typo. It should be string
instead of strin
.
- * @param strin $message Exception message.
+ * @param string $message Exception message.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* @param strin $message Exception message. | |
* @param int $code Exception code. | |
* @param mixed $data Additional data. | |
* @param string $message Exception message. | |
* @param int $code Exception code. | |
* @param mixed $data Additional data. |
protected $base_url = 'https://api.gathercontent.com/'; | ||
protected $user = ''; | ||
protected $api_key = ''; | ||
protected $only_cached = false; | ||
protected $reset_request_cache = false; | ||
protected $disable_cache = false; | ||
protected $last_response = false; | ||
protected $disable_cache = false; | ||
protected $last_response = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider initializing properties in the constructor.
Initializing class properties directly in the constructor enhances readability and maintainability.
public function __construct( \WP_Http $http ) {
parent::__construct();
$this->http = $http;
$this->base_url = 'https://api.gathercontent.com/';
$this->user = '';
$this->api_key = '';
$this->only_cached = false;
$this->reset_request_cache = false;
$this->disable_cache = $this->_get_val( 'flush_cache' ) && 'false' !== $this->_get_val( 'flush_cache' );
if ( ! $this->disable_cache ) {
$this->disable_cache = $this->_post_val( 'flush_cache' ) && 'false' !== $this->_post_val( 'flush_cache' );
}
}
@@ -1,8 +1,8 @@ | |||
/** | |||
* Content Workflow (by Bynder) - v1.0.0 - 2024-06-25 | |||
* | |||
* GatherContent Plugin - v3.1.13 - 2022-01-31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove redundant "use strict" directive.
The entire contents of JavaScript modules are automatically in strict mode, making this directive unnecessary.
- 'use strict';
Also applies to: 5-5
* | ||
* Copyright (c) 2024 Content Workflow (by Bynder) | ||
* Copyright (c) 2022 GatherContent | ||
* Licensed under the GPLv2 license. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove redundant 'use strict' directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
- 'use strict';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
@@ -1,8 +1,8 @@ | |||
/** | |||
* Content Workflow (by Bynder) - v1.0.0 - 2024-06-25 | |||
* | |||
* GatherContent Plugin - v3.1.13 - 2022-01-31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove redundant 'use strict' directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
- 'use strict';
Committable suggestion was skipped due to low confidence.
### 3.2.3 ### | ||
* Update change log and readme, forgotten during previous tag | ||
|
||
### 3.2.2 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.2.2 ###
* Fixed syntax error, causing issue during install
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
### 3.2.2 ### | |
### 3.2.2 ### | |
* Fixed syntax error, causing issue during install |
Tools
Markdownlint
108-108: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
### 3.2.16 ### | ||
* Reformatting version file | ||
|
||
### 3.2.15 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.2.15 ###
* Updated the readme.txt to include testing up to WordPress 6.1
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
### 3.2.15 ### | |
### 3.2.15 ### | |
* Updated the readme.txt to include testing up to WordPress 6.1 |
Tools
Markdownlint
68-68: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
### 3.2.5 ### | ||
* Fixed issue for PHP8 and Yoast SEO compatibility | ||
|
||
### 3.2.4 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.2.4 ###
* Updated readme.txt stable tag version and changelog
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
102-102: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
### 3.1.10 ### | ||
* Fix push to GatherContent for new and old editor | ||
|
||
### 3.1.9 ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure headings are surrounded by blank lines.
Headings should be surrounded by blank lines.
### 3.1.9 ###
* Fix the 3rd param passed to `Pull::sanitize_post_field()`, which needs to be the entire post data array.
* Updated the help centre links.
* Fixed quoted attributes (like alt text) for the pseudo-shortcodes used for media in the GatherContent content, e.g. `[media-1 align=right linkto=file alt="This will go to the image alt tag"]`
* Allow using new shortcode syntax (like `[media_2-1]`) to include media from multiple media fields in GatherContent mapped to the content or excerpt. The original syntax will continue to work (e.g. `[media-1]`), but will be assumed to be the first media field, and will be the same as using the new syntax, `[media_1-1]`.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
### 3.1.9 ### | |
### 3.1.9 ### | |
* Fix the 3rd param passed to `Pull::sanitize_post_field()`, which needs to be the entire post data array. | |
* Updated the help centre links. | |
* Fixed quoted attributes (like alt text) for the pseudo-shortcodes used for media in the GatherContent content, e.g. `[media-1 align=right linkto=file alt="This will go to the image alt tag"]` | |
* Allow using new shortcode syntax (like `[media_2-1]`) to include media from multiple media fields in GatherContent mapped to the content or excerpt. The original syntax will continue to work (e.g. `[media-1]`), but will be assumed to be the first media field, and will be the same as using the new syntax, `[media_1-1]`. |
Tools
Markdownlint
136-136: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines(MD022, blanks-around-headings)
printf( | ||
'<div id="message" class="error"><p>%s</p></div>', | ||
__( 'Sorry, the GatherContent plugin requires a minimum PHP version of 5.3. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' ) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the PHP version requirement in the error message.
The error message mentions a minimum PHP version of 5.3, but the plugin requires PHP 7.0. Update the error message to reflect the correct version.
- __( 'Sorry, the GatherContent plugin requires a minimum PHP version of 5.3. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' )
+ __( 'Sorry, the GatherContent plugin requires a minimum PHP version of 7.0. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' )
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
printf( | |
'<div id="message" class="error"><p>%s</p></div>', | |
__( 'Sorry, the GatherContent plugin requires a minimum PHP version of 5.3. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' ) | |
); | |
printf( | |
'<div id="message" class="error"><p>%s</p></div>', | |
__( 'Sorry, the GatherContent plugin requires a minimum PHP version of 7.0. Please contact your host and ask them to upgrade. For convenience, you can use the note provided on the WordPress recommended host supports page: <a href="https://wordpress.org/about/requirements/">https://wordpress.org/about/requirements/</a>', 'gathercontent-import' ) | |
); |
Summary by CodeRabbit
New Features
Bug Fixes
Improvements
Refactor
Documentation