mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-22 17:23:55 +01:00
remove useless functions
This commit is contained in:
parent
0962184e47
commit
0e3736bf0e
@ -26,16 +26,6 @@ require_once WPTHEME_INC . 'cpt-presscoverage.php';
|
|||||||
require_once WPTHEME_INC . 'cpt-event.php';
|
require_once WPTHEME_INC . 'cpt-event.php';
|
||||||
require_once WPTHEME_INC . 'cpt-testimonial.php';
|
require_once WPTHEME_INC . 'cpt-testimonial.php';
|
||||||
|
|
||||||
|
|
||||||
// REMOVE WIDTH AND HEIGHT ATTRIBUTES ON THUMBNAILS
|
|
||||||
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 );
|
|
||||||
add_filter( 'image_send_to_editor', 'remove_thumbnail_dimensions', 10 );
|
|
||||||
|
|
||||||
function remove_thumbnail_dimensions( $html ) {
|
|
||||||
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html );
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
//remove emoji script
|
//remove emoji script
|
||||||
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
||||||
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||||
@ -56,13 +46,6 @@ if( function_exists('acf_add_options_page') ) {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
//add excerpt to page
|
|
||||||
function wpcodex_add_excerpt_support_for_pages() {
|
|
||||||
add_post_type_support( 'page', 'excerpt' );
|
|
||||||
}
|
|
||||||
add_action( 'init', 'wpcodex_add_excerpt_support_for_pages' );
|
|
||||||
|
|
||||||
|
|
||||||
//Register Navigation
|
//Register Navigation
|
||||||
function register_primary_nav_menu() {
|
function register_primary_nav_menu() {
|
||||||
register_nav_menu('landing-menu',__( 'Product Tour Navigation Menu' ));
|
register_nav_menu('landing-menu',__( 'Product Tour Navigation Menu' ));
|
||||||
@ -71,14 +54,6 @@ function register_primary_nav_menu() {
|
|||||||
}
|
}
|
||||||
add_action( 'init', 'register_primary_nav_menu');
|
add_action( 'init', 'register_primary_nav_menu');
|
||||||
|
|
||||||
// ENABLE HR IN WSYWIG
|
|
||||||
function enable_more_buttons($buttons) {
|
|
||||||
$buttons[] = 'hr';
|
|
||||||
|
|
||||||
return $buttons;
|
|
||||||
}
|
|
||||||
add_filter("mce_buttons", "enable_more_buttons");
|
|
||||||
|
|
||||||
// ADD QUERY VAR FOR EVENT PAGINATION
|
// ADD QUERY VAR FOR EVENT PAGINATION
|
||||||
add_filter('query_vars', 'add_my_var');
|
add_filter('query_vars', 'add_my_var');
|
||||||
function add_my_var($public_query_vars) {
|
function add_my_var($public_query_vars) {
|
||||||
|
Loading…
Reference in New Issue
Block a user