Changeset 2232846
- Timestamp:
- 01/24/2020 03:37:18 PM (6 years ago)
- File:
-
- 1 edited
-
the-insertr/trunk/the-insertr.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
the-insertr/trunk/the-insertr.php
r2215006 r2232846 6 6 * Description: Wordpress dynamic keyword insertion plugin. 7 7 * Author: Herdl 8 * Version: 1. 3.08 * Version: 1.4.1 9 9 * Author URI: https://herdl.com 10 10 */ … … 17 17 $attributes = shortcode_atts([ 18 18 'key' => '', 19 'fallback' => '' 19 'fallback' => '', 20 'case' => '', 20 21 ], $attributes, 'insertr'); 21 22 22 23 $key = $attributes['key']; 23 24 $adword = ''; 25 $case = 'lower'; 24 26 25 27 if (isset($_GET[$key])) { … … 29 31 } 30 32 33 if ($attributes['case']) { 34 $case = $attributes['case']; 35 } 36 37 if ($case === 'lower') { 38 $adword = strtolower($adword); 39 } else if ($case === 'upper') { 40 $adword = strtoupper($adword); 41 } else if ($case === 'title') { 42 $adword = ucwords($adword); 43 } 44 31 45 return esc_html($adword); 32 46 } 33 47 34 48 add_shortcode('insertr', 'insertr_function'); 49
Note: See TracChangeset
for help on using the changeset viewer.