This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function loc_woo_sale_products( $atts ) { | |
| global $woocommerce_loop; | |
| extract(shortcode_atts(array( | |
| 'per_page' => '12', | |
| 'columns' => '4', | |
| 'orderby' => 'date', | |
| 'order' => 'desc' | |
| ), $atts)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_theme_support( 'post-thumbnails', array( 'post', 'page' ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function bdev_remove_dashboard_widgets() { | |
| global $wp_meta_boxes; | |
| unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); | |
| unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] ); | |
| unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); | |
| unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); | |
| unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); | |
| unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); | |
| unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); | |
| unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function my_disable_emojicons() { | |
| remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
| remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
| remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
| remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
| remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); | |
| remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); | |
| remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); | |
| add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' ); | |
| add_filter( 'emoji_svg_url', '__return_false' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Remove from admin menu | |
| add_action( 'admin_menu', 'my_remove_admin_menus' ); | |
| function my_remove_admin_menus() { | |
| remove_menu_page( 'edit-comments.php' ); | |
| } | |
| // Remove from post and pages | |
| add_action( 'init', 'remove_my_comment_support', 100 ); | |
| function remove_comment_support() { | |
| remove_post_type_support( 'post', 'comments' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function exclude_pages_from_my_wp_search() { | |
| global $wp_post_types; | |
| $wp_post_types['page']->exclude_from_search = true; | |
| } | |
| add_action( 'init', 'exclude_pages_from_my_wp_search' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function create_new_custom_post() { | |
| register_post_type( 'custom-post', // name for custom post type | |
| array( | |
| 'labels' => array( | |
| 'name' => __( 'Custom Post' ), | |
| ), | |
| 'public' => true, | |
| 'hierarchical' => true, | |
| 'has_archive' => true, | |
| 'supports' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_image_size( 'admin-list-thumb', 80, 80, false ); | |
| function loc_add_thumbnail_columns( $columns ) { | |
| if ( !is_array( $columns ) ) | |
| $columns = array(); | |
| $new = array(); | |
| foreach( $columns as $key => $title ) { | |
| if ( $key == 'title' ) | |
| $new['featured_thumb'] = __( 'Image'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function show_tinymce_adv_toolbar( $in ) { | |
| $in['wordpress_adv_hidden'] = false; | |
| return $in; | |
| } | |
| add_filter( 'tiny_mce_before_init', 'show_tinymce_adv_toolbar' ); |