Changeset 2034214
- Timestamp:
- 02/19/2019 02:13:03 PM (7 years ago)
- Location:
- post-state-tags
- Files:
-
- 3 edited
- 2 copied
-
tags/2.0.4 (copied) (copied from post-state-tags/tags/2.0.3)
-
tags/2.0.4/post-state-tags.php (copied) (copied from post-state-tags/tags/2.0.3/post-state-tags.php) (7 diffs)
-
tags/2.0.4/readme.txt (modified) (2 diffs)
-
trunk/post-state-tags.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-state-tags/tags/2.0.4/post-state-tags.php
r1946967 r2034214 716 716 { 717 717 718 $color = $this->get_option( $status['option_handle'] , $section , $this->colors[$status['name']] ); 718 $defcolor = array_key_exists($status['name'], $this->colors) ? $this->colors[$status['name']] : ''; 719 $color = $this->get_option( $status['option_handle'] , $section , $defcolor ); 719 720 $css .= $this->color_builder($status['name'], $color); 720 721 721 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 722 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 723 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon); 722 724 $css .= $this->tag_builder($status['name'], $color, $icon); 723 725 … … 729 731 foreach ($special as $status) 730 732 { 731 $color = $this->get_option( $status['option_handle'] , $section , $this->colors[$status['name']] ); 733 $defcolor = array_key_exists($status['name'], $this->colors) ? $this->colors[$status['name']] : ''; 734 $color = $this->get_option( $status['option_handle'] , $section , $defcolor ); 732 735 $css .= $this->color_builder($status['name'], $color); 733 736 734 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 737 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 738 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon); 735 739 $css .= $this->tag_builder($status['name'], $color, $icon); 736 740 } … … 743 747 foreach ($custom as $status) 744 748 { 745 $color = $this->get_option( $status['option_handle'] , $section , $this->colors[$status['name']] ); 749 $defcolor = array_key_exists($status['name'], $this->colors) ? $this->colors[$status['name']] : ''; 750 $color = $this->get_option( $status['option_handle'] , $section , $defcolor ); 746 751 $css .= $this->color_builder($status['name'], $color); 747 752 748 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section, $this->icons[$status['name']] ); 753 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 754 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon); 749 755 $css .= $this->tag_builder($status['name'], $color, $icon); 750 756 } … … 827 833 foreach ($default as $status) 828 834 { 829 $icon_list[ $status['option_handle'] . $this->icon ] = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 835 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 836 $icon_list[ $status['option_handle'] . $this->icon ] = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon ); 830 837 } 831 838 … … 835 842 foreach ($special as $status) 836 843 { 837 $icon_list[ $status['option_handle'] . $this->icon] = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 844 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 845 $icon_list[ $status['option_handle'] . $this->icon] = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon ); 838 846 } 839 847 … … 845 853 foreach ($custom as $status) 846 854 { 847 $icon_list[ $status['option_handle'] . $this->icon] = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 855 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 856 $icon_list[ $status['option_handle'] . $this->icon] = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon ); 848 857 } 849 858 } … … 859 868 return $post_states; 860 869 870 //debug 871 //print_r($post_states); 872 873 861 874 if ( !empty($post_states) ) { 862 875 -
post-state-tags/tags/2.0.4/readme.txt
r1946963 r2034214 4 4 Tags: wp-admin, admin, post state, color, post colours, list, highlight 5 5 Requires at least: 3.8 6 Tested up to: 4.9.87 Stable tag: 2.0. 36 Tested up to: 5.0.3 7 Stable tag: 2.0.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 98 98 == Changelog == 99 99 100 = 2.0.4 = 101 * Fix check index values for icons and color with special custom statuses like WooCommerce 102 100 103 = 2.0.3 = 101 104 * Replaced create_function in Settings API library with anonymous function -
post-state-tags/trunk/post-state-tags.php
r1946967 r2034214 716 716 { 717 717 718 $color = $this->get_option( $status['option_handle'] , $section , $this->colors[$status['name']] ); 718 $defcolor = array_key_exists($status['name'], $this->colors) ? $this->colors[$status['name']] : ''; 719 $color = $this->get_option( $status['option_handle'] , $section , $defcolor ); 719 720 $css .= $this->color_builder($status['name'], $color); 720 721 721 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 722 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 723 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon); 722 724 $css .= $this->tag_builder($status['name'], $color, $icon); 723 725 … … 729 731 foreach ($special as $status) 730 732 { 731 $color = $this->get_option( $status['option_handle'] , $section , $this->colors[$status['name']] ); 733 $defcolor = array_key_exists($status['name'], $this->colors) ? $this->colors[$status['name']] : ''; 734 $color = $this->get_option( $status['option_handle'] , $section , $defcolor ); 732 735 $css .= $this->color_builder($status['name'], $color); 733 736 734 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 737 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 738 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon); 735 739 $css .= $this->tag_builder($status['name'], $color, $icon); 736 740 } … … 743 747 foreach ($custom as $status) 744 748 { 745 $color = $this->get_option( $status['option_handle'] , $section , $this->colors[$status['name']] ); 749 $defcolor = array_key_exists($status['name'], $this->colors) ? $this->colors[$status['name']] : ''; 750 $color = $this->get_option( $status['option_handle'] , $section , $defcolor ); 746 751 $css .= $this->color_builder($status['name'], $color); 747 752 748 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section, $this->icons[$status['name']] ); 753 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 754 $icon = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon); 749 755 $css .= $this->tag_builder($status['name'], $color, $icon); 750 756 } … … 827 833 foreach ($default as $status) 828 834 { 829 $icon_list[ $status['option_handle'] . $this->icon ] = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 835 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 836 $icon_list[ $status['option_handle'] . $this->icon ] = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon ); 830 837 } 831 838 … … 835 842 foreach ($special as $status) 836 843 { 837 $icon_list[ $status['option_handle'] . $this->icon] = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 844 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 845 $icon_list[ $status['option_handle'] . $this->icon] = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon ); 838 846 } 839 847 … … 845 853 foreach ($custom as $status) 846 854 { 847 $icon_list[ $status['option_handle'] . $this->icon] = $this->get_option( $status['option_handle'] . $this->icon, $section , $this->icons[$status['name']] ); 855 $deficon = array_key_exists($status['name'], $this->icons) ? $this->icons[$status['name']] : ''; 856 $icon_list[ $status['option_handle'] . $this->icon] = $this->get_option( $status['option_handle'] . $this->icon, $section, $deficon ); 848 857 } 849 858 } … … 859 868 return $post_states; 860 869 870 //debug 871 //print_r($post_states); 872 873 861 874 if ( !empty($post_states) ) { 862 875 -
post-state-tags/trunk/readme.txt
r1946963 r2034214 4 4 Tags: wp-admin, admin, post state, color, post colours, list, highlight 5 5 Requires at least: 3.8 6 Tested up to: 4.9.87 Stable tag: 2.0. 36 Tested up to: 5.0.3 7 Stable tag: 2.0.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 98 98 == Changelog == 99 99 100 = 2.0.4 = 101 * Fix check index values for icons and color with special custom statuses like WooCommerce 102 100 103 = 2.0.3 = 101 104 * Replaced create_function in Settings API library with anonymous function
Note: See TracChangeset
for help on using the changeset viewer.