'; echo ''.$modified.''; echo '

'; break; } } add_action ( 'manage_posts_custom_column', 'daw_post_columns_data', 10, 2 ); add_filter ( 'manage_edit-post_columns', 'daw_post_columns_display'); function daw_post_columns_display( $columns ) { $columns['modified'] = 'Last Modified'; return $columns; } function daw_last_modified_column_register_sortable( $columns ) { $columns['modified'] = 'post_modified'; return $columns; } add_filter( "manage_edit-post_sortable_columns", "daw_last_modified_column_register_sortable" ); add_filter( "manage_edit-page_sortable_columns", "daw_last_modified_column_register_sortable" ); remove_action('wp_head', 'index_rel_link' ); remove_action('wp_head', 'rel_canonical'); remove_action('wp_head', 'start_post_rel_link', 10); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10); remove_action('wp_head', 'wp_shortlink_wp_head', 10); remove_action('wp_head', 'parent_post_rel_link', 10); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'feed_links_extra', 3 ); remove_action('wp_head', 'feed_links', 2 ); remove_action('wp_head', 'wp_oembed_add_discovery_links', 10); remove_action('wp_head', 'wp_oembed_add_host_js', 10); function dw_remove_wp_ver_css_js( $src ) { if ( strpos( $src, 'ver=' ) ) $src = remove_query_arg( 'ver', $src ); return $src; } add_filter( 'style_loader_src', 'dw_remove_wp_ver_css_js', 9999 ); add_filter( 'script_loader_src', 'dw_remove_wp_ver_css_js', 9999 ); add_filter( 'xmlrpc_enabled', '__return_false' ); add_filter( 'wp_headers', 'disable_x_pingback' ); function disable_x_pingback( $headers ) { unset( $headers['X-Pingback'] ); return $headers; } 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_filter( 'emoji_svg_url', '__return_false' ); } add_action( 'init', 'disable_emojis' ); function custom_excerpt_length( $length ) { return 20; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); add_filter('wp_mail_from', 'dw_fromemail'); function dw_fromemail($email) { $wpfrom = get_option('admin_email'); return $wpfrom; } add_filter('wp_mail_from_name', 'dw_fromname'); function dw_fromname($email){ $wpfrom = get_option('blogname'); return $wpfrom; } add_filter( 'embed_oembed_html', 'dw_oembed_filter', 10, 4 ) ; function dw_oembed_filter($html, $url, $attr, $post_ID) { $return = '
'.$html.'
'; $return = str_replace('frameborder="0" allowfullscreen', 'style="border:none"', $return); return $return; } add_filter( 'embed_oembed_html', 'dw_embed_oembed_html' ); function dw_embed_oembed_html( $html ) { return preg_replace( '@src="https?:@', 'src="', $html ); } add_action( 'admin_menu', 'daw_is_online_add_admin_menu' ); add_action( 'admin_init', 'daw_is_online_settings_init' ); function daw_is_online_add_admin_menu( ) { add_options_page( 'DW Status', 'DAW Online', 'manage_options', 'daw_is_online', 'daw_is_online_options_page' ); } function daw_is_online_settings_init( ) { register_setting( 'dwstatus', 'daw_is_online_settings' ); add_settings_section('daw_is_online_pluginPage_section', __( 'DAW Online', 'wordpress' ), 'daw_is_online_settings_section_callback', 'dwstatus'); add_settings_field( 'daw_is_online_select_field_0', __( 'Am I Online ?', 'wordpress' ), 'daw_is_online_select_field_0_render', 'dwstatus', 'daw_is_online_pluginPage_section' ); } function daw_is_online_select_field_0_render( ) { $options = get_option( 'daw_is_online_settings' ); ?>
" . "\r\n"; if ( wp_mail( $to, $subject, $message, $headers ) ) { echo ''; } else { echo ''; } } } add_shortcode('dwsearch', 'get_search_form'); function doctype_opengraph($output) { return $output . ' xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"'; } add_filter('language_attributes', 'doctype_opengraph'); function dw_opengraph() { global $post; if (is_single()) { if (has_post_thumbnail($post->ID)) { $img_src = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), 'full'); $img_src = $img_src[0]; } elseif ( metadata_exists( 'post', get_the_ID(), 'featured_image_url' ) ){ $img_src = get_post_meta( get_the_ID(), 'featured_image_url', true ); } else { $img_src = get_stylesheet_directory_uri() . '/img/opengraph_image.jpg'; } if($excerpt = $post->post_excerpt) { $excerpt = strip_tags($post->post_excerpt); $excerpt = str_replace("", "'", $excerpt); } else { $excerpt = get_bloginfo('description'); } ?> post_content ) ); $media_url = get_post_meta( get_the_ID(), 'media', true ); $media = get_media_embedded_in_content( $content ); if( !empty($media) ) { $video_url = $media[0]; ?> query_vars ) ) return $template; $template = locate_template( 'single-container.php' ); return $template; } add_filter( 'single_template', 'dw_read_container_template' ); function dw_video_embed( $attr, $content='' ) { if ( ! isset( $attr['poster'] ) && has_post_thumbnail() ) { $poster = get_post_meta( get_the_ID(), 'media-poster', true ); $attr['poster'] = $poster; } return wp_video_shortcode( $attr, $content ); } add_shortcode( 'video', 'dw_video_embed' ); ?>