How to null Publisher theme

by Festinger in on June 20, 2020

In the file includes/libs/better-framework/product-pages/welcome/functions.php, find the function bf_register_product_get_info which starts around line 70 and add this to the start of the function code:

return array('status'=>'success');

In the same file, find the function bf_is_product_registered() which starts around line 123 and add this to the start of the function code:

return true;

Now you can install the demo content and there is no request for a license key.

Premium plugin links are set in the file includes/libs/better-framework/product-pages/install-plugin/class-bf-product-plugin-installer.php. The link is returned after an api check so can’t be nulled to get the plugins from their api server. However, as it is now a requirement of Themeforest that plugins are included in the download, they are available to install as you would any other plugin.

If you really want to be able to install the plugins through the theme dashboard, here is how you can.

Edit the file includes/libs/better-framework/product-pages/install-plugin/class-bf-product-plugin-list-table.php and after line 93 which is:

$classes = $this->badge_classes( $plugin_info );

add this:

$plugin_info['have_access'] = true;

Now upload the plugin zips to a location you control (removing the version numbers from the zip name) and edit the file includes/libs/better-framework/product-pages/install-plugin/class-bf-product-plugin-installer.php. Find the function get_plugin_package_url which starts around line 947 and in that function replace this line of code:

$source = bf_bundle_plugin_package_url( $plugin['slug'] );

with this:

$source = get_template_directory_uri() . "/plugins/" . $plugin['slug'] . ".zip";

Alter the code to point to wherever you uploaded the plugins to. In this case I created a new folder in the theme root folder called ‘plugins’ and uploaded them there. Now you can install the plugins through the theme dashboard.

Categories: Uncategorized