File: /var/www/html/wp-content/themes/tokenrecovery/functions.php
<?php
/**
* Theme functions.
*
* @package tokenrecovery
* @author elevedge
* @since 1.0.0
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
define( 'TOKENRECOVERY_VERSION', '1.0.0' );
tokenrecovery_includes();
/**
* @version 1.0.2
*/
function tokenrecovery_includes() {
$inc_dir = get_stylesheet_directory() . '/inc';
$files_list = [
'elementor/taxonomy-filter-select',
'elementor/elementor',
'shortcode/team',
];
foreach ( $files_list as $file ) {
require_once "{$inc_dir}/{$file}.php";
}
}
add_action( 'wp_enqueue_scripts', 'tokenrecovery_assets', 20 );
function tokenrecovery_assets():void {
wp_enqueue_style(
'tokenrecovery',
get_stylesheet_directory_uri() . '/style.css',
[],
TOKENRECOVERY_VERSION
);
wp_enqueue_script(
'tokenrecovery',
get_stylesheet_directory_uri() . '/scripts.js',
[],
TOKENRECOVERY_VERSION
);
}
add_filter( 'upload_mimes', 'tokenrecovery_mime_types' );
function tokenrecovery_mime_types( $mimes ) {
$mimes['svg'] = 'image/svg+xml'; // SVG support
return $mimes;
}