Changeset 210335
- Timestamp:
- 02/25/2010 11:19:56 PM (16 years ago)
- Location:
- wp-custom-widget
- Files:
-
- 8 added
- 3 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/index.php (added)
-
tags/1.0.2/phptext.php (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/screenshot-1.jpg (added)
-
tags/1.0.2/screenshot-2.jpg (added)
-
trunk/index.php (modified) (1 diff)
-
trunk/phptext.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/screenshot-1.jpg (added)
-
trunk/screenshot-2.jpg (added)
Legend:
- Unmodified
- Added
- Removed
-
wp-custom-widget/trunk/index.php
r147628 r210335 1 1 <?php 2 // Blank file to stop directory browsing. 2 // Blank file to stop directory browsing. Silence 3 3 ?> -
wp-custom-widget/trunk/phptext.php
r147628 r210335 3 3 Plugin Name: WP Custom Widget 4 4 Plugin URI: http://www.jaredritchey.com/ 5 Description: <strong>WP Custom Widget</strong> - Another fine <a href="http://www.jaredritchey.com" target="_blank" title="WordPress Plug-in">WordPress Plugin</a> by Jared Ritchey Design. This plugin was based in part on code from the original Text Widget in WordPress and shares some of the code from the developer of the Executable PHP widget.With this widget you can <strong>assign your elements to pages, posts, categories, tags and has tag</strong> as well as all areas of the site by default.5 Description: <strong>WP Custom Widget</strong> - Another fine <a href="http://www.jaredritchey.com" target="_blank" title="WordPress Plug-in">WordPress Plugin</a> by Jared Ritchey Design. This plugin was based in part on code from the original Text Widget in WordPress and shares some of the code from the developer of the <a href="http://wordpress.org/extend/plugins/php-code-widget/" target="_blank" title="PHP Code Widget">PHP Code Widget.</a> With this widget you can <strong>assign your elements to pages, posts, categories, tags and has tag</strong> as well as all areas of the site by default. 6 6 Author: Damian Danielczyk and Jared Ritchey 7 Version: 1.0. 17 Version: 1.0.2 8 8 Author URI: http://www.jaredritchey.com 9 9 */ … … 30 30 if ( !isset($options[$number]) ) 31 31 return; 32 33 32 $title = $options[$number]['title']; 34 35 33 $phptext_display_position = $options[$number]['phptext_display_position']; 36 34 $phptext_elements_id = $options[$number]['phptext_elements_id']; 37 38 35 $text = apply_filters( 'widget_phptext', $options[$number]['text'] ); 39 40 41 36 switch($phptext_display_position){ 42 37 case 'pages': … … 81 76 ?> 82 77 <?php echo $before_widget; ?> 83 <?php if ( !empty( $title ) ) { echo "<h3>".$title."</h3>"; } ?>78 <?php if ( !empty( $title ) ) { echo $before_title. $title .$after_title; } ?> 84 79 <div class="phptextwidget"><?php eval('?>'.$text); ?></div> 85 80 <?php echo $after_widget; ?> … … 123 118 $options[$widget_number] = compact( 'title', 'phptext_display_position', 'phptext_elements_id', 'text'); 124 119 } 125 126 120 update_option('widget_phptext', $options); 127 121 $updated = true; … … 154 148 <option value="hastag" <?php if($phptext_display_position == "hastag") echo "SELECTED"; ?>>Has Tag</option> 155 149 </select><br/><br/> 156 157 150 Enter element ID's (comma separated)<br/> 158 151 <input id="phptext-phptext_elements_id-<?php echo $number; ?>" name="widget-phptext[<?php echo $number; ?>][phptext_elements_id]" type="text" value="<?php echo $phptext_elements_id; ?>" size="35" /><br/><br/> 159 160 152 Enter the code (MUST be enclosed in <?php and ?> tags!)<br/> 161 153 <textarea id="phptext-text-<?php echo $number; ?>" name="widget-phptext[<?php echo $number; ?>][text]" cols="30" rows="6"><?php echo $text; ?></textarea> … … 169 161 if ( !function_exists('wp_register_sidebar_widget') || !function_exists('wp_register_widget_control') ) 170 162 return; 171 172 163 if ( !$options = get_option('widget_phptext') ) 173 164 $options = array(); 174 $widget_ops = array('classname' => 'widget_phptext', 'description' => __(' HTML or PHP or Text'));165 $widget_ops = array('classname' => 'widget_phptext', 'description' => __('Assign widget to pages, posts, categories, tags and the "has tag" as well as all areas of the site by default')); 175 166 $control_ops = array('width' => 400, 'height' => 300, 'id_base' => 'phptext'); 176 $name = __('Custom Widget'); 177 167 $name = __('PHP Custom Widget'); 178 168 $id = false; 179 169 foreach ( array_keys($options) as $o ) { … … 185 175 wp_register_widget_control($id, $name, 'widget_phptext_control', $control_ops, array( 'number' => $o )); 186 176 } 187 188 177 // If there are none, we register the widget's existance with a generic template 189 178 if ( !$id ) { … … 191 180 wp_register_widget_control( 'phptext-1', $name, 'widget_phptext_control', $control_ops, array( 'number' => -1 ) ); 192 181 } 193 194 182 } 195 196 183 add_action( 'widgets_init', 'widget_phptext_register' ); 197 198 184 ?> -
wp-custom-widget/trunk/readme.txt
r147628 r210335 40 40 41 41 == Screenshots == 42 1. `/tags/1.0. 1/screenshot-1.jpg`43 2. `/tags/1.0. 1/screenshot-2.jpg`42 1. `/tags/1.0.2/screenshot-1.jpg` 43 2. `/tags/1.0.2/screenshot-2.jpg` 44 44 45 45 == Important Recent Updates This Release ==
Note: See TracChangeset
for help on using the changeset viewer.