• Is there a way that you can include a custom theme and have its folders remain each time you produce a new version? I have rolled my own them and have saved it and know I will have to upload it every time I updated the plugin

    It would be very helpful if those folders and the admin.php already had the “custom” theme there so it wouldn’t have to be so tedious adding them back every time as opposed to just being able to FTP my theme up. It might also prevent any kind of jquery version mismatches.

    Thanks.

    https://www.ads-software.com/plugins/squelch-tabs-and-accordions-shortcodes/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Matt Lowe

    (@squelch)

    Hi there, this is a complicated topic and outside of the scope of this plugin. Ideally the plugin should provide an upload mechanism, but that’s really not straightforward because, as you point out, the uploaded jQuery UI theme needs to live outside of the plugin. None of that is straightforward to implement. And also it’s such a niche task and such a specialised task, that it kind of feels like it ought to be handled by a separate plugin anyway.

    Right now your best bet is to either create your own plugin on your site that you upload the jQuery UI theme into and then use wp_enqueue_style() to load, or place the jQuery UI theme into your WordPress child theme and again use wp_enqueue_style() to load it.

    Thread Starter laskowv

    (@laskowv)

    I understand. What I was hoping is that you could make a folder in the /css/jquery-ui/ directory called “custom” (maybe copy another themes like “blitzer”).

    Then in the file /inc/admin.php include “Custom” as one of the options.

    This way the most current js scripts would always be there and then we, (the utilizers of the plugin), would only have to replace the images in the /css/jquery-ui/custom/images directory with the color versions we need. Of course, we would leave the names the same since the js will be looking for those file names. (Note: this is my quick workaround when I do not want to roll a new theme).

    Plugin Author Matt Lowe

    (@squelch)

    I don’t believe that this solution would protect your custom theme files when the plugin upgrades, as far as I know WordPress upgrades plugins by downloading the latest version, extracting them, removing the old plugin directory and then replacing it with the new one. I’d need to test this to be 100% sure, but I’m pretty confident this is correct. As such any custom theme would need to be uploaded somewhere outside of the plugin.

    Thread Starter laskowv

    (@laskowv)

    That is my point. If you made a copy of one of the themes (ex: Blitzer); and then added a selection of “Custom” to the admin.php; then “Custom” would be in the selection menu and be a duplicate copy of “Blizter”. This way it would be downloaded with every future version. The important thing would be that the jquery version and the parsed code would be current to that version.

    If one did not like the colors, they could simply replace the images in the /css/jquery-ui/custom/images folder — but keep the name of each image the same. What I have done in the past is rolled a new theme and then added it to admin.php and then added the theme folder — but had to make sure I rolled it with the same jquery version as your plugin. I have to check it everytime there is an update to your plugin.

    By having you add a “custom” theme that stays with the plugin, then one wouldn’t have to concern themselves with the version of jquery, but only to replace the images. I am just trying to save a lot of work since I use your plugin on about 18 websites now.

    Thanks.

    Plugin Author Matt Lowe

    (@squelch)

    I haven’t forgotten about this feature request, I’ve just been snowed under. As it happens I need to do some development on the plugin very soon anyway, so that would be the ideal time to implement this feature. But I still don’t think having the custom theme held inside of the plugin folder structure is the way to go. I’m currently thinking that having a location under the “uploads” directory might be the best solution. That way when the plugin updates you don’t lose the files.

    I should warn you though that one of the things I want to do soon is to update the version of all of the themes that are stored in the plugin, as they are all reaching end of life. This will have a knock-on effect for those 18 sites you mentioned. I’ll do my best to make it as painless as possible, but the update of the themes is something that definitely needs to happen.

    Plugin Author Matt Lowe

    (@squelch)

    Okay, you’ll hopefully be pleased to hear that I’ve implemented a custom jQuery upload feature for the plugin. You just need to put your theme into:

    wp-content/uploads/jquery-ui-1.9.2.custom

    You can just download the theme straight from the theme roller and extract it, no need for any further processing. Upload it to the directory named above and when you next go to the admin settings for the theme you should have a new option in the “Theme” dropdown. Choose “Custom jQuery theme” there and the new theme will be enqueued for you to use.

    Full details can be found in the theme documentation: https://squelchdesign.com/web-development/free-wordpress-plugins/squelch-tabs-and-accordions-shortcodes/ (See the section “Changing the theme” under “Styling the widgets”.

    Give it a whirl and let me know how you get on!

    Plugin Author Matt Lowe

    (@squelch)

    Actually don’t get too carried away at this stage, give it a go, but don’t consider this final: I’m currently in the process of upgrading the plugin to use 1.11.4 themes as the existing 1.9.4 themes are going to be obsolete very soon. When I do that I will need to make the plugin use 1.11.4 custom-rolled themes.

    Thread Starter laskowv

    (@laskowv)

    Matt — this worked perfectly! Thank you, thank you, thank you. I do understand that you need to upgrade the plugin further. I am from the old days of programming, but I have been teaching myself the new languages and syntax.

    I won’t change all of the other sites yet. I wait to see what you come up with for the new release.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom jQuery UI theme’ is closed to new replies.