-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bulk scan/fix for insecure content from the admin #112
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9416685
Initial commit
kmgalanakis 50b2b85
Fix eslint errors
kmgalanakis 4ec530d
Merge branch 'develop' into feature/bulk-scan-fix-from-admin
peterwilsoncc 459e817
Fix suggestion in the PR
kmgalanakis 1820101
Merge branch 'develop' into feature/bulk-scan-fix-from-admin
kmgalanakis df6ab38
Include jQuery to any module that needs it, further booletproof the R…
kmgalanakis d2b6321
Exclude posts from post types not shown in REST when fixing insecure …
kmgalanakis 0bda620
Fixing further suggestions in the PR.
kmgalanakis bf5af8e
Merge branch 'develop' into feature/bulk-scan-fix-from-admin
peterwilsoncc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ src/js/shared/vendor | |
gulp-tasks/ | ||
webpack.config.babel.js | ||
gulpfile.babel.js | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
env: { jquery: true }, | ||
extends: ['@10up/eslint-config/wordpress'], | ||
rules: { | ||
'react/no-array-index-key': 'off', | ||
'jsdoc/newline-after-description': 'off', | ||
"react/jsx-indent" : ["error", 0], | ||
"react/jsx-indent-props" : ["error", 0], | ||
}, | ||
globals: { | ||
module: true, | ||
process: true, | ||
wp: true, | ||
jquery: true, | ||
tinyMCE: true, | ||
insecureContentAdmin: true, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/** | ||
* Insecure Content Warning assets | ||
* | ||
* @package ICW | ||
*/ | ||
|
||
namespace ICW\Admin; | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; // Exit if accessed directly. | ||
} | ||
|
||
/** | ||
* Setup actions and filters | ||
*/ | ||
function setup() { | ||
add_action( 'admin_menu', __NAMESPACE__ . '\\admin_menu' ); | ||
} | ||
|
||
/** | ||
* Register the admin menu. | ||
* | ||
* @return void | ||
*/ | ||
function admin_menu() { | ||
$hook = add_management_page( | ||
__( 'Insecure Content Warning Admin', 'insecure-content-warning' ), | ||
__( 'Insecure Content Warning', 'insecure-content-warning' ), | ||
'install_plugins', | ||
'insecure-content-warning', | ||
__NAMESPACE__ . '\\admin_page' | ||
); | ||
|
||
add_action( 'admin_print_scripts-' . $hook, 'ICW\Assets\admin_scripts' ); | ||
} | ||
|
||
/** | ||
* Load the admin page template. | ||
* | ||
* @return void | ||
*/ | ||
function admin_page() { | ||
require_once __DIR__ . '/partials/admin-page.php'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As a general capability, this seems closes to what the page is doing.
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.
Good point, thank you!