anomore
Forum Replies Created
-
Forum: Plugins
In reply to: [Unique Headers] My fix for Twenty SixteenThank you man!
I realized that my fix didn’t work well, but I didn’t have time to work on this.— Update —
In my article category doesn’t appears the box for header selection.
- This reply was modified 9 years, 2 months ago by anomore.
Forum: Plugins
In reply to: [Unique Headers] Unique Headers not working in FireFox or ChromeThe problem is Twenty Sixteen uses get_custom_header() that uses header_image_data.
I solved the problem by changing the plugin in this way:File class-unique-headers-display.php:
Add
add_filter( 'theme_mod_header_image_data', array( 'Custom_Image_Meta_Box', 'header_image_data_filter' ), 20 );afteradd_filter( 'theme_mod_header_image', array( $this, 'header_image_filter' ), 20 );File class-unique-headers-taxonomy-header-images.php:
Add
add_filter( 'theme_mod_header_image_data', array( 'Custom_Image_Meta_Box', 'header_image_data_filter' ), 5 );afteradd_filter( 'theme_mod_header_image', array( $this, 'header_image_filter' ), 5 );File class-custom-image-meta-box.php:
Add this static method to class:
static function header_image_data_filter( $data ) { if (!$data) return; $url = get_header_image(); return (object) array( 'attachment_id' => attachment_url_to_postid($url), 'url' => $url, 'thumbnail_url' => $url, 'height' => $data->height, 'width' => $data->width, ); }Bye!