<script> const CONST_CNF_CAP = 0.03003, CONST_LNF_IND = 0.02252, CONST_RZ_RES = 1.25;
</script>
And then within a field, for example, attempted to use it like so:(function(){
var result;
result = CONST_CNF_CAP/fieldname14;
return PREC(result*1000000,1);
})()
…with no success. Is it possible to do this in a form?
Thank you!
I found that we can set the following Constants for wp-content folder and wp-plugins folder
WP_CONTENT_DIR, WP_CONTENT_URL, WP_PLUGIN_DIR and WP_PLUGIN_URL
So how do we set the WP_ADMIN_DIR, WP_INCLUDES_DIR and virtual routes with wordpress core? If we can do it we can serve websites with one core base and multiple websites under single core base.
Any comments on this?
]]>It even supports PHP constants for configuration.
]]>wp-config.php
…But they are there, it’s as if the plugin isn’t reading them at all…
//Wasabi bucket config
define( ‘SSU_PROVIDER’, ‘wasabi’ ); // put either aws or wasabi (note: doesn’t work with either)
define( ‘SSU_KEY’, ‘XXX’ );
define( ‘SSU_SECRET’, ‘XXX’ );
define( ‘SSU_BUCKET’, ‘XXX’ );
define( ‘SSU_REGION’, ‘XXX’ );
define( ‘SSU_SURL_EXPIRY’, 60 ); // in seconds
Anyone experiencing this?
]]>The issue I’m having is I have a plugin which refers to some custom template files for said plugin in a folder in the current theme i.e. the parent theme, but as I am working on a child theme I want the plugin to reference the templates from a folder within the child theme. Obviously I don’t want to modify any of the plugin files or have to put the custom template folder in the parent theme as they will get overwritten on updates.
In the plugin there is the below function:
/**
* Load view
*
* A simple hook of wp_plugin_hook to accept custom view in
* the current theme folder
*
* @return string
*/
public function load_view($file, array $view_datas = array(), $return = true) {
$custom_view_path = WP_CURRENT_THEME_PATH . 'custom-template-folder/' . $file . '.php';
$view_datas = array_merge($view_datas, $GLOBALS['wp_views_datas']);
if(file_exists($custom_view_path)) {
$view = wp_plugin_hook($file, $view_datas, $return, WP_CURRENT_THEME_PATH . 'custom-template-folder');
}
else {
$view = wp_plugin_hook($file, $view_datas, $return, WP_PLUGIN_PATH . 'views/template/');
}
return $view;
}
Then the constant in the plugin is as follows:
// Path directory current theme
define('WP_CURRENT_THEME_PATH', get_template_directory() . '/');
I basically either need to change the WP_CURRENT_THEME_PATH
constant so it uses get_stylesheet_directory()
as opposed to get_template_directory()
.
OR
overwrite the whole load_view
function and replace within it the WP_CURRENT_THEME_PATH
with a hard coded URL i.e. so it points to the folder in the child theme directory.
Is any of the above possible via overrides in the child theme’s functions.php?
Thanks in advance for anyone who can help!
Chris
]]>Is this possible?
Thank you for your help!
]]>I have checked the diagnostic results and also checked the error logs however I’m not seeing any logs related with SMTP. Please help.
]]>—
The following constants are set and will prevent automatic updates in Easy Updates Manager.
Please check your wp-config.php file or other files for these constants and remove them to allow Easy Updates Manager to have control.
AUTOMATIC_UPDATER_DISABLED: This constant disables any automatic updates
—
I think I found a few bugs:
First, it doesn’t hide the Settings screen when I use:
define( 'CONTEXTUAL_ADMINBAR_SETTINGS', 0 )
It still displays it under “Tools” and is accessible. I have to set the value to “false” to hide it.
The Second issue:
When I set the values for color and message by constants the “save button” is missing. This is a problem because there is no constant for user roles so I have to use the options and need the save button.