Opened 13 years ago
Closed 11 years ago
#18632 closed defect (bug) (fixed)
wp_get_shortlink() Should Always Return a URL
Reported by: | cais | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Template | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Currently the code used in the link-template.php file causes the wp_get_shortcode
function to return an empty result if the WordPress installation is using the default permalink structure. This causes at least issues with the_shortcode
function and can be expected to cause issues any place that wp_get_shortcode
is called when the default permalink structure is being used.
An alternative is to simply make the inline documentation state an empty result will be returned when the default permalink structure is used.
Attachments (1)
Change History (8)
#3
follow-up:
↓ 4
@
13 years ago
- Component changed from Shortcodes to Template
- Summary changed from wp_get_shortcode() Should Always Return a URL to wp_get_shortlink() Should Always Return a URL
#4
in reply to:
↑ 3
@
13 years ago
Replying to johnbillion: Good catch, I don't find many issues (and subsequent potential solutions) so I was a bit excited when I wrote up this ticket. Thanks.
#5
@
13 years ago
- Version changed from 3.3 to 3.1
To me it seems like the inline documentation should be updated.
Our shortlink API is designed to only provide a shortlink when one is available. If no shorter link is available, I'd rather not return something.
This patch would also be a change from its introduction. Not a backwards incompatible change, granted.
+1
Cais beat me to the punch!