Comments (4)
I guess I wouldn't mind paying for it.
The mu-plugin I mentioned earlier is one that I wrote myself already years ago to do part of what now "Lean WP" does better.
Another plugin I use that relies on the Rest API for some of its functionality is "Contact Form 7"
from lean-wp.
@mikele3 thanks or your message.
I am not sure if it works to add the filter where Lean WP disables the function back in?
In https://github.com/senlin/lean-wp/blob/master/includes/class-lean-wp.php#L93-L96:
// Disable XML-RPC - //plugins.svn.wordpress.org/disable-xml-rpc/tags/1.0.1/disable-xml-rpc.php
add_filter( 'xmlrpc_enabled', '__return_false' );
// Remove call for XML-RPC from HEAD - @ZenPress //wordpress.stackexchange.com/questions/219643/best-way-to-eliminate-xmlrpc-php#comment350490_219666
add_filter( 'pings_open', '__return_false', PHP_INT_MAX );
Perhaps add a function that triggers later and adds XML-RPC back in?
If that doesn't work, then I will have to add something that you can enable it again, which could either be a settings page or a pluggable function.
Please let me know if it works.
from lean-wp.
@senlin thank you for the quick reply and support.
As I was attempting to re-enable XML-PRC, I eventually realized WP/LR Sync doesn't use that method anymore, but the Rest API.
I tried adding this:
remove_filter('rest_authentication_errors', 'lwp_disable_wp_rest_api', PHP_INT_MAX);
to a mu-plugin I wrote for that site, but with no success.
I resorted to commenting out :
require_once( 'includes/lib/class-lean-wp-disable-rest-api.php' );
https://github.com/senlin/lean-wp/blob/master/lean-wp.php#L38
is there a cleaner way to re-enable the Rest API?
from lean-wp.
Glad you found a solution, albeit very temporary @mikele3
is there a cleaner way to re-enable the Rest API?
There could be, but that would involve rewriting the plugin either placing the required files in an init
action or by adding a settings page. The latter I have been contemplating, but if I go that way, it will most definitely be a premium version of the plugin.
from lean-wp.
Related Issues (15)
- Lean WP break Reading Settings HOT 7
- Tools HOT 1
- Metas en html HOT 4
- leanwp and Gutenberg HOT 2
- Allow Tools menu or Settings panel HOT 8
- incompatibilty notice HOT 3
- Also remove "Howdy" in other languages HOT 3
- auto-delete "Hello Dolly"-plugin HOT 4
- [BUG] change "Uncategorized" category name to general
- Customizer question HOT 12
- remove all but most recent default theme HOT 1
- question with no content, OP probably changed his mind... HOT 4
- Settings page HOT 2
- Disable gravatars HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lean-wp.