','', $content); $content = str_replace('','', $content); return $content; } add_filter( 'the_content', 'add_responsive_video_filter', 9999 ); // Admin bar niet tonen add_filter('show_admin_bar', '__return_false'); // Default gallery stijl uitschakelen (die irritante hardcoded border van 2px grijs ;) add_filter( 'use_default_gallery_style', '__return_false' ); // Custom gallery add_filter('post_gallery', 'custom_gallery', 10, 2); function custom_gallery($output, $attr) { global $post; if (isset($attr['orderby'])) { $attr['orderby'] = sanitize_sql_orderby($attr['orderby']); if (!$attr['orderby']) unset($attr['orderby']); } extract(shortcode_atts(array( 'order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'dl', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => 'thumbnail', 'include' => '', 'exclude' => '' ), $attr)); $id = intval($id); if ('RAND' == $order) $orderby = 'none'; if (!empty($include)) { $include = preg_replace('/[^0-9,]+/', '', $include); $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); $attachments = array(); foreach ($_attachments as $key => $val) { $attachments[$val->ID] = $_attachments[$key]; } } if (empty($attachments)) return ''; // Here's your actual output, you may customize it to your need $output .= '
    '; $galleryID = md5(rand(0,99999) . time()); // Now you loop through each attachment foreach ($attachments as $id => $attachment) { // Fetch the thumbnail (or full image, it's up to you) // $img = wp_get_attachment_image_src($id, 'medium'); // $img = wp_get_attachment_image_src($id, 'my-custom-image-size'); $img = wp_get_attachment_image_src($id, 'gallery'); $imgZoom = wp_get_attachment_image_src($id, 'gallery-zoom'); $output .= '
  • ' . "\n"; } $output .= "
\n"; return $output; } /* ************************************************** * Zoeken op bestandsnaam in de media manager ************************************************* */ add_filter( 'posts_search', 'guid_search_so_14940004', 10, 2 ); function guid_search_so_14940004( $search, $a_wp_query ) { global $wpdb, $pagenow; // Only Admin side && Only Media Library page if ( !is_admin() && 'upload.php' != $pagenow ) return $search; $s = (isset($a_wp_query->query_vars['s'])) ? $a_wp_query->query_vars['s']:$_GET['s']; // Original search string: // AND (((wp_posts.post_title LIKE '%search-string%') OR (wp_posts.post_content LIKE '%search-string%'))) $search = str_replace( 'AND ((', 'AND (((' . $wpdb->prefix . 'posts.guid LIKE \'%' . $s . '%\') OR ', $search ); return $search; } // Lege zoekopdrachten voorkomen function voorkomLegeZoekopdracht($query) { if (isset($_GET['s']) && empty($_GET['s']) && $query->is_main_query()){ header('Location: /'); die(); } return $query; } add_filter('pre_get_posts','voorkomLegeZoekopdracht'); // Geen standaard link naar afbeelding update_option('image_default_link_type','none'); // Enqueue CSS and scripts function removeEmoijHeaders() { remove_action('wp_head', 'print_emoji_detection_script', 7); remove_action('wp_print_styles', 'print_emoji_styles'); remove_action('admin_print_scripts', 'print_emoji_detection_script'); remove_action('admin_print_styles', 'print_emoji_styles'); } add_action('wp_enqueue_scripts', 'removeEmoijHeaders',50); Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/hetbandencentrum.nl/webspace/httpdocs/hetbandencentrum.nl/nieuw/wp-content/themes/hetbandencentrum/include/sov-tweaks.php:1) in /var/www/vhosts/hetbandencentrum.nl/webspace/httpdocs/hetbandencentrum.nl/nieuw/wp-includes/pluggable.php on line 1435