Changeset 2464160
- Timestamp:
- 01/28/2021 10:28:25 AM (5 years ago)
- Location:
- label-plugins/trunk
- Files:
-
- 3 edited
-
label-plugins.php (modified) (1 diff)
-
lp_admin_page.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
label-plugins/trunk/label-plugins.php
r1529257 r2464160 4 4 Plugin URI: http://wordpress.org/plugins/label-plugins 5 5 Description: Did you ever struggle with multiple plugins, now you have chance to label them. 6 Author: wp-plugin-dev.com7 Version: 0. 48 Author URI: http ://www.wp-plugin-dev.com/6 Author: emojized 7 Version: 0.5 8 Author URI: https://emojized.com/ 9 9 */ 10 10 -
label-plugins/trunk/lp_admin_page.php
r1529257 r2464160 1 1 <?php 2 /** 3 * Class and Function List: 4 * Function list: 5 * - label_plugin_menu() 6 * - initial_plugin_labels() 7 * - label_plugins_options() 8 * Classes list: 9 */ 2 10 add_action('admin_menu', 'label_plugin_menu'); 3 11 4 12 function label_plugin_menu() 5 13 { 6 add_options_page( __('Plugin').'-'.__('Tags'), __('Plugin').'-'.__('Tags'), "delete_users", "label-plugins", "label_plugins_options");14 add_options_page(__('Plugin') . '-' . __('Tags') , __('Plugin') . '-' . __('Tags') , "delete_users", "label-plugins", "label_plugins_options"); 7 15 } 8 16 … … 10 18 function initial_plugin_labels() 11 19 { 12 $labels=get_option("plugin_labels"); 13 //if ($labels==""){ 14 $labels = array(label1 => __("good"), label2 => ("average"), label3 => ("bad"), add_plugin_labels => ""); 15 update_option("plugin_labels", $labels); 16 //} 20 $labels = get_option("plugin_labels"); 21 //if ($labels==""){ 22 $labels = array( 23 label1 => __("good") , 24 label2 => ("average") , 25 label3 => ("bad") , 26 add_plugin_labels => "" 27 ); 28 update_option("plugin_labels", $labels); 29 //} 30 17 31 } 18 32 19 33 function label_plugins_options() 20 34 { 21 if 22 (isset($_POST['add_plugin_labels'])) 23 { 24 update_option( "plugin_labels", $_POST); 25 }else if 26 ($_GET[reset]==1) 27 { 28 delete_option( "plugin_labels" ); 29 } 30 else 31 { 32 33 } 34 $labels=get_option("plugin_labels" ); 35 35 if (isset($_POST['add_plugin_labels'])) 36 { 37 update_option("plugin_labels", $_POST); 38 } 39 $labels = get_option("plugin_labels"); 40 36 41 ?> 37 42 <div class="wrap"> 38 43 <?php screen_icon(); 39 44 ?> 40 <h2><?php _e('Plugin'); echo '-'; _e("Tags"); 41 ?></h2> 45 <h2><?php _e('Plugin'); 46 echo '-'; 47 _e("Tags"); 48 ?></h2> 42 49 <div id="container"> 43 50 … … 46 53 <form method="POST" action=""> 47 54 <?php 48 $num=1; 49 $count=count($labels); 50 foreach ($labels as $key => $value) 51 { 52 if 53 ($num<$count) 54 { 55 $num = 1; 56 57 if(empty($labels)) 58 { 59 initial_plugin_labels(); 60 } 61 $count = count($labels); 62 foreach ($labels as $key => $value) 63 { 64 if ($num < $count) 65 { 55 66 ?> 56 67 <p><label for="var<?php echo $num; 57 ?>"><?php _e('Label'); ?>: </label><input type="text" name="label<?php echo $num; 58 ?>" id="var<?php echo $num; 59 ?>" value="<?php echo $value; 60 ?>" /><span class="removeVar button"><?php _e('Remove'); ?> <?php _e('Label'); ?></span></p> 61 <?php }else 62 {} $num++; 63 } ?> 68 ?>"><?php _e('Label'); ?>: </label><input type="text" name="label<?php echo $num; 69 ?>" id="var<?php echo $num; 70 ?>" value="<?php echo $value; 71 ?>" /><span class="removeVar button"><?php _e('Remove'); ?> <?php _e('Label'); ?></span></p> 72 <?php 73 } 74 75 $num++; 76 } ?> 64 77 <p> 65 78 <span class="button button-small" id="addVar"><?php _e('Add'); ?> <?php _e('Label'); ?></span> … … 70 83 </form> 71 84 <?php //echo "num1 ".$num1; 85 72 86 ?> 73 87 </div><!--!/#container --> … … 75 89 //create three initial fields 76 90 var startingNo = <?php echo $num; 77 ?>;91 ?>; 78 92 var node = ""; 79 93 for(varCount=0;varCount<=startingNo;varCount++){ -
label-plugins/trunk/readme.txt
r1529257 r2464160 1 1 === Label Plugins === 2 2 Contributors: theode 3 Donate link: http://www.wp-plugin-dev.com/donate3 Donate link: - 4 4 Tags: categories, category, development, label, labeling, 5 5 Requires at least: 3.0 6 Tested up to: 4.77 Stable tag: 0. 46 Tested up to: 5.7 7 Stable tag: 0.5 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 42 42 == Changelog == 43 43 44 = 0.5 = small bugfixes, WordPress 5.7 ready 44 45 = 0.3 = bug removed standard plugin statuses 45 46 = 0.2 = Dynamic labels in backend
Note: See TracChangeset
for help on using the changeset viewer.