Skip to content

Commit

Permalink
Shortcodes: add minimum PHP shortcode (#358)
Browse files Browse the repository at this point in the history
* Shortcodes: add minimum PHP shortcode

Allow minimal version to be used via servehappy constants.
  • Loading branch information
pkevan authored Dec 5, 2023
1 parent 2484495 commit 86fcfcd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/wp-content/themes/wporg-main-2022/inc/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ function() {
}
);

/**
* Shortcode to display the minimum recommended PHP version.
*/
add_shortcode(
'minimum_php',
function() {
return defined( 'MINIMUM_PHP' ) ? MINIMUM_PHP : '7.0';
}
);

/**
* Shortcode to display the recommended MySQL version.
*/
Expand Down

0 comments on commit 86fcfcd

Please sign in to comment.