gutenblock icon indicating copy to clipboard operation
gutenblock copied to clipboard

WP Admin - Plugin update screen

Open timarney opened this issue 6 years ago • 6 comments

Just a heads up -


Admin says update available - screen shot 2018-05-05 at 7 35 33 pm

Plugin details shows "Blocks" plugin


screen shot 2018-05-05 at 7 35 52 pm

Might want to change the name of the blocks dir.

 ncp(__dirname + '/../../plugin', `${process.cwd()}/blocks`, err => {

timarney avatar May 05 '18 23:05 timarney

Thanks I think it’s because of the package definition name in the php file I need to change. Will look into it in a bit

zackify avatar May 05 '18 23:05 zackify

hmm, is it really from the registerBlockType("${pluginName}", Block) thats weird to me. Feel like it should be going by the plugin package name in the php file no?

zackify avatar May 08 '18 01:05 zackify

I always thought it only got the name and version from the .php file but maybe not

https://www.cozmoslabs.com/1667-wordpress-automatic-updates-based-on-folder-name-is-that-a-problem

Also found this with a little more detail

https://wordpress.stackexchange.com/questions/56968/if-i-rename-a-plugin-in-its-main-php-file-do-i-still-get-update-notifications

The API uses a rather elaborate mechanism to match plugins against plugins it knows about, but these are the main things checked for: Plugin URI, Plugin Name, and Plugin slug (**the directory name the plugin is in**)

Change any of those and you reduce the chances of it finding a match, but it might still get it if two of them match, for example.

Info in the readme.txt is not used for this. The header of the plugin's PHP file itself is used.

I renamed the blocks dir and the notice no longer appears. I guess say I did have that other plugin installed prior it would use the blocks dir and create a collision.

timarney avatar May 08 '18 11:05 timarney

thats annoying... will work on this later this week too

zackify avatar May 10 '18 03:05 zackify

  1. I think it would be best If you create an option in the gutenblock init command to let the developer define a folder name for the plugin, you would use it like this gutenblock init my-plugin-folder.

  2. Also change the default folder name to something like gutenblock.

diegoversiani avatar Jul 24 '18 03:07 diegoversiani

If you could make a pr for this I will accept. Sorry it took so long, I don’t have much time to work on this but would like to keep it up to date.

zackify avatar Dec 13 '18 08:12 zackify