-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
333708b
commit fda2705
Showing
12 changed files
with
228 additions
and
87 deletions.
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"require-dev": { | ||
"phpunit/phpunit": "^6.5.6" | ||
"yoast/phpunit-polyfills": "^3.1" | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
<div class="wp-revision-list-help"> | ||
|
||
<h3 class="title"><?php _e( 'Contact', 'wp-revision-list' ); ?></h3> | ||
<h3 class="title"><?php esc_html_e( 'Contact', 'wp-revision-list' ); ?></h3> | ||
<p> | ||
<?php esc_html_e( 'E-Mail', 'wp-revision-list' ) ?>: <a href="mailto:[email protected]">[email protected]</a><br/> | ||
<?php esc_html_e( 'Twitter', 'wp-revision-list' ) ?>: <a href="https://twitter.com/CodeGeekATX">@CodeGeekATX</a><br/> | ||
|
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,79 @@ | ||
<?php | ||
/** | ||
* Sanitize helper function to retrive values from $_GET, $_POST, etc. | ||
*/ | ||
|
||
namespace WPRevisionList\Sanitizers; | ||
|
||
/** | ||
* Gets a sanitized text field from an array. Defaults to sanitize_text_field(). | ||
* | ||
* @param string $field The field name. | ||
* @param array $array The request array ($_POST, $_GET, etc). | ||
* @param mixed $sanitizer The filter constant or array with callback options. | ||
* @return string | ||
*/ | ||
function sanitized_array_field( $field, $array, $sanitizer = false ) { | ||
|
||
if ( false === $sanitizer ) { | ||
$sanitizer = filter_sanitize_text_field(); | ||
} | ||
|
||
$request = filter_var_array( $array, [ $field => $sanitizer ] ); | ||
return $request[ $field ]; | ||
} | ||
|
||
/** | ||
* Callback filter for filter_var_array() to sanitize a text field. | ||
* | ||
* @return array | ||
*/ | ||
function filter_sanitize_text_field() { | ||
return [ | ||
'filter' => FILTER_CALLBACK, | ||
'options' => '\sanitize_text_field', | ||
]; | ||
} | ||
|
||
/** | ||
* Gets a sanitized text field from the $_POST variable. | ||
* | ||
* @param string $field The POST field name. | ||
* @return string | ||
*/ | ||
function sanitized_post_field( $field ) { | ||
return sanitized_array_field( $field, $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing | ||
} | ||
|
||
/** | ||
* Gets a sanitized text field from the $_GET variable. | ||
* | ||
* @param string $field The GET field name. | ||
* @return string | ||
*/ | ||
function sanitized_get_field( $field ) { | ||
return sanitized_array_field( $field, $_GET ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended | ||
} | ||
|
||
/** | ||
* Gets the REQUEST_URI from the $_SERVER variable. | ||
* | ||
* @return string | ||
*/ | ||
function get_request_uri() { | ||
return sanitized_array_field( 'REQUEST_URI', $_SERVER ); | ||
} | ||
|
||
/** | ||
* Gets a sanitized text array from the $_POST variable. | ||
* | ||
* @param string $field The POST field name. | ||
* @return string | ||
*/ | ||
function sanitized_post_array( $field ) { | ||
$filter_string = filter_sanitize_text_field(); | ||
$filter_string['flags'] = FILTER_REQUIRE_ARRAY; | ||
|
||
$array = sanitized_array_field( $field, $_POST, $filter_string ); // phpcs:ignore WordPress.Security.NonceVerification.Missing | ||
return is_array( $array ) ? $array : []; | ||
} |
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 |
---|---|---|
@@ -1,69 +1,69 @@ | ||
# Copyright (C) 2018 Pete Nelson <a href="https://twitter.com/CodeGeekATX">(@CodeGeekATX)</a> | ||
# Copyright (C) 2025 Pete Nelson <a href="https://twitter.com/CodeGeekATX">(@CodeGeekATX)</a> | ||
# This file is distributed under the same license as the WP Revision List package. | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: WP Revision List 1.1.8\n" | ||
"Project-Id-Version: WP Revision List 1.1.9\n" | ||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-revision-list\n" | ||
"POT-Creation-Date: 2018-12-16 16:27:38+00:00\n" | ||
"POT-Creation-Date: 2025-01-13 20:56:54+00:00\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n" | ||
"PO-Revision-Date: 2025-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"X-Generator: grunt-wp-i18n1.0.2\n" | ||
"X-Generator: grunt-wp-i18n 1.0.3\n" | ||
|
||
#: includes/class-wp-revision-list-screen-options.php:38 | ||
#: includes/class-wp-revision-list-screen-options.php:40 | ||
#: release/includes/class-wp-revision-list-screen-options.php:38 | ||
msgid "Number of revisions to display:" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:46 | ||
#: includes/class-wp-revision-list-settings.php:48 | ||
#: release/includes/class-wp-revision-list-settings.php:46 | ||
msgid "" | ||
"<strong>Revision List activated!</strong> Please <a href=\"%s\">visit the " | ||
"Settings page</a> to customize your revision list." | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:68 | ||
#: includes/class-wp-revision-list-settings.php:70 | ||
#: release/includes/class-wp-revision-list-settings.php:68 | ||
msgid "General" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:76 | ||
#: includes/class-wp-revision-list-settings.php:78 | ||
#: release/includes/class-wp-revision-list-settings.php:76 | ||
msgid "Default number of revisions to display" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:77 | ||
#: includes/class-wp-revision-list-settings.php:79 | ||
#: release/includes/class-wp-revision-list-settings.php:77 | ||
msgid "Users can chose their own setting in Screen Options" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:79 | ||
#: includes/class-wp-revision-list-settings.php:81 | ||
#: release/includes/class-wp-revision-list-settings.php:79 | ||
msgid "Prefix title with" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:82 | ||
#: includes/class-wp-revision-list-settings.php:84 | ||
#: release/includes/class-wp-revision-list-settings.php:82 | ||
msgid "Suffix title with" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:93 | ||
#: includes/class-wp-revision-list-settings.php:94 | ||
#: includes/class-wp-revision-list-settings.php:95 | ||
#: includes/class-wp-revision-list-settings.php:96 | ||
#: release/includes/class-wp-revision-list-settings.php:93 | ||
#: release/includes/class-wp-revision-list-settings.php:94 | ||
msgid "Post Types" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:111 | ||
#: includes/class-wp-revision-list-settings.php:113 | ||
#: release/includes/class-wp-revision-list-settings.php:111 | ||
msgid "Help" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:237 | ||
#: includes/class-wp-revision-list-settings.php:268 | ||
#: includes/class-wp-revision-list-settings.php:239 | ||
#: includes/class-wp-revision-list-settings.php:270 | ||
#: release/includes/class-wp-revision-list-settings.php:237 | ||
#: release/includes/class-wp-revision-list-settings.php:268 | ||
msgid "WP Revision List Settings" | ||
|
@@ -73,7 +73,7 @@ msgstr "" | |
msgid "WP Revision List" | ||
msgstr "" | ||
|
||
#: includes/class-wp-revision-list-settings.php:251 | ||
#: includes/class-wp-revision-list-settings.php:253 | ||
#: release/includes/class-wp-revision-list-settings.php:251 | ||
msgid "Save Settings" | ||
msgstr "" | ||
|
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 |
---|---|---|
@@ -1,29 +1,31 @@ | ||
{ | ||
"name": "wp-revision-list", | ||
"version": "1.1.5", | ||
"description": "WordPress plugin to show revisions when viewing lists of posts, pages, or custom post types in the admin dashboard", | ||
"main": "Gruntfile.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/petenelson/wp-revision-list.git" | ||
}, | ||
"keywords": [ | ||
"wordpress", | ||
"dashboard" | ||
], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/petenelson/wp-revision-list/issues" | ||
}, | ||
"homepage": "https://github.com/petenelson/wp-revision-list", | ||
"devDependencies": { | ||
"grunt": "^1", | ||
"grunt-contrib-clean": "^2", | ||
"grunt-contrib-copy": "^1", | ||
"grunt-wp-i18n": "^1" | ||
} | ||
"name": "wp-revision-list", | ||
"version": "1.1.5", | ||
"description": "WordPress plugin to show revisions when viewing lists of posts, pages, or custom post types in the admin dashboard", | ||
"main": "Gruntfile.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/petenelson/wp-revision-list.git" | ||
}, | ||
"keywords": [ | ||
"wordpress", | ||
"dashboard" | ||
], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/petenelson/wp-revision-list/issues" | ||
}, | ||
"homepage": "https://github.com/petenelson/wp-revision-list", | ||
"devDependencies": { | ||
"grunt": "^1.6.1", | ||
"grunt-contrib-clean": "^2.0.1", | ||
"grunt-contrib-copy": "^1.0.0", | ||
"grunt-potomo": "^3.5.0", | ||
"grunt-wp-i18n": "^1.0.3", | ||
"grunt-wp-readme-to-markdown": "^2.1.0" | ||
} | ||
} |
Oops, something went wrong.