File: /home/luxbsolr/cardsord.store/wp-content/themes/woodmart-7.5.2/functions.php
<?php
/**
*
* The framework's functions and definitions
*/
update_option( 'woodmart_is_activated', '1' );
define( 'WOODMART_THEME_DIR', get_template_directory_uri() );
define( 'WOODMART_THEMEROOT', get_template_directory() );
define( 'WOODMART_IMAGES', WOODMART_THEME_DIR . '/images' );
define( 'WOODMART_SCRIPTS', WOODMART_THEME_DIR . '/js' );
define( 'WOODMART_STYLES', WOODMART_THEME_DIR . '/css' );
define( 'WOODMART_FRAMEWORK', '/inc' );
define( 'WOODMART_DUMMY', WOODMART_THEME_DIR . '/inc/dummy-content' );
define( 'WOODMART_CLASSES', WOODMART_THEMEROOT . '/inc/classes' );
define( 'WOODMART_CONFIGS', WOODMART_THEMEROOT . '/inc/configs' );
define( 'WOODMART_HEADER_BUILDER', WOODMART_THEME_DIR . '/inc/header-builder' );
define( 'WOODMART_ASSETS', WOODMART_THEME_DIR . '/inc/admin/assets' );
define( 'WOODMART_ASSETS_IMAGES', WOODMART_ASSETS . '/images' );
define( 'WOODMART_API_URL', 'https://xtemos.com/wp-json/xts/v1/' );
define( 'WOODMART_DEMO_URL', 'https://woodmart.xtemos.com/' );
define( 'WOODMART_PLUGINS_URL', WOODMART_DEMO_URL . 'plugins/' );
define( 'WOODMART_DUMMY_URL', WOODMART_DEMO_URL . 'dummy-content-new/' );
define( 'WOODMART_TOOLTIP_URL', WOODMART_DEMO_URL . 'theme-settings-tooltips/' );
define( 'WOODMART_SLUG', 'woodmart' );
define( 'WOODMART_CORE_VERSION', '1.0.43' );
define( 'WOODMART_WPB_CSS_VERSION', '1.0.2' );
if ( ! function_exists( 'woodmart_load_classes' ) ) {
function woodmart_load_classes() {
$classes = array(
'class-singleton.php',
'class-api.php',
'class-config.php',
'class-layout.php',
'class-autoupdates.php',
'class-activation.php',
'class-notices.php',
'class-theme.php',
'class-registry.php',
);
foreach ( $classes as $class ) {
require WOODMART_CLASSES . DIRECTORY_SEPARATOR . $class;
}
}
}
woodmart_load_classes();
new XTS\Theme();
define( 'WOODMART_VERSION', woodmart_get_theme_info( 'Version' ) );
// Custom copyright text override
function cardsord_custom_copyright() {
return '<i class="fa fa-copyright"></i> ' . date('Y') . ' <strong>Cardsord Store</strong>. All rights reserved.';
}
// More aggressive override - hook into the footer directly
add_action('wp_footer', function() {
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Find and replace any remaining WoodMart copyright text
var copyrightElements = document.querySelectorAll('.min-footer .col-left, .copyrights-wrapper .col-left, .min-footer p');
copyrightElements.forEach(function(element) {
if (element.innerHTML && (element.innerHTML.includes('WoodMart') || element.innerHTML.includes('WooCommerce Themes'))) {
element.innerHTML = '<?php echo cardsord_custom_copyright(); ?>';
}
});
});
</script>
<?php
}, 99);
// Override the theme's copyright option with higher priority
add_filter( 'option_woodmart_copyrights', function($value) {
return cardsord_custom_copyright();
}, 99);
// Override using the theme's own filter system
add_filter( 'woodmart_option', function($value, $slug) {
if ($slug === 'copyrights') {
return cardsord_custom_copyright();
}
return $value;
}, 99, 2);
// Also modify the global options array directly
add_action('init', function() {
global $xts_woodmart_options, $woodmart_options;
if (isset($xts_woodmart_options)) {
$xts_woodmart_options['copyrights'] = cardsord_custom_copyright();
}
if (isset($woodmart_options)) {
$woodmart_options['copyrights'] = cardsord_custom_copyright();
}
}, 1);
// Force update the copyright option immediately
add_action('init', function() {
// Clear any cached options
wp_cache_delete('woodmart_copyrights', 'options');
// Force update the option
update_option('woodmart_copyrights', cardsord_custom_copyright());
}, 1);
// Also hook into wp_loaded for extra assurance
add_action('wp_loaded', function() {
update_option('woodmart_copyrights', cardsord_custom_copyright());
// Clear any theme-related transients
delete_transient('woodmart_options');
delete_transient('xts_woodmart_options');
wp_cache_flush();
});