If you're in the web business, it' likely you have something to do with WordPress. The shortcode function on this page serves to provide a download link to the current version of the package. It's not intended as an alternative to the WordPress website, or as an alternative to the inbuilt update features. We use it on our own reference page as a means to provide a quick reference for our own fresh installs.
We utilize the WordPress API as described on the WP Codex page. The result is cached locally for 12 hours to avoid repeated requests.
The Result
To display the download link only, use [bmwordpress]
. The result:
Download Current Version [ Download ] (V6.7.1)
We would like access to the Australian locale so we use [bmwordpress locale="en_AU"]
. The result:
Download Current Version [ Download ] (V6.7.1), Localised en_AU Version [ Download ] (V6.7.1)
WordPress Shortcode
Copy and paste the WordPress function into your theme's functions.php
file or, if you sensibly have one installed, your custom functions plugin. You may optionally download and install our plugin from the bottom of of the page.
If you require shortcode to work in a sidebar widget, you'll have to enable the functionality with a filter. If you're using our custom functions plugin, you'll have that feature enabled by default.
PHP Code
Used outside of WordPress, the following may be used. Usage requires Simple Cache.
Considerations
- If you use a locale, ensure you copy it in the correct format (
en_AU
). - Alter the text to return your desired text. We coded it to best suit our needs... and it may not be consistent with yours.
- Include the required PHP and MySQL version into your text with
$php_version
and$mysql_version
. - If you supply a locale, ensure it's correct. If invalid, the response will only return an error.
Download
Title: WordPress Current Download Link (WP Plugin)
Description: Provide a Download Link For The Latest Version Of WordPress (With Shortcode or PHP).
Download • Version 0.1, 1.6K, zip, Category: WordPress Plugins (General)
WordPress Shortcodes, (1.0K) PHP Code & Snippets, (1.0K)