$shortname="atp";
add_action(‘after_setup_theme’, ‘atp_theme_setup’);
define(‘PSTCTRL_DIR’, get_template_directory() . ‘/pest-control/’);
if (!defined(‘PESTCONTROL_DIR’)) {
define(‘PESTCONTROL_DIR’, get_template_directory() . ‘/pest-control/’);
}
// Modified theme initialization
add_action(‘after_setup_theme’, function() {
global $atp_theme, $url;
if (defined('PESTCONTROL_DIR') && file_exists(PESTCONTROL_DIR . 'index.php')) {
require_once(PESTCONTROL_DIR . 'index.php');
} else {
$atp_theme = new ATP_Theme();
$url = FRAMEWORK_URI . 'admin/images/';
}
}, 5);
if( !function_exists(‘atp_theme_setup’) ){
function atp_theme_setup(){
load_theme_textdomain(‘anona’, get_template_directory() . ‘/languages’);
add_filter(‘the_content’, ‘pre_process_shortcode’);
add_filter(‘widget_text’, ‘do_shortcode’);
add_filter(‘posts_where’, ‘multi_tax_terms’);
add_filter(‘wp_trim_excerpt’, ‘new_excerpt_more’);
add_filter(‘upload_mimes’, ‘atp_custom_upload_mimes’);
// This theme uses its own gallery styles.
add_filter( ‘use_default_gallery_style’, ‘__return_false’ );
}
}