Changeset 2247720
- Timestamp:
- 02/20/2020 06:52:40 PM (6 years ago)
- Location:
- color-your-bar
- Files:
-
- 9 added
- 2 edited
-
assets/screenshot-3.jpg (added)
-
tags/1.2 (added)
-
tags/1.2/color-picker.js (added)
-
tags/1.2/color-your-bar.php (added)
-
tags/1.2/readme.txt (added)
-
tags/1.3 (added)
-
tags/1.3/color-picker.js (added)
-
tags/1.3/color-your-bar.php (added)
-
tags/1.3/readme.txt (added)
-
trunk/color-your-bar.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
color-your-bar/trunk/color-your-bar.php
r2204720 r2247720 6 6 * Author: Darshan Saroya 7 7 * Author URI: http://darshansaroya.com 8 * Version: 1. 38 * Version: 1.4 9 9 * Text Domain: color-your-bar 10 10 * Domain Path: languages … … 24 24 * @package Color Your Bar 25 25 * @author Darshan Saroya 26 * @version 1. 226 * @version 1.4 27 27 */ 28 28 … … 43 43 44 44 function cyb_add_head_tag(){ 45 $enable_cyb= get_option('cyb-switch'); 46 if($enable_cyb!='0'){ 45 47 global $post; 46 $cyb_post = get_post_type($post->ID);47 48 $cyb_post_type = get_option( 'cyb-post-type'); 48 $ enable_cyb= get_option('cyb-switch');49 $cyb_color= get_option('cyb-color');50 if(null !== $cyb_post_type && is_array($cyb_post_type)){51 foreach ($cyb_post_type as $post_type ){52 if($cyb_post == $post_type){49 $cyb_color= get_option('cyb-color', esc_html('#ffffff')); 50 if($post): 51 $cyb_post = get_post_type($post->ID); 52 if(null !== $cyb_post_type && is_array($cyb_post_type)){ 53 foreach ($cyb_post_type as $post_type ) { 53 54 $color = get_post_meta( $post->ID, 'cyb-color', true ); 54 if( null !== $color){55 if($cyb_post == $post_type && $color !=''){ 55 56 $cyb_color = $color; 56 57 } 57 58 } 58 59 } 59 } 60 if($enable_cyb!='0'){ ?> 61 <meta name="theme-color" content="<?php echo esc_html( $cyb_color ); ?>"> 60 endif; ?> 61 <meta name="theme-color" content="<?php echo esc_attr( $cyb_color ); ?>"> 62 62 <meta name="apple-mobile-web-app-capable" content="yes"> 63 63 <meta name="apple-mobile-web-app-status-bar-style" content="black"> … … 101 101 102 102 // Add the submit button to serialize the options 103 submit_button(); 104 103 submit_button(); 105 104 ?> 106 105 </form> -
color-your-bar/trunk/readme.txt
r2204720 r2247720 41 41 == Changelog == 42 42 43 = 1.2 = 43 = 1.4 = 44 Bug fixes for non-id pages. 45 46 = 1.3 = 44 47 Compatibility to WordPress 5.3 45 48 Meta Box Added: Now you can color every single page/post chrome bar.
Note: See TracChangeset
for help on using the changeset viewer.