| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Module Name: Beautiful Math |
| 4 | - * Module Description: Use the LaTeX markup language to write mathematical equations and formulas | |
| 4 | + * Module Description: Add beautifully formatted math equations to your posts and pages using LaTeX. | |
| 5 | 5 | * Sort Order: 12 |
| 6 | 6 | * First Introduced: 1.1 |
| 7 | 7 | * Requires Connection: No |
| 8 | 8 | * Auto Activate: No |
| @@ -12,8 +12,12 @@ | ||
| 12 | 12 | * |
| 13 | 13 | * @package automattic/jetpack |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 17 | + exit( 0 ); | |
| 18 | +} | |
| 19 | + | |
| 16 | 20 | /** |
| 17 | 21 | * LaTeX support. |
| 18 | 22 | * |
| 19 | 23 | * Backward compatibility requires support for both "[latex][/latex]", and |
| @@ -92,9 +96,9 @@ | ||
| 92 | 96 | * @param string $default_color Default fallback color to use. |
| 93 | 97 | */ |
| 94 | 98 | function latex_get_default_color( $color, $default_color = 'ffffff' ) { |
| 95 | 99 | global $themecolors; |
| 96 | - return isset( $themecolors[ $color ] ) ? $themecolors[ $color ] : $default_color; | |
| 100 | + return $themecolors[ $color ] ?? $default_color; | |
| 97 | 101 | } |
| 98 | 102 | |
| 99 | 103 | /** |
| 100 | 104 | * Decode special characters in a LaTeX string. |