Skip to content

Instantly share code, notes, and snippets.

@tuannguyenminh2086
Created August 30, 2019 05:09
Show Gist options
  • Save tuannguyenminh2086/83bae18332307983d8e293796e381ce4 to your computer and use it in GitHub Desktop.
Save tuannguyenminh2086/83bae18332307983d8e293796e381ce4 to your computer and use it in GitHub Desktop.
<?php
if(!function_exists('bridge_qode_child_theme_enqueue_scripts')) {
Function bridge_qode_child_theme_enqueue_scripts() {
wp_register_style('bridge-childstyle', get_stylesheet_directory_uri() . '/style.css');
wp_enqueue_style('bridge-childstyle');
}
add_action('wp_enqueue_scripts', 'bridge_qode_child_theme_enqueue_scripts', 11);
// Add custom js
Function theme_js() {
wp_enqueue_script( 'typed_js', 'https://cdn.jsdelivr.net/npm/[email protected]', null, null, true );
wp_enqueue_script( 'theme_js', get_stylesheet_directory_uri() . '/custom.js', array( 'jquery' ), '1.0', true );
}
add_action('wp_enqueue_scripts', 'theme_js');
// mime
function my_custom_mime_types( $mimes ) {
// New allowed mime types.
$mimes['svg'] = 'image/svg+xml';
$mimes['svgz'] = 'image/svg+xml';
// Optional. Remove a mime type.
unset( $mimes['exe'] );
return $mimes;
}
add_filter( 'upload_mimes', 'my_custom_mime_types' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment