WP Manifestindependent plugin directory
manifest / themes / wpez-wc-bistro-plugin

WPezPlugins: WooCommerce Bistro as a Plugin GitLab

For all intents and purposes the WooCommerce Bistro Theme is a plugin that prevents the use of a proper WordPress child theme. Ha! Not any more. Bistro is now a plugin, and the child theme slot it was taking up unnecessarily is open.

by Mark "Chief Alchemist" Simchock for Alchemy United · gitlab.com/wpezplugins/wpez-wc-bistro-plugin · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://gitlab.com/wpezplugins/wpez-wc-bistro-plugin/-/archive/master/wpez-wc-bistro-plugin-master.zip

Readme

WPezPlugins: WooCommerce Bistro Theme as a Plugin

For all intents and purposes the Bistro Theme is a plugin that prevents the use of a proper WordPress child theme. Ha! Not any more.

After a handful of minor tweaks Bistro is now a plugin, and the child theme slot it was taking up unnecessarily is now wide open.

--

Special thanks to JetBrains (https://www.jetbrains.com/) and PhpStorm (https://www.jetbrains.com/phpstorm/) for their support of OSS and its devotees.

--

IMPORTANT

_This plugin's version is the Bistro's version it forked, a plus sign (+), and then the plugin's own version. If the Bistro version increments the plugin's version will drop back to 0.0.1 and climb up again from there.__

That is, the plugin's version is relative to the Bistro version it forks.

THE CHANGES

1) Added wpez-wc-bisro-plugin.php

Aside from the WP plugin header (comment) it contains two lines of code:

-- $str_plugin_dir_path = untrailingslashit(plugin_dir_url(_FILE_));

-- require_once 'functions.php';

2) inc / class-bistro.php

-- Used $str_plugin_dir_url via a global and replaced the appropriate (theme) functions for enqueue'ing

-- Moved instantiation (new Bistro() at the bottom of the class) to the functions.php

-- Moved the hooks in __construct() to the functions.php as well.

-- Add this line to method enqueue_styles(); wp_enqueue_style( 'bistro-style', $str_plugin_dir_url . '/style.css', $bistro_version, 'storefront-style' );

3) inc / bistro-cutomizer.php

-- Changed: wp_add_inline_style( 'storefront-child-style', $style ); to wp_add_inline_style( 'bistro-style', $style );

FAQ

1 - Why?

Because Bistro as child theme is pointless. It takes up an important slot that a real child theme can utilize.

2 - But isn't there a way to filter the template requests?

Yup. But because you have to do that as a plugin the function get_template_part() isn't going to work. If you have very limited needs in terms of temple changes then you might be able to get away with filtering the temple requests. But why chance it? Use this, get yourself a real child theme, move on and don't look back.

3 - But I paid for Bistro, now what?

Well, this isn't an official port / fork, so if you have any Bistro-centric questions you can still ask Automattic. The functionality hasn't changed per se, only how it's implemented.

4 - This plugin is free. Do we still need to buy Bistro?

This plugin is simply an alternate way to add Bistro to your website. It is not intended to be a replacement to Bistro per se. We encourage you to keep supporting Bistro. It's in everyone's best interest to do so.

5 - What is the handle of the Bistro stylesheet our enqueue'ing needs to have as a deps?

bistro-style

#6 - I'm not a developer, can we hire you?

Yes, that's always a possibility. If I'm available, and there's a good mutual fit.

HELPFUL LINKS

TODO

  • Move hooks outside the classes they're current within.

CHANGE LOG

-- 1.0.12 + 0.0.1

  • INIT - yey! child theme!!

Read the full README on GitLab →