Git Product home page Git Product logo

Comments (7)

bobbingwide avatar bobbingwide commented on June 20, 2024

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.

bobbingwide avatar bobbingwide commented on June 20, 2024

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.

bobbingwide avatar bobbingwide commented on June 20, 2024

We need to produce the messages in WPMS as well.
/wp-admin/network/update-core.php

from oik.

bobbingwide avatar bobbingwide commented on June 20, 2024

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.

bobbingwide avatar bobbingwide commented on June 20, 2024

We need to prevent updates from /wp-admin/update-core.php

from oik.

bobbingwide avatar bobbingwide commented on June 20, 2024

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.

bobbingwide avatar bobbingwide commented on June 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.