Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const SCOPE_ICONS: Record<SnippetCodeScope, string> = {
'admin-css': 'dashboard',
'site-css': 'admin-customizer',
'site-head-js': 'media-code',
'site-body-js': 'media-code',
'site-footer-js': 'media-code'
}

Expand All @@ -35,7 +34,6 @@ const SCOPE_DESCRIPTIONS: Record<SnippetCodeScope, string> = {
'site-css': __('Site front-end', 'code-snippets'),
'admin-css': __('Administration area', 'code-snippets'),
'site-head-js': __('In site header (<head> section)', 'code-snippets'),
'site-body-js': __('In site content (start of <body>)', 'code-snippets'),
'site-footer-js': __('In site footer (end of <body>)', 'code-snippets')
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/types/Snippet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export const SNIPPET_TYPE_SCOPES = <const> {
php: ['global', 'admin', 'front-end', 'single-use'],
html: ['content', 'head-content', 'body-content', 'footer-content'],
css: ['admin-css', 'site-css'],
js: ['site-head-js', 'site-body-js', 'site-footer-js'],
js: ['site-head-js', 'site-footer-js'],
cond: ['condition']
}
5 changes: 1 addition & 4 deletions src/php/Model/Snippet.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public static function get_all_scopes(): array {
'global', 'admin', 'front-end', 'single-use',
'content', 'head-content', 'body-content', 'footer-content',
'admin-css', 'site-css',
'site-head-js', 'site-body-js', 'site-footer-js',
'site-head-js', 'site-footer-js',
'condition',
);
}
Expand All @@ -337,7 +337,6 @@ public static function get_scope_icons(): array {
'admin-css' => 'dashboard',
'site-css' => 'admin-customizer',
'site-head-js' => 'media-code',
'site-body-js' => 'media-code',
'site-footer-js' => 'media-code',
'condition' => 'randomize',
);
Expand Down Expand Up @@ -373,8 +372,6 @@ protected function get_scope_name(): string {
return __( 'Front-end styles', 'code-snippets' );
case 'site-head-js':
return __( 'Head scripts', 'code-snippets' );
case 'site-body-js':
return __( 'Body scripts', 'code-snippets' );
case 'site-footer-js':
return __( 'Footer scripts', 'code-snippets' );
}
Expand Down
1 change: 0 additions & 1 deletion src/php/Utils/i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
'site-css' => __( 'Site front-end stylesheet', 'code-snippets' ),
'admin-css' => __( 'Administration area stylesheet', 'code-snippets' ),
'site-head-js' => __( 'JavaScript loaded in the site &amp;lt;head&amp;gt; section', 'code-snippets' ),
'site-body-js' => __( 'JavaScript loaded at the start of the &amp;lt;body&amp;gt; tag', 'code-snippets' ),
'site-footer-js' => __( 'JavaScript loaded at the end of the &amp;lt;body&amp;gt; tag', 'code-snippets' ),
'head-content' => __( 'HTML output in the &amp;lt;head&amp;gt; section', 'code-snippets' ),
'body-content' => __( 'HTML output at the start of the &amp;lt;body&amp;gt; tag', 'code-snippets' ),
Expand Down
Loading