Remove image of srcset

If you look in core, that filter is applied like so: $image_meta = apply_filters( ‘wp_calculate_image_srcset_meta’, $image_meta, $size_array, $image_src, $attachment_id ); Instead of using __return_empty_array you need to add a custom function to that filter to remove the srcset size you are trying to get rid of. Something like this. function my_srcset_function($image_meta) { if (!is_array($image_meta)) { … Read more

Calling hooks in functions

You’re on the right path with your add_filter, but this is the right way to implement filters. add_filter( ‘gigpress_related_post_types’, ‘my_related_post_types’ ); function my_related_post_types( $post_types ) { return array( ‘productions’ ); } The hook add_filter must call a function that returns something to pass to the apply_filters in the code you referenced. You should add in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)