Missing image sizes in dropdowns

Issue #31 resolved
tristanleboss created an issue

Hello,

I use version 1.4.15 of your plugin on WordPress v4.3.1. Unfortunately, I have an issue: indeed, some of the image sizes defined in my WordPress setup are not available in your dropdowns list. They do appears in the "ajax-thumbnail-rebuild" plugin, for example, but not in yours.

They are defined in an "after_setup_theme" action (as recommended by WP doc) in a child theme. I tried to put them in the "init" action of one of my plugins but they also don't appear.

I quickly discovered that you require the file "sbrssfeed-cfg.php" (which contains the code for the dropdowns and the call to "get_intermediate_image_sizes") through the "WordPressSettingsFramework" class in an "after_setup_theme" action. Unfortunately, this action is set up with the default priority (10) and on my setup at least, it registers before the "after_setup_theme" action of my theme which is also using the default priority. This way it's impossible for your plugin to detect any image sizes registered by my theme.

Regarding the "init" action, it happens after the "after_setup_theme" action so there is also no way for your plugin to be able to detect any image sizes registered after the "after_setup_theme" action.

So the main problem comes from the fact that the call to "get_intermediate_image_sizes" is done really early during WP loading.

Tristan

PS: Adding the "after_setup_theme" to your "Debug - hooks & filters" block would be a cool addition ;)

Comments (3)

  1. Ladislav Soukup repo owner

    Hi, thanks for reporting! I will release fix for this issue soon (I will try to update it later today).

    PS: sorry for slow response, I was on holidays and offline.

  2. Log in to comment