Skip to content

Commit

Permalink
Fixes for 3.0.8 (#173)
Browse files Browse the repository at this point in the history
* Ignore multiline validation

* Remove donation form

* Bump versions
  • Loading branch information
johngodley authored Jan 1, 2024
1 parent 2f554bd commit 1d6c3dd
Show file tree
Hide file tree
Showing 9 changed files with 4,586 additions and 3,567 deletions.
5 changes: 1 addition & 4 deletions includes/api/class-route.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,7 @@ protected function get_search_replace( $params ) {
public function validate_search_flags( $value, \WP_REST_Request $request, $param ) {
if ( is_array( $value ) ) {
$source = new Search\Flags( $value );

if ( count( $source->get_flags() ) === count( $value ) ) {
return true;
}
return true;
}

return new \WP_Error( 'rest_invalid_param', 'Invalid search flag detected', array( 'status' => 400 ) );
Expand Down
80 changes: 40 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "search-regex",
"version": "3.0.7",
"version": "3.0.8",
"description": "Adds search and replace functionality across posts, pages, comments, and meta-data, with full regular expression support",
"main": "search-regex.php",
"sideEffects": true,
Expand Down Expand Up @@ -38,63 +38,63 @@
},
"homepage": "https://github.com/johngodley/search-regex",
"devDependencies": {
"@types/jest": "^29.0.0",
"@types/react": "^18.0.18",
"@types/react-dom": "^18.0.6",
"@types/react-highlight-words": "^0.16.4",
"@types/react-redux": "^7.1.24",
"@wordpress/base-styles": "^4.7.0",
"@wordpress/eslint-plugin": "^13.0.0",
"@wordpress/prettier-config": "^2.0.0",
"@wordpress/scripts": "^24.0.0",
"apidoc": "^0.52.0",
"chai": "^4.3.6",
"@types/jest": "^29.5.11",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@types/react-highlight-words": "^0.16.7",
"@types/react-redux": "^7.1.33",
"@wordpress/base-styles": "^4.39.0",
"@wordpress/eslint-plugin": "^17.5.0",
"@wordpress/prettier-config": "^3.5.0",
"@wordpress/scripts": "^26.19.0",
"apidoc": "^1.2.0",
"chai": "^5.0.0",
"download": "^8.0.0",
"glob-all": "^3.3.0",
"glob-all": "^3.3.1",
"gulp": "^4.0.2",
"gulp-deleted": "1.0.0",
"gulp-deleted": "2.0.0",
"gulp-po2json": "^1.0.0",
"gulp-zip": "^5.1.0",
"he": "^1.2.0",
"jest": "^29.0.1",
"jest-environment-jsdom": "^29.0.1",
"mocha": "^10.0.0",
"node-fetch": "2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"mocha": "^10.2.0",
"node-fetch": "3",
"path": "^0.12.7",
"prettier": "npm:wp-prettier@2.6.2",
"release-it": "^15.4.1",
"prettier": "npm:wp-prettier@3.0.3",
"release-it": "^17.0.1",
"request": "^2.88.2",
"through": "^2.3.8",
"through2": "^4.0.2",
"webpack-shell-plugin-next": "^2.2.2"
"webpack-shell-plugin-next": "^2.3.1"
},
"dependencies": {
"@emotion/react": "^11.10.4",
"@redux-devtools/extension": "^3.2.3",
"@wordpress/element": "^4.14.0",
"@wordpress/i18n": "^4.16.0",
"classnames": "^2.3.1",
"date-fns": "^2.29.2",
"deep-equal": "^2.0.5",
"@emotion/react": "^11.11.3",
"@redux-devtools/extension": "^3.3.0",
"@wordpress/element": "^5.25.0",
"@wordpress/i18n": "^4.48.0",
"classnames": "^2.5.1",
"date-fns": "^3.0.6",
"deep-equal": "^2.2.3",
"file-saver": "^2.0.5",
"qs": "^6.11.0",
"rc-progress": "^3.4.0",
"rc-util": "^5.23.0",
"qs": "^6.11.2",
"rc-progress": "^3.5.1",
"rc-util": "^5.38.1",
"react": "^18.2.0",
"react-copy-to-clipboard": "^5.1.0",
"react-datepicker": "^4.8.0",
"react-datepicker": "^4.25.0",
"react-delta": "^1.1.2",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.2",
"react-focus-lock": "^2.9.1",
"react-highlight-words": "^0.18.0",
"react-redux": "^8.0.2",
"react-textarea-autosize": "^8.3.4",
"redux": "^4.2.0",
"redux-thunk": "^2.4.1",
"typescript": "^4.8.2",
"url": "^0.11.0",
"use-debounce": "^8.0.4"
"react-dropzone": "^14.2.3",
"react-focus-lock": "^2.9.6",
"react-highlight-words": "^0.20.0",
"react-redux": "^9.0.4",
"react-textarea-autosize": "^8.5.3",
"typescript": "^5.3.3",
"url": "^0.11.3",
"use-debounce": "^10.0.0"
},
"apidoc": {
"name": "Search Regex REST API",
Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: johnny5
Donate link: http://searchregex.com/donation/
Tags: search, replace, regex, regular expression, database, post, page
Requires at least: 5.6
Tested up to: 6.3
Stable tag: 3.0.7
Requires at least: 6.0
Tested up to: 6.4
Stable tag: 3.0.8
Requires PHP: 5.6
License: GPLv3

Expand Down Expand Up @@ -113,6 +113,9 @@ Full documentation can be found on the [Search Regex](http://searchregex.com/) s

== Changelog ==

= 3.0.8 - January 1st 2024 =
* Fix multiline error

= 3.0.7 - September 10th 2023 =
* Fix problem saving comment

Expand Down
2 changes: 1 addition & 1 deletion search-regex.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Search Regex
Plugin URI: https://searchregex.com/
Description: Adds search and replace functionality across posts, pages, comments, and meta-data, with full regular expression support
Version: 3.0.7
Version: 3.0.8
Author: John Godley
Text Domain: search-regex
Domain Path: /locale
Expand Down
146 changes: 0 additions & 146 deletions src/page/options/donation.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/page/options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@
* External dependencies
*/

import React from 'react';
import { connect } from 'react-redux';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
*/
import OptionsForm from './options-form';
import Donation from './donation';

function Options( props ) {
const { values } = props;

return (
<div>
<Donation support={ values.support } />
<OptionsForm />
</div>
);
Expand Down
14 changes: 0 additions & 14 deletions src/page/options/options-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,6 @@ function OptionsForm( props ) {
return (
<form onSubmit={ onSubmit }>
<Table className="form-table">
<TableRow title="">
<label>
<input
type="checkbox"
checked={ support }
name="support"
onChange={ ( ev ) => setSupport( ev.target.checked ) }
/>
<span className="sub">
{ __( "I'm a nice person and I have helped support the author of this plugin" ) }
</span>
</label>
</TableRow>

<TableRow title={ __( 'Default Preset', 'search-regex' ) }>
<label>
<Select
Expand Down
42 changes: 0 additions & 42 deletions src/page/options/style.scss
Original file line number Diff line number Diff line change
@@ -1,45 +1,3 @@
/**
* The donation section of the options page
*/
.donation {
.donation-amount {
float: left;
margin-top: 10px;

span {
font-size: 28px;
margin-top: 4px;
vertical-align: bottom;
}

img {
width: 24px !important;
margin-bottom: -5px !important;
}
}

.donation-amount::after {
content: "";
display: block;
clear: both;
}

input[type="number"] {
width: 60px;
margin-left: 10px;
}

td,
th {
padding-bottom: 0;
margin-bottom: 0;
}

input[type="submit"] {
margin-left: 10px;
}
}

.newsletter h3 {
margin-top: 30px;
}
Loading

0 comments on commit 1d6c3dd

Please sign in to comment.