HEX
Server:Apache
System:Linux localhost 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64
User:enlugo-es (10006)
PHP:7.4.33
Disabled:opcache_get_status
Upload Files
File: /var/www/vhosts/enlugo.es/httpdocs/wp-content/plugins/landing-pages/modules/module.utils.php
<?php
/*
*	Utilities functions used throughout the plugin
*/

/* Fix wp_title for known bad behavior themes */
add_action('wp', 'landingpage_fix_known_wp_title_isses', 10);
function landingpage_fix_known_wp_title_isses() {

    if ('landing-page' != get_post_type()) {
        return;
    }

    remove_filter('wp_title', 'genesis_doctitle_wrap', 20);
    remove_filter('wp_title', 'genesis_default_title', 10);
}

/* Fix qtranslate issues */
if (!function_exists('inbound_qtrans_disable')) {
    function inbound_qtrans_disable() {
        global $typenow, $pagenow;

        if (in_array($typenow, array('landing-page' || 'wp-call-to-action')) && /* post_types where qTranslate should be disabled */
            in_array($pagenow, array('post-new.php', 'post.php'))
        ) {
            remove_action('admin_head', 'qtrans_adminHeader');
            remove_filter('admin_footer', 'qtrans_modifyExcerpt');
            remove_filter('the_editor', 'qtrans_modifyRichEditor');
        }
    }
    add_action('current_screen', 'inbound_qtrans_disable');
}




/**
 * Add namespaces for legacy classes to try and prevent fatals
 */
if (!class_exists('LP_EXTENSION_UPDATER') ){
    /**
     * Class LP_EXTENSION_UPDATER depreciated class name
     * @package xDepreciated
     */
    class LP_EXTENSION_UPDATER { };

    /**
     * Class LP_EXTENSION_LICENSENING depreciated class name
     * @package xDepreciated
    */
    class LP_EXTENSION_LICENSENING { };
}