age_gate_logo

Allows the logo set for Age Gate to customised.

This accepts two parameters:

  • $html: the generated markup
  • $image_id the id of the image selected

This could be used to retrieve responsive versions of your logo:

add_filter('age_gate_logo', 'my_logo_filter', 10, 2);

function my_logo_filter($html, $image_id){

  return '<img src="'. wp_get_attachment_url($image_id) .'" srcset="' . wp_get_attachment_image_srcset($image_id) . '" sizes="(max-width: 200px) 100px,
            (max-width: 480px) 150px, 800px">';

}

Note: that this filter is still called even if no logo is selected, though $image_id will be 0