Skip to content

Commit e05074a

Browse files
committed
Added Dependabot for GitHub Actions
1 parent 397ae8c commit e05074a

5 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Configures Dependabot to update packages used in GitHub Actions
2+
# https://docs.github.com/en/code-security/how-tos/secure-your-supply-chain/secure-your-dependencies/keeping-your-actions-up-to-date-with-dependabot
3+
version: 2
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"

.github/workflows/coding-standards.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
# @see: https://github.com/actions/virtual-environments
2020
runs-on: ubuntu-latest
2121

22+
# Don't run if the PR is from Dependabot, as it doesn't have access to the repository's secrets.
23+
# Dependabot also only checks for GitHub action dependencies, so it's not necessary to run
24+
# Plugin tests.
25+
if: github.actor != 'dependabot[bot]'
26+
2227
# Environment Variables.
2328
# Accessible by using ${{ env.NAME }}
2429
# Use ${{ secrets.NAME }} to include any GitHub Secrets in ${{ env.NAME }}

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
# @see: https://github.com/actions/virtual-environments
2020
runs-on: ubuntu-latest
2121

22+
# Don't run if the PR is from Dependabot, as it doesn't have access to the repository's secrets.
23+
# Dependabot also only checks for GitHub action dependencies, so it's not necessary to run
24+
# Plugin tests.
25+
if: github.actor != 'dependabot[bot]'
26+
2227
# Environment Variables.
2328
# Accessible by using ${{ env.NAME }}
2429
# Use ${{ secrets.NAME }} to include any GitHub Secrets in ${{ env.NAME }}

_modules/dashboard/js/min/tinymce-modal-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_modules/dashboard/js/tinymce-modal.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jQuery( document ).ready(
5555
var form = $( 'form.wpzinc-tinymce-popup' );
5656

5757
// Build Shortcode.
58-
var shortcode = '[' + $( 'input[name="shortcode"]', $( form ) ).val(),
59-
shortcodeClose = ( $( 'input[name="close_shortcode"]', $( form ) ).val() == '1' ? true : false );
58+
var shortcode = '[' + $( 'input[name="shortcode"]', $( form ) ).val(),
59+
shortcodeEnclosedContent = false;
6060

6161
$( 'input, select, textarea', $( form ) ).each(
6262
function ( i ) {
@@ -113,6 +113,12 @@ jQuery( document ).ready(
113113
val = val.trim();
114114
}
115115

116+
// Skip if the shortcode attribute will be enclosed in the shortcode content.
117+
if ( $( this ).data( 'enclose' ) == '1' ) {
118+
shortcodeEnclosedContent = val;
119+
return true;
120+
}
121+
116122
// Append attribute and value to shortcode string.
117123
shortcode += ' ' + key.trim() + '="' + val + '"';
118124
}
@@ -121,9 +127,9 @@ jQuery( document ).ready(
121127
// Close Shortcode.
122128
shortcode += ']';
123129

124-
// If the shortcode includes a closing element, append it now.
125-
if ( shortcodeClose ) {
126-
shortcode += '[/' + $( 'input[name="shortcode"]', $( form ) ).val() + ']';
130+
// If the shortcode includes enclosed content, append it now and close the shortcode.
131+
if ( shortcodeEnclosedContent ) {
132+
shortcode += shortcodeEnclosedContent + '[/' + $( 'input[name="shortcode"]', $( form ) ).val() + ']';
127133
}
128134

129135
// Depending on the editor type, insert the shortcode.

0 commit comments

Comments
 (0)