Question about code being no longer pluggable

Hi,

I’ve inherited an older site that uses X theme with a custom child theme. While reading through the changelog from my older version to the latest version of X, I noted this change:

UPDATED: x_setup_theme, x_get_stack, x_get_option, x_get_site_layout are no longer pluggable.

Can you fill me in on what this means in practice? I ask because the child theme references x_get_stack and x_get_option and I want to make sure I won’t break anything by updating.

For x_get_stack, most of the references are in .php layout/template files, such as:

<?php x_get_view( x_get_stack(), 'wp', 'sidebar' ); ?>

But there are also one reference in functions.php and one in the global view:

functions.php:
$stack = x_get_stack();

framework\views\global_index.php:
$stack = x_get_stack();

Will this code still work after the update? Sorry if this is a dumb question but I’m not 100% clear on what it means for x_get_stack to be no longer pluggable.

Hi Chemistry,

The functions being no longer pluggable means that you can not override the definition of the functions and change the behavior of it. For more information please check this article.

From what I see on code snippets that you gave, the previous developer did not override the functions and only used them. If that is the case it should not cause any serious problems.

But in general, it is advisable that you have a complete backup of your website before the update, or even better having a staging version of the website and perform the update there to make sure it works there correctly.

Please kindly be advised that delving into a customized code by the customer is outside of our support scope and, we will not be able to find possible problems with the custom code.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.