Opened 15 years ago
Closed 13 years ago
#18632 closed defect (bug) (fixed)
wp_get_shortlink() Should Always Return a URL
| Reported by: | cais | Owned by: | ryan |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.7 |
| Component: | Template | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: |
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
@
15 years ago
- Component Shortcodes → Template
- Summary wp_get_shortcode() Should Always Return a URL → wp_get_shortlink() Should Always Return a URL
#4
in reply to: ↑ 3
@
15 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
@
15 years ago
- Version 3.3 → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
+1
Cais beat me to the punch!