Skip to content

Commit

Permalink
Shortcodes: add minimum PHP shortcode
Browse files Browse the repository at this point in the history
Allow minimal version to be used via servehappy constants.
  • Loading branch information
pkevan authored Dec 5, 2023
1 parent 2484495 commit 9e00319
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: substr( phpversion(), 0, 3 );
}
);

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

0 comments on commit 9e00319

Please sign in to comment.