URL Object
-
hi
i would to suggest to wordpress to build a wordpress URL Object how implement ur(l distribution logic like theses example :
this url : ” https://localhost/wordpress/abstract-request/author/admin/ ”
{ protocol:"http", root:"://localhost/wordpress/abstract-request/" path:"author/admin/" template_inherit: author.php user: admin /**some stuff*/ }
another example with this url : “https://localhost/wordpress/abstract-request/2021/10/20/bonjour-tout-le-monde/” (a comment url)
{ protocol:"http", root:"://localhost/wordpress/abstract-request/" path:"2021/10/20/bonjour-tout-le-monde/" template_inherit: single.php date:20-10-2021 /**some stuff*/ }
another example with this url : https://localhost/wordpress/abstract-request/category/classified/
{ protocol:"http", root:"://localhost/wordpress/abstract-request/" path:"category/car/" template_inherit: category-car.php category_name : car category_slug : car parent_category : vehicle /**some stuff*/ }
i would suggest to create a function with this object, how can call a callback and apply some logic if object match some conditions.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘URL Object’ is closed to new replies.