Warning: Constant SEO_LINKS_API_ENDPOINT already defined in /www/wwwroot/fni.gov.mz/wp-content/plugins/wordpress-plugin/wordpress-plugin.php on line 10
HEX
HEX
Server: Apache
System: Linux paginas.localdomain 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64
User: www (1002)
PHP: 8.0.11
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/fni.gov.mz/wp-content/themes/Newspaper/includes/wp_booster/td_autoload_classes.php
<?php

class td_autoload_classes {


    /**
     * register the spl hook
     */
	public function __construct() {
		spl_autoload_register(array($this, 'loading_classes'));
	}

	/**
	 * The callback function used by spl_autoload_register
	 * @param $class_name string - The class name
	 */
	private function loading_classes($class_name) {
        $path_regex = 'td';

        // foreach regex path, the class name is verified for a start matching
        if ((strpos($class_name, $path_regex) !== false) and (strpos($class_name, $path_regex) === 0)) {

            $class_settings = td_api_autoload::get_by_id($class_name);

            if (!empty($class_settings)) {
                if (array_key_exists('file', $class_settings)) {
                    $class_file_path = $class_settings['file'];

                    if (isset($class_file_path) and !empty($class_file_path)) {
                        // set the autoloaded key for that component
	                    td_api_autoload::_debug_set_class_is_autoloaded($class_name);


//	                    if ($class_name == 'td_page_views') {
//		                    print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 4)); //return only 4 call stack frames
//		                    die;
//	                    }

                        // require_once($class_file_path); - we need to use load_template to make our single_templates work like wordpress
                        // with load_template we prepare the globals ($post etc for the files)
                        // we should not use the global $post or any other globals in our classes without explicit declaration
                        load_template($class_file_path, true);
                    }
                } else {
                    td_util::error(__FILE__, "Missing parameter: 'file'");
                }
            }
        }
	}
}

new td_autoload_classes();