post_parent ) && $image->post_parent != $id ) $url .= '#main'; return $url; } add_filter( 'attachment_link', '_ph_enhanced_image_navigation', 10, 2 ); function disable_emojis_tinymce( $plugins ) { if ( is_array( $plugins ) ) { return array_diff( $plugins, array( 'wpemoji' ) ); } else { return array(); } } function disable_emojis() { 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_action( 'admin_print_styles', 'print_emoji_styles' ); remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' ); } add_action( 'init', 'disable_emojis' ); add_action('init', 'ph_head_cleanup'); function ph_head_cleanup() { remove_action('wp_head', 'feed_links'); remove_action('wp_head', 'feed_links', 2 ); remove_action('wp_head', 'feed_links_extra'); remove_action('wp_head', 'feed_links_extra', 3 ); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'parent_post_rel_link'); remove_action('wp_head', 'start_post_rel_link'); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'wp_shortlink_wp_head'); remove_action('wp_head', 'rel_canonical'); } add_action('admin_menu', 'remove_menus'); function remove_menus () { global $menu; // $restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins')); $restricted = array(); end ($menu); while (prev($menu)){ $value = explode(' ',$menu[key($menu)][0]); if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);} } } add_action('login_head', 'phf_login_logo'); function phf_login_logo() { echo ''; } //add_action( 'admin_head', 'phf_hide' ); function phf_hide() { ?> '; wp_widget_rss_output(array( 'url' => 'http://phfilms.com/feed/', 'title' => 'PHFilms.com', 'items' => 4, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 1 )); echo ""; } add_action('wp_dashboard_setup', 'ph_rss_widget'); function ph_rss_widget(){ wp_add_dashboard_widget( 'ph-rss', 'PHFilms', 'ph_rss_output'); } function ph_editor_styles() { add_editor_style( 'style.css' ); } //add_action( 'init', 'ph_editor_styles' ); ?>