-
Notifications
You must be signed in to change notification settings - Fork 21
Fix/gallary block scripts #1428
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?
Conversation
Right now scripts enqued using wp_enqueue_script/style function are only enqueued dynamically forms are still not working
…godam video player
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.
| $src .= $separator . 'ver=' . $obj->ver; | ||
| } | ||
|
|
||
| // Recursively expand dependencies |
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).
| * @param string $type Asset type ('script' or 'style'). | ||
| * @return array Array of expanded assets with full dependency data. | ||
| */ | ||
| function godam_expand_assets( $handles, $type = 'script' ) { |
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: Visibility must be declared on method "godam_expand_assets" (Squiz.Scope.MethodScope.Missing).
| * @return array Array of expanded assets with full dependency data. | ||
| */ | ||
| function godam_expand_assets( $handles, $type = 'script' ) { | ||
| $assets = 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.
| */ | ||
| function godam_expand_assets( $handles, $type = 'script' ) { | ||
| $assets = array(); | ||
| $visited = 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.
| } | ||
|
|
||
| return $assets; | ||
| } |
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 after function; 2 found (Squiz.WhiteSpace.FunctionSpacing.After).
| } | ||
|
|
||
|
|
||
| public function godam_render_shortcode_with_assets( $request ) { |
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 godam_render_shortcode_with_assets() (Squiz.Commenting.FunctionComment.Missing).
| ); | ||
| } | ||
|
|
||
| // Snapshot BEFORE |
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).
| // Snapshot BEFORE | ||
| $before = $this->godam_capture_assets(); | ||
|
|
||
| // Render shortcode |
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).
| */ | ||
| do_action( 'wp_enqueue_scripts' ); | ||
|
|
||
| // Snapshot AFTER |
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).
| // Snapshot AFTER | ||
| $after = $this->godam_capture_assets(); | ||
|
|
||
| // Diff |
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).
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.
|
|
||
| // Diff | ||
| $scripts = array_values( array_diff( $after['scripts'], $before['scripts'] ) ); | ||
| $styles = array_values( array_diff( $after['styles'], $before['styles'] ) ); |
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 space after comma in argument list; 2 found (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma).
| $scripts = array_values( array_diff( $after['scripts'], $before['scripts'] ) ); | ||
| $styles = array_values( array_diff( $after['styles'], $before['styles'] ) ); | ||
|
|
||
| // Expand assets to get full URLs and metadata |
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).
| $expanded_scripts = $this->godam_expand_assets( $scripts, 'script' ); | ||
| $expanded_styles = $this->godam_expand_assets( $styles, 'style' ); | ||
|
|
||
| return [ |
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: Short array syntax is not allowed (Universal.Arrays.DisallowShortArraySyntax.Found).
| $expanded_styles = $this->godam_expand_assets( $styles, 'style' ); | ||
|
|
||
| return [ | ||
| 'status' => '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.
|
|
||
| return [ | ||
| 'status' => 'success', | ||
| 'html' => $html, |
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 [ | ||
| 'status' => 'success', | ||
| 'html' => $html, | ||
| 'title' => get_the_title( $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.
| 'status' => 'success', | ||
| 'html' => $html, | ||
| 'title' => get_the_title( $id ), | ||
| 'date' => get_the_date( 'F j, Y', $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.
| 'html' => $html, | ||
| 'title' => get_the_title( $id ), | ||
| 'date' => get_the_date( 'F j, Y', $id ), | ||
| 'assets' => [ |
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.
| 'html' => $html, | ||
| 'title' => get_the_title( $id ), | ||
| 'date' => get_the_date( 'F j, Y', $id ), | ||
| 'assets' => [ |
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: Short array syntax is not allowed (Universal.Arrays.DisallowShortArraySyntax.Found).
| 'styles' => $expanded_styles, | ||
| ], | ||
| ]; | ||
| } |
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 after function; 3 found (Squiz.WhiteSpace.FunctionSpacing.After).
🔍 WordPress Plugin Check Report
📊 Report
❌ Errors (1)📁 inc/classes/rest-api/class-dynamic-shortcode.php (1 error)
|
| 📍 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=1 (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=2 (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=1 (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=2 (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
No description provided.