Guest User

Untitled

a guest
Feb 22nd, 2024
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. add_filter('avf_add_elements_wpseo_sitemap', function($elements, $postid) {
  2. $image = array(
  3. 'image' => array(
  4. 'pattern' => '/\[av_image [^]]*]/',
  5. 'source' => 'src'
  6. ),
  7. 'image' => array(
  8. 'pattern' => '/\[av_image [^]]*]/',
  9. 'source' => 'attachment'
  10. ),
  11. 'accordion' => array(
  12. 'pattern' => '/\[av_slideshow_accordion(.+?)?\](?:(.+?)?\[\/av_slideshow_accordion\])?/sim',
  13. 'source' => 'sid'
  14. ),
  15. 'gallery' => array(
  16. 'pattern' => '/\[av_gallery(.+?)?\](?:(.+?)?\[\/av_gallery\])?/sim',
  17. 'source' => 'sid'
  18. ),
  19. 'slideshow' => array(
  20. 'pattern' => '/\[av_slideshow(.+?)?\](?:(.+?)?\[\/av_slideshow\])?/sim',
  21. 'source' => 'sid'
  22. ),
  23. 'slideshow_full' => array(
  24. 'pattern' => '/\[av_slideshow_full(.+?)?\](?:(.+?)?\[\/av_slideshow_full\])?/sim',
  25. 'source' => 'sid'
  26. ),
  27. 'slideshow_fullscreen' => array(
  28. 'pattern' => '/\[av_fullscreen(.+?)?\](?:(.+?)?\[\/av_fullscreen\])?/sim',
  29. 'source' => 'sid'
  30. ),
  31. 'gallery' => array(
  32. 'pattern' => '/\[av_gallery [^]]*]/',
  33. 'source' => 'ids'
  34. ),
  35. 'horizontal' => array(
  36. 'pattern' => '/\[av_horizontal_gallery [^]]*]/',
  37. 'source' => 'ids'
  38. )
  39. );
  40.  
  41. return array_merge($image, $elements);
  42. }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment