-
Notifications
You must be signed in to change notification settings - Fork 19
Feature/issue/958 #1406
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
base: develop
Are you sure you want to change the base?
Feature/issue/958 #1406
Conversation
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 11 errors
Powered by rtCamp's GitHub Actions Library
Posting will continue in further review(s)
| * | ||
| * @since 1.0.0 | ||
| */ | ||
| public function __construct() { |
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.
🚫 Error: Expected 1 blank line before function; 0 found (Squiz.WhiteSpace.FunctionSpacing.BeforeFirst).
| add_action( 'delete_attachment', array( $this, 'rtgodam_delete_media_versions' ), 10 ); | ||
| } | ||
|
|
||
| public function rtgodam_add_attachment_version_field( $form_fields, $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.
🚫 Error: Missing doc comment for function rtgodam_add_attachment_version_field() (Squiz.Commenting.FunctionComment.Missing).
| return $form_fields; | ||
| } | ||
|
|
||
| public function rtgodam_create_media_versions( $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_create_media_versions() (Squiz.Commenting.FunctionComment.Missing).
| $this->rtgodam_add_media_version_meta_data_for_origin( $attachment_id, $origin_post_id ); | ||
| } | ||
|
|
||
| public function rtgodam_add_media_version_meta_data_for_origin( $attachment_id, $origin_post_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_media_version_meta_data_for_origin() (Squiz.Commenting.FunctionComment.Missing).
| update_post_meta( $origin_post_id, 'rtgodam_media_versions', $origin_post_versions ); | ||
| } | ||
|
|
||
| public function rtgodam_update_media_versions( $response, $attachment, $meta ) { |
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_post_meta( $origin_post_id, 'rtgodam_media_versions', $origin_post_versions ); | ||
| } | ||
|
|
||
| public function rtgodam_update_media_versions( $response, $attachment, $meta ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_update_media_versions() (Squiz.Commenting.FunctionComment.Missing).
| return $response; | ||
| } | ||
|
|
||
| public function rtgodam_create_media_version_for_origin( $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_create_media_version_for_origin() (Squiz.Commenting.FunctionComment.Missing).
| add_post_meta( $attachment_id, 'rtgodam_attachment_base_version', $new_attachment_id ); | ||
| } | ||
|
|
||
| public function rtgodam_replace_attachment_version( $post, $attachment_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.
🚫 Error: Missing doc comment for function rtgodam_replace_attachment_version() (Squiz.Commenting.FunctionComment.Missing).
| return $post; | ||
| } | ||
|
|
||
| public function rtgodam_delete_media_versions( $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_delete_media_versions() (Squiz.Commenting.FunctionComment.Missing).
| } | ||
| } | ||
|
|
||
| public function rtgodam_disable_intermediate_image_sizes_advanced_media_versions( $sizes, $metadata, $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_disable_intermediate_image_sizes_advanced_media_versions() (Squiz.Commenting.FunctionComment.Missing).
rtBot
left a comment
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.
Previous scan continued.
| return $sizes; | ||
| } | ||
|
|
||
| public function rtgoam_remove_attachment_files_only( $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgoam_remove_attachment_files_only() (Squiz.Commenting.FunctionComment.Missing).
| delete_post_meta( $attachment_id, '_wp_attachment_metadata' ); | ||
| } | ||
|
|
||
| public function rtgodam_check_media_versions_eligibility( $file ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_check_media_versions_eligibility() (Squiz.Commenting.FunctionComment.Missing).
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
missing_composer_json_file | The "/vendor" directory using composer exists, but "composer.json" file is missing. |
📁 readme.txt (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
mismatched_plugin_name | Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM". |
0 |
trademarked_term | The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name. |
📁 inc/classes/media-library/class-media-folder-utils.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
91 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $where_clause used in $wpdb->get_var($wpdb->prepare(\n\t\t\t\t"\n\t\t\tSELECT COUNT(DISTINCT p.ID)\n\t\t\tFROM {$wpdb->posts} p\n\t\t\tINNER JOIN {$wpdb->term_relationships} tr ON p.ID = tr.object_id\n\t\t\tINNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id = tt.term_taxonomy_id\n\t\t\tWHERE {$where_clause}\n\t\t",\n\t\t\t\t$query_params\n\t\t\t))\n$where_clause assigned unsafely at line 82:\n $where_clause .= ' AND p.post_mime_type LIKE %s'\n$query_params[] used without escaping.\n$mime_type used without escaping. |
📁 assets/build/css/main.css (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedStylesScope | This style is being loaded in all contexts. |
📁 assets/src/libs/analytics.min.js (6 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?p=4 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?page_id=5 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?attachment_id=6 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?godam-video=demo-godam-video-post (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
📁 assets/build/js/main.min.js (6 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?p=4 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?page_id=5 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?attachment_id=6 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?godam-video=demo-godam-video-post (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 4 errors
Powered by rtCamp's GitHub Actions Library
| */ | ||
| public function __construct() { | ||
| add_filter( 'attachment_fields_to_edit', array( $this, 'rtgodam_add_attachment_version_field' ), 10, 2 ); | ||
| // add_filter( 'attachment_fields_to_save', array( $this, 'rtgodam_replace_attachment_version' ), 10, 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.
| */ | ||
| public function __construct() { | ||
| add_filter( 'attachment_fields_to_edit', array( $this, 'rtgodam_add_attachment_version_field' ), 10, 2 ); | ||
| // add_filter( 'attachment_fields_to_save', array( $this, 'rtgodam_replace_attachment_version' ), 10, 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.
🚫 Error: Inline comments must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar).
| add_action( 'attachment_updated', array( $this, 'rtgodam_replace_attachment_version' ), 10, 2 ); | ||
| } | ||
|
|
||
| public function admin_enqueues( $hook_suffix ) { |
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_action( 'attachment_updated', array( $this, 'rtgodam_replace_attachment_version' ), 10, 2 ); | ||
| } | ||
|
|
||
| public function admin_enqueues( $hook_suffix ) { |
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.
🚫 Error: Missing doc comment for function admin_enqueues() (Squiz.Commenting.FunctionComment.Missing).
| wp_enqueue_script( 'rtgodam-media-version-admin' ); | ||
| } | ||
|
|
||
| public function rtgodam_check_attachment_edit_page( $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.
🚫 Error: Missing doc comment for function rtgodam_check_attachment_edit_page() (Squiz.Commenting.FunctionComment.Missing).
| add_post_meta( $attachment_id, 'rtgodam_attachment_base_version', $new_attachment_id ); | ||
| } | ||
|
|
||
| public function rtgodam_replace_attachment_version( $attachment_id, $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.
🚫 Error: Missing doc comment for function rtgodam_replace_attachment_version() (Squiz.Commenting.FunctionComment.Missing).
| return; | ||
| } | ||
|
|
||
| $attachment_data = filter_input( INPUT_POST, 'attachments', FILTER_DEFAULT, FILTER_REQUIRE_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.
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 6 errors
Powered by rtCamp's GitHub Actions Library
| return $file; | ||
| } | ||
|
|
||
| public function rtgodam_flush_media_cache_for_version( $block_content, $block, $instance ) { |
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.
| return $file; | ||
| } | ||
|
|
||
| public function rtgodam_flush_media_cache_for_version( $block_content, $block, $instance ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_flush_media_cache_for_version() (Squiz.Commenting.FunctionComment.Missing).
| ); | ||
| } | ||
|
|
||
| public function rtgodam_add_version_to_url( string $url, ?string $ver ): string { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_version_to_url() (Squiz.Commenting.FunctionComment.Missing).
| return add_query_arg( 'version', rawurlencode( $ver ), $url ); | ||
| } | ||
|
|
||
| public function rtgoam_get_media_version_from_attachment( $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgoam_get_media_version_from_attachment() (Squiz.Commenting.FunctionComment.Missing).
| return rawurlencode( $version ); | ||
| } | ||
|
|
||
| public function rtgodam_add_media_version_to_attachment( $url, $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_media_version_to_attachment() (Squiz.Commenting.FunctionComment.Missing).
| return $this->rtgodam_add_version_to_url( $url, $version ); | ||
| } | ||
|
|
||
| public function rtgodam_add_media_version_to_image( $image, $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_media_version_to_image() (Squiz.Commenting.FunctionComment.Missing).
| return $image; | ||
| } | ||
|
|
||
| public function rtgodam_add_media_version_to_image_srcset( $sources, $size_array, $image_src, $image_meta, $attachment_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_media_version_to_image_srcset() (Squiz.Commenting.FunctionComment.Missing).
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 1 error
Powered by rtCamp's GitHub Actions Library
| return $sources; | ||
| } | ||
|
|
||
| public function rtgodam_add_media_version_to_godam_player_block_attributes( $attributes ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_media_version_to_godam_player_block_attributes() (Squiz.Commenting.FunctionComment.Missing).
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 3 errors
Powered by rtCamp's GitHub Actions Library
| return $attributes; | ||
| } | ||
|
|
||
| public function rtgodam_delete_attachment_version() { |
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.
🚫 Error: Missing doc comment for function rtgodam_delete_attachment_version() (Squiz.Commenting.FunctionComment.Missing).
| $this->rtgodam_show_message( 'version-removed' ); | ||
| } | ||
|
|
||
| public function rtgodam_show_message( $type ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_show_message() (Squiz.Commenting.FunctionComment.Missing).
| exit; | ||
| } | ||
|
|
||
| public function rtgodam_admin_notices() { |
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.
🚫 Error: Missing doc comment for function rtgodam_admin_notices() (Squiz.Commenting.FunctionComment.Missing).
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 1 error
Powered by rtCamp's GitHub Actions Library
| printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) ); | ||
| } | ||
|
|
||
| public function rtgodam_disable_media_version_feature( $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.
🚫 Error: Missing doc comment for function rtgodam_disable_media_version_feature() (Squiz.Commenting.FunctionComment.Missing).
9e8f590 to
5b65b0d
Compare
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 2 errors
Powered by rtCamp's GitHub Actions Library
| return true; | ||
| } | ||
|
|
||
| $current_user_id = get_current_user_id(); |
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.
| } | ||
| } | ||
|
|
||
| public function rtgodam_add_media_replacement_enable_setting_for_user( $user ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_media_replacement_enable_setting_for_user() (Squiz.Commenting.FunctionComment.Missing).
| <?php | ||
| } | ||
|
|
||
| public function rtgodam_update_media_replacement_enable_setting_for_user( $user_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_update_media_replacement_enable_setting_for_user() (Squiz.Commenting.FunctionComment.Missing).
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 2 errors
Powered by rtCamp's GitHub Actions Library
| } | ||
| } | ||
|
|
||
| public function rtgodam_add_media_replacement_enable_setting_for_user( $user ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_media_replacement_enable_setting_for_user() (Squiz.Commenting.FunctionComment.Missing).
| <?php | ||
| } | ||
|
|
||
| public function rtgodam_update_media_replacement_enable_setting_for_user( $user_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_update_media_replacement_enable_setting_for_user() (Squiz.Commenting.FunctionComment.Missing).
5b65b0d to
cf418b8
Compare
rtBot
left a comment
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.
Code analysis identified issues
action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.
phpcs scanning turned up:
🚫 2 errors
Powered by rtCamp's GitHub Actions Library
| } | ||
| } | ||
|
|
||
| public function rtgodam_add_media_replacement_enable_setting_for_user( $user ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_add_media_replacement_enable_setting_for_user() (Squiz.Commenting.FunctionComment.Missing).
| <?php | ||
| } | ||
|
|
||
| public function rtgodam_update_media_replacement_enable_setting_for_user( $user_id ) { |
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.
🚫 Error: Missing doc comment for function rtgodam_update_media_replacement_enable_setting_for_user() (Squiz.Commenting.FunctionComment.Missing).
No description provided.