Advertisement
retesere20

Untitled

Jan 14th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. add_filter('post_rewrite_rules', array($this,'filter_post_rewrite_rules') );
  2. add_filter('page_rewrite_rules', array($this,'filter_page_rewrite_rules') );
  3. // var_dump there the first arg.
  4. also:
  5.  
  6. add_filter( 'request', function ( $query_vars ) {
  7. if(!is_admin()) {
  8. echo '<pre>' . print_r( $query_vars, true ) . '</pre>';
  9. }
  10. return $query_vars;
  11. } , 1 );
  12.  
  13.  
  14.  
  15. Posts (original)
  16. array (size=19)
  17. '[^/]+/attachment/([^/]+)/?$' => string 'index.php?attachment=$matches[1]' (length=32)
  18. '[^/]+/attachment/([^/]+)/trackback/?$' => string 'index.php?attachment=$matches[1]&tb=1' (length=37)
  19. '[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?attachment=$matches[1]&feed=$matches[2]' (length=49)
  20. '[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?attachment=$matches[1]&feed=$matches[2]' (length=49)
  21. '[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$' => string 'index.php?attachment=$matches[1]&cpage=$matches[2]' (length=50)
  22. '[^/]+/attachment/([^/]+)/embed/?$' => string 'index.php?attachment=$matches[1]&embed=true' (length=43)
  23. '([^/]+)/embed/?$' => string 'index.php?name=$matches[1]&embed=true' (length=37)
  24. '([^/]+)/trackback/?$' => string 'index.php?name=$matches[1]&tb=1' (length=31)
  25. '([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?name=$matches[1]&feed=$matches[2]' (length=43)
  26. '([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?name=$matches[1]&feed=$matches[2]' (length=43)
  27. '([^/]+)/page/?([0-9]{1,})/?$' => string 'index.php?name=$matches[1]&paged=$matches[2]' (length=44)
  28. '([^/]+)/comment-page-([0-9]{1,})/?$' => string 'index.php?name=$matches[1]&cpage=$matches[2]' (length=44)
  29. '([^/]+)(?:/([0-9]+))?/?$' => string 'index.php?name=$matches[1]&page=$matches[2]' (length=43)
  30. '[^/]+/([^/]+)/?$' => string 'index.php?attachment=$matches[1]' (length=32)
  31. '[^/]+/([^/]+)/trackback/?$' => string 'index.php?attachment=$matches[1]&tb=1' (length=37)
  32. '[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?attachment=$matches[1]&feed=$matches[2]' (length=49)
  33. '[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?attachment=$matches[1]&feed=$matches[2]' (length=49)
  34. '[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$' => string 'index.php?attachment=$matches[1]&cpage=$matches[2]' (length=50)
  35. '[^/]+/([^/]+)/embed/?$' => string 'index.php?attachment=$matches[1]&embed=true' (length=43)
  36.  
  37. Pages:
  38. array (size=13)
  39. '.?.+?/attachment/([^/]+)/?$' => string 'index.php?attachment=$matches[1]' (length=32)
  40. '.?.+?/attachment/([^/]+)/trackback/?$' => string 'index.php?attachment=$matches[1]&tb=1' (length=37)
  41. '.?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?attachment=$matches[1]&feed=$matches[2]' (length=49)
  42. '.?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?attachment=$matches[1]&feed=$matches[2]' (length=49)
  43. '.?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$' => string 'index.php?attachment=$matches[1]&cpage=$matches[2]' (length=50)
  44. '.?.+?/attachment/([^/]+)/embed/?$' => string 'index.php?attachment=$matches[1]&embed=true' (length=43)
  45. '(.?.+?)/embed/?$' => string 'index.php?pagename=$matches[1]&embed=true' (length=41)
  46. '(.?.+?)/trackback/?$' => string 'index.php?pagename=$matches[1]&tb=1' (length=35)
  47. '(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?pagename=$matches[1]&feed=$matches[2]' (length=47)
  48. '(.?.+?)/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?pagename=$matches[1]&feed=$matches[2]' (length=47)
  49. '(.?.+?)/page/?([0-9]{1,})/?$' => string 'index.php?pagename=$matches[1]&paged=$matches[2]' (length=48)
  50. '(.?.+?)/comment-page-([0-9]{1,})/?$' => string 'index.php?pagename=$matches[1]&cpage=$matches[2]' (length=48)
  51. '(.?.+?)(?:/([0-9]+))?/?$' => string 'index.php?pagename=$matches[1]&page=$matches[2]' (length=47)
  52.  
  53. Posts (customly registered)
  54. array (size=6)
  55. '(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?post=$matches[1]&feed=$matches[2]' (length=43)
  56. '(.+?)/(feed|rdf|rss|rss2|atom)/?$' => string 'index.php?post=$matches[1]&feed=$matches[2]' (length=43)
  57. '(.+?)/embed/?$' => string 'index.php?post=$matches[1]&embed=true' (length=37)
  58. '(.+?)/page/?([0-9]{1,})/?$' => string 'index.php?post=$matches[1]&paged=$matches[2]' (length=44)
  59. '(.+?)/comment-page-([0-9]{1,})/?$' => string 'index.php?post=$matches[1]&cpage=$matches[2]' (length=44)
  60. '(.+?)/?$' => string 'index.php?post=$matches[1]' (length=26)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement