[wp-trac] [WordPress Trac] #19902: blog_url() and get_blog_url() template tags

WordPress Trac noreply at wordpress.org
Mon Sep 15 17:32:58 UTC 2014


#19902: blog_url() and get_blog_url() template tags
-----------------------------------+------------------------------
 Reporter:  johnjamesjacoby        |       Owner:
     Type:  feature request        |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Permalinks             |     Version:  3.3.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------------

Comment (by johnjamesjacoby):

 Replying to [comment:11 SergeyBiryukov]:
 > This sounds similar to how
 [http://codex.wordpress.org/Function_Reference/is_front_page
 is_front_page()] works, so I'd suggest `get_front_page_url()` and
 `front_page_url()` for consistency.

 `is_front_page()` and `is_home()` are only two poorly-named parts of the
 equation.

 * Getting the front-page URL is easy; it's always the root of the site
 domain + path. This can be done quite easily virtually anywhere
 (`wp_options`, `wp_blogs`, `wp_site`, `wp_bp_blogs` for buddypress.) We
 have helper functions to tell us whether or not there are posts at this
 root location, but no function to return the URL if they are not.
 * Getting the blog-index URL is less-easy, requiring something akin to the
 attached patch. Once the post index is changed from the root/front/home,
 it could reside almost anywhere. The attached patch attempts to shed light
 on where that might be, from outside the context of the current
 blog/site/network.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/19902#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list