Plugin Directory

Changeset 210335


Ignore:
Timestamp:
02/25/2010 11:19:56 PM (16 years ago)
Author:
php4ever
Message:
 
Location:
wp-custom-widget
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-custom-widget/trunk/index.php

    r147628 r210335  
    11<?php
    2 // Blank file to stop directory browsing.
     2// Blank file to stop directory browsing. Silence
    33?>
  • wp-custom-widget/trunk/phptext.php

    r147628 r210335  
    33Plugin Name: WP Custom Widget
    44Plugin 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.
     5Description: <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.
    66Author: Damian Danielczyk and Jared Ritchey
    7 Version: 1.0.1
     7Version: 1.0.2
    88Author URI: http://www.jaredritchey.com
    99*/
     
    3030    if ( !isset($options[$number]) )
    3131        return;
    32 
    3332    $title = $options[$number]['title'];
    34    
    3533    $phptext_display_position = $options[$number]['phptext_display_position'];
    3634    $phptext_elements_id = $options[$number]['phptext_elements_id'];
    37    
    3835    $text = apply_filters( 'widget_phptext', $options[$number]['text'] );
    39    
    40    
    4136    switch($phptext_display_position){
    4237        case 'pages':
     
    8176?>
    8277        <?php echo $before_widget; ?>
    83         <?php if ( !empty( $title ) ) { echo "<h3>".$title."</h3>"; } ?>
     78        <?php if ( !empty( $title ) ) { echo $before_title. $title .$after_title; } ?>
    8479        <div class="phptextwidget"><?php eval('?>'.$text); ?></div>
    8580        <?php echo $after_widget; ?>
     
    123118            $options[$widget_number] = compact( 'title', 'phptext_display_position', 'phptext_elements_id', 'text');
    124119        }
    125 
    126120        update_option('widget_phptext', $options);
    127121        $updated = true;
     
    154148        <option value="hastag" <?php if($phptext_display_position == "hastag") echo "SELECTED"; ?>>Has Tag</option>
    155149        </select><br/><br/>
    156            
    157150        Enter element ID's (comma separated)<br/>
    158151        <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            
    160152        Enter the code (MUST be enclosed in &lt;?php and ?&gt; tags!)<br/>
    161153        <textarea id="phptext-text-<?php echo $number; ?>" name="widget-phptext[<?php echo $number; ?>][text]" cols="30" rows="6"><?php echo $text; ?></textarea>
     
    169161    if ( !function_exists('wp_register_sidebar_widget') || !function_exists('wp_register_widget_control') )
    170162        return;
    171 
    172163    if ( !$options = get_option('widget_phptext') )
    173164        $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'));
    175166    $control_ops = array('width' => 400, 'height' => 300, 'id_base' => 'phptext');
    176     $name = __('Custom Widget');
    177 
     167    $name = __('PHP Custom Widget');
    178168    $id = false;
    179169    foreach ( array_keys($options) as $o ) {
     
    185175        wp_register_widget_control($id, $name, 'widget_phptext_control', $control_ops, array( 'number' => $o ));
    186176    }
    187    
    188177    // If there are none, we register the widget's existance with a generic template
    189178    if ( !$id ) {
     
    191180        wp_register_widget_control( 'phptext-1', $name, 'widget_phptext_control', $control_ops, array( 'number' => -1 ) );
    192181    }
    193    
    194182}
    195 
    196183add_action( 'widgets_init', 'widget_phptext_register' );
    197 
    198184?>
  • wp-custom-widget/trunk/readme.txt

    r147628 r210335  
    4040
    4141== Screenshots ==
    42 1. `/tags/1.0.1/screenshot-1.jpg`
    43 2. `/tags/1.0.1/screenshot-2.jpg`
     421. `/tags/1.0.2/screenshot-1.jpg`
     432. `/tags/1.0.2/screenshot-2.jpg`
    4444
    4545== Important Recent Updates This Release ==
Note: See TracChangeset for help on using the changeset viewer.