Comments (7)
Note: When checking to see if a plugin is a symlinked plugin you can't rely on the global $wp_plugin_paths table since this is only populated for active plugins.
So when hooking into 'pre_current_active_plugins' which lists all plugins, whether or not activated you have to find another way to determine if the plugin is symlinked.
from oik.
Messages about symlinked plugins are being displayed even when the plugin is at the latest version.
We should change the code to compare "new_version" with "Version" and issue the message when they're different.
from oik.
We need to produce the messages in WPMS as well.
/wp-admin/network/update-core.php
from oik.
The logic should also cater for plugins which are clones of Git repositories.
This is in addition to detecting plugins which are symlinks of Git repositories.
from oik.
We need to prevent updates from /wp-admin/update-core.php
from oik.
In order to prevent updates in wp-admin/update-core.php we'll need to see how we can intercept the processing for the following hooks
[hook pre_site_transient_update_plugins filter 2 10 0]
[hook pre_site_option__site_transient_update_plugins filter 4 14 0]
[hook default_site_option__site_transient_update_plugins filter 3 14 0]
[hook pre_option__site_transient_update_plugins filter 3 16 0]
[hook option__site_transient_update_plugins filter 2 16 0]
[hook site_option__site_transient_update_plugins filter 3 14 0]
[hook site_transient_update_plugins filter 2 10 1]
That means looking at where they're called and what they return.
The challenge is to be able to report where updates are available, but we don't recommend updating because the plugins symlinked or Gitted, and to remove the plugins from the list when we can't tell them it's not a good idea.
OK. I've written some code in the libs/class-oik-update.php
shared library file. It hooks into the site_transient_update_plugins
filter. It removes any symlinked or Git plugins from the update list when the current page is update-core
.
I now need to test this without breaking anything. So I need to commit the changes, install somewhere safe and try it out. That means creating a new version of oik ( and oik-bwtrace ) with the updates. Should be interesting.
from oik.
OK, I've tested it. The logic only kicks in when a plugin has called oik_register_plugin_server
. This is a function used in plugins delivered from oik-plugins.com.
I'm going to close the issue for now. I may revisit it if I think it's necessary to indicate to the user that "some plugins have been ignored during the creation of this list".
from oik.
Related Issues (20)
- Google Maps block doesn't work in blocks.wp-a2z.org HOT 4
- bw_table excerpt field processing doesn't render blocks HOT 1
- Unexpected JavaScript shown in snippet for the [bw_power] shortcode
- [bw_wpadmin] not wrapped in any div/span tag so gets flowed inline
- wp-pompey.org.uk - Fatal error: Uncaught Error: Class 'OIK_SVG_icons' not found HOT 2
- oik/shortcodes block - SelectControl is enormous HOT 3
- Shortcodes not expanded in `term_description` HOT 5
- Default `show_in_nav_menus` to false if not set HOT 1
- Warning on oik options > plugins Add new HOT 1
- bw_get_posts() - Add support for post_name attr HOT 2
- [bw_pages] - dynamic blocks not being rendered HOT 1
- Update to the latest @wordpress/scripts package and rework as required HOT 5
- Warning: Invalid DOM property `fill-rule`. Did you mean `fillRule` ? HOT 2
- Contact form: add additional fields such as telephone HOT 25
- Blocks not registered in oik downloaded from WordPress.org HOT 1
- Memory exhausted while running PHPUnit tests for oik on s.b/wordpress HOT 1
- Consider making [bw_accordion] front end more accessible HOT 1
- Test compatibility with WordPress 6.3 HOT 4
- Update to the latest @wordpress/scripts package HOT 7
- Add translators comments to shared library files HOT 1
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 oik.