Plugin Directory

Changeset 437103


Ignore:
Timestamp:
09/12/2011 10:42:50 PM (15 years ago)
Author:
tombenner
Message:

Adding 1.1.1

Location:
wp-mvc
Files:
2 added
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-mvc/tags/1.1.1/core/helpers/mvc_form_helper.php

    r390534 r437103  
    7171        $defaults = array(
    7272            'id' => $this->input_id($field_name),
    73             'name' => $this->input_name($field_name),
    74             'type' => 'text'
    75         );
    76         $options = array_merge($defaults, $options);
    77         $html = $this->before_input($field_name, $options);
    78         $html .= '<textarea id="'.$options['id'].'" name="'.$this->input_name($field_name).'">'.$options['value'].'</textarea>';
     73            'name' => $this->input_name($field_name)
     74        );
     75        $options = array_merge($defaults, $options);
     76        $attributes_html = self::attributes_html($options, 'textarea');
     77        $html = $this->before_input($field_name, $options);
     78        $html .= '<textarea'.$attributes_html.'>'.$options['value'].'</textarea>';
    7979        $html .= $this->after_input($field_name, $options);
    8080        return $html;
  • wp-mvc/tags/1.1.1/core/helpers/mvc_helper.php

    r390534 r437103  
    8080                'accept',
    8181                'access_key',
     82                'align',
    8283                'alt',
    8384                'checked',
     
    9798                'type',
    9899                'value',
     100                'xml:lang',
     101                $event_attributes['form']
     102            ),
     103            'textarea' => array(
     104                'access_key',
     105                'class',
     106                'cols',
     107                'dir',
     108                'disabled',
     109                'id',
     110                'lang',
     111                'name',
     112                'readonly',
     113                'rows',
     114                'style',
     115                'tabindex',
     116                'title',
    99117                'xml:lang',
    100118                $event_attributes['form']
  • wp-mvc/tags/1.1.1/core/shells/destroy_shell.php

    r390534 r437103  
    55    public function controllers($args) {
    66        list($plugin, $name) = $this->get_plugin_model_args($args);
    7         $this->destroy_controllers($name);
     7        $this->destroy_controllers($plugin, $name);
    88    }
    99
    1010    public function model($args) {
    1111        list($plugin, $name) = $this->get_plugin_model_args($args);
    12         $this->destroy_model($name);
     12        $this->destroy_model($plugin, $name);
    1313    }
    1414
    1515    public function scaffold($args) {
    1616        list($plugin, $name) = $this->get_plugin_model_args($args);
    17         $this->destroy_controllers($name);
    18         $this->destroy_model($name);
    19         $this->destroy_views($name);
     17        $this->destroy_controllers($plugin, $name);
     18        $this->destroy_model($plugin, $name);
     19        $this->destroy_views($plugin, $name);
    2020    }
    2121
    2222    public function views($args) {
    2323        list($plugin, $name) = $this->get_plugin_model_args($args);
    24         $this->destroy_views($name);
     24        $this->destroy_views($plugin, $name);
    2525    }
    2626   
    2727    private function destroy_controllers($plugin, $name) {
    28         $plugin_app_path = mvc_plugin_app_path($plugin);
     28        $plugin_app_path = $this->get_plugin_app_path($plugin);
    2929        $file = new MvcFile();
    3030        $name_tableized = MvcInflector::tableize($name);
     
    3535   
    3636    private function destroy_model($plugin, $name) {
    37         $plugin_app_path = mvc_plugin_app_path($plugin);
     37        $plugin_app_path = $this->get_plugin_app_path($plugin);
    3838        $file = new MvcFile();
    3939        $name_underscore = MvcInflector::underscore($name);
     
    4343   
    4444    private function destroy_views($plugin, $name) {
    45         $plugin_app_path = mvc_plugin_app_path($plugin);
     45        $plugin_app_path = $this->get_plugin_app_path($plugin);
    4646        $name_tableized = MvcInflector::tableize($name);
    4747        $public_directory = $plugin_app_path.'views/'.$name_tableized;
     
    5959        return $args;
    6060    }
     61   
     62    private function get_plugin_path($plugin_name) {
     63        $plugin_underscored = MvcInflector::underscore($plugin_name);
     64        $plugin_hyphenized = str_replace('_', '-', $plugin_underscored);
     65        $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/';
     66        return $plugin_path;
     67    }
     68   
     69    private function get_plugin_app_path($plugin_name) {
     70        $plugin_path = $this->get_plugin_path($plugin_name);
     71        $plugin_app_path = $plugin_path.'app/';
     72        return $plugin_app_path;
     73    }
    6174
    6275}
  • wp-mvc/tags/1.1.1/core/shells/generate_shell.php

    r390534 r437103  
    4747        $plugin_hyphenized = str_replace('_', '-', $plugin_underscored);
    4848       
    49         $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/';
    50         $plugin_app_path = $plugin_path.'app/';
     49        $plugin_path = $this->get_plugin_path($plugin);
     50        $plugin_app_path = $this->get_plugin_app_path($plugin);
    5151       
    5252        $directory = new MvcDirectory();
     
    8585    private function generate_controllers($plugin, $name) {
    8686       
    87         $plugin_app_path = mvc_plugin_app_path($plugin);
     87        $plugin_app_path = $this->get_plugin_app_path($plugin);
    8888   
    8989        $name_tableized = MvcInflector::tableize($name);
     
    101101   
    102102    private function generate_model($plugin, $name) {
    103         $plugin_app_path = mvc_plugin_app_path($plugin);
     103        $plugin_app_path = $this->get_plugin_app_path($plugin);
    104104        $name_camelized = MvcInflector::camelize($name);
    105105        $name_underscored = MvcInflector::underscore($name);
     
    111111    private function generate_views($plugin, $name) {
    112112       
    113         $plugin_app_path = mvc_plugin_app_path($plugin);
     113        $plugin_app_path = $this->get_plugin_app_path($plugin);
    114114   
    115115        $name_tableized = MvcInflector::tableize($name);
     
    147147        return $args;
    148148    }
     149   
     150    private function get_plugin_path($plugin_name) {
     151        $plugin_underscored = MvcInflector::underscore($plugin_name);
     152        $plugin_hyphenized = str_replace('_', '-', $plugin_underscored);
     153        $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/';
     154        return $plugin_path;
     155    }
     156   
     157    private function get_plugin_app_path($plugin_name) {
     158        $plugin_path = $this->get_plugin_path($plugin_name);
     159        $plugin_app_path = $plugin_path.'app/';
     160        return $plugin_app_path;
     161    }
    149162
    150163}
  • wp-mvc/tags/1.1.1/readme.txt

    r390557 r437103  
    33Tags: mvc, framework, model, view, controller, development, plugin
    44Requires at least: 3.0
    5 Tested up to: 3.1.1
    6 Stable tag: 1.1
     5Tested up to: 3.2.1
     6Stable tag: 1.1.1
    77
    88WP MVC is a full-fledged MVC framework, similar to CakePHP and Rails, that developers can use to create WordPress plugins.
  • wp-mvc/trunk/core/helpers/mvc_form_helper.php

    r390534 r437103  
    7171        $defaults = array(
    7272            'id' => $this->input_id($field_name),
    73             'name' => $this->input_name($field_name),
    74             'type' => 'text'
    75         );
    76         $options = array_merge($defaults, $options);
    77         $html = $this->before_input($field_name, $options);
    78         $html .= '<textarea id="'.$options['id'].'" name="'.$this->input_name($field_name).'">'.$options['value'].'</textarea>';
     73            'name' => $this->input_name($field_name)
     74        );
     75        $options = array_merge($defaults, $options);
     76        $attributes_html = self::attributes_html($options, 'textarea');
     77        $html = $this->before_input($field_name, $options);
     78        $html .= '<textarea'.$attributes_html.'>'.$options['value'].'</textarea>';
    7979        $html .= $this->after_input($field_name, $options);
    8080        return $html;
  • wp-mvc/trunk/core/helpers/mvc_helper.php

    r390534 r437103  
    8080                'accept',
    8181                'access_key',
     82                'align',
    8283                'alt',
    8384                'checked',
     
    9798                'type',
    9899                'value',
     100                'xml:lang',
     101                $event_attributes['form']
     102            ),
     103            'textarea' => array(
     104                'access_key',
     105                'class',
     106                'cols',
     107                'dir',
     108                'disabled',
     109                'id',
     110                'lang',
     111                'name',
     112                'readonly',
     113                'rows',
     114                'style',
     115                'tabindex',
     116                'title',
    99117                'xml:lang',
    100118                $event_attributes['form']
  • wp-mvc/trunk/core/shells/destroy_shell.php

    r390534 r437103  
    55    public function controllers($args) {
    66        list($plugin, $name) = $this->get_plugin_model_args($args);
    7         $this->destroy_controllers($name);
     7        $this->destroy_controllers($plugin, $name);
    88    }
    99
    1010    public function model($args) {
    1111        list($plugin, $name) = $this->get_plugin_model_args($args);
    12         $this->destroy_model($name);
     12        $this->destroy_model($plugin, $name);
    1313    }
    1414
    1515    public function scaffold($args) {
    1616        list($plugin, $name) = $this->get_plugin_model_args($args);
    17         $this->destroy_controllers($name);
    18         $this->destroy_model($name);
    19         $this->destroy_views($name);
     17        $this->destroy_controllers($plugin, $name);
     18        $this->destroy_model($plugin, $name);
     19        $this->destroy_views($plugin, $name);
    2020    }
    2121
    2222    public function views($args) {
    2323        list($plugin, $name) = $this->get_plugin_model_args($args);
    24         $this->destroy_views($name);
     24        $this->destroy_views($plugin, $name);
    2525    }
    2626   
    2727    private function destroy_controllers($plugin, $name) {
    28         $plugin_app_path = mvc_plugin_app_path($plugin);
     28        $plugin_app_path = $this->get_plugin_app_path($plugin);
    2929        $file = new MvcFile();
    3030        $name_tableized = MvcInflector::tableize($name);
     
    3535   
    3636    private function destroy_model($plugin, $name) {
    37         $plugin_app_path = mvc_plugin_app_path($plugin);
     37        $plugin_app_path = $this->get_plugin_app_path($plugin);
    3838        $file = new MvcFile();
    3939        $name_underscore = MvcInflector::underscore($name);
     
    4343   
    4444    private function destroy_views($plugin, $name) {
    45         $plugin_app_path = mvc_plugin_app_path($plugin);
     45        $plugin_app_path = $this->get_plugin_app_path($plugin);
    4646        $name_tableized = MvcInflector::tableize($name);
    4747        $public_directory = $plugin_app_path.'views/'.$name_tableized;
     
    5959        return $args;
    6060    }
     61   
     62    private function get_plugin_path($plugin_name) {
     63        $plugin_underscored = MvcInflector::underscore($plugin_name);
     64        $plugin_hyphenized = str_replace('_', '-', $plugin_underscored);
     65        $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/';
     66        return $plugin_path;
     67    }
     68   
     69    private function get_plugin_app_path($plugin_name) {
     70        $plugin_path = $this->get_plugin_path($plugin_name);
     71        $plugin_app_path = $plugin_path.'app/';
     72        return $plugin_app_path;
     73    }
    6174
    6275}
  • wp-mvc/trunk/core/shells/generate_shell.php

    r390534 r437103  
    4747        $plugin_hyphenized = str_replace('_', '-', $plugin_underscored);
    4848       
    49         $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/';
    50         $plugin_app_path = $plugin_path.'app/';
     49        $plugin_path = $this->get_plugin_path($plugin);
     50        $plugin_app_path = $this->get_plugin_app_path($plugin);
    5151       
    5252        $directory = new MvcDirectory();
     
    8585    private function generate_controllers($plugin, $name) {
    8686       
    87         $plugin_app_path = mvc_plugin_app_path($plugin);
     87        $plugin_app_path = $this->get_plugin_app_path($plugin);
    8888   
    8989        $name_tableized = MvcInflector::tableize($name);
     
    101101   
    102102    private function generate_model($plugin, $name) {
    103         $plugin_app_path = mvc_plugin_app_path($plugin);
     103        $plugin_app_path = $this->get_plugin_app_path($plugin);
    104104        $name_camelized = MvcInflector::camelize($name);
    105105        $name_underscored = MvcInflector::underscore($name);
     
    111111    private function generate_views($plugin, $name) {
    112112       
    113         $plugin_app_path = mvc_plugin_app_path($plugin);
     113        $plugin_app_path = $this->get_plugin_app_path($plugin);
    114114   
    115115        $name_tableized = MvcInflector::tableize($name);
     
    147147        return $args;
    148148    }
     149   
     150    private function get_plugin_path($plugin_name) {
     151        $plugin_underscored = MvcInflector::underscore($plugin_name);
     152        $plugin_hyphenized = str_replace('_', '-', $plugin_underscored);
     153        $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/';
     154        return $plugin_path;
     155    }
     156   
     157    private function get_plugin_app_path($plugin_name) {
     158        $plugin_path = $this->get_plugin_path($plugin_name);
     159        $plugin_app_path = $plugin_path.'app/';
     160        return $plugin_app_path;
     161    }
    149162
    150163}
  • wp-mvc/trunk/readme.txt

    r390557 r437103  
    33Tags: mvc, framework, model, view, controller, development, plugin
    44Requires at least: 3.0
    5 Tested up to: 3.1.1
    6 Stable tag: 1.1
     5Tested up to: 3.2.1
     6Stable tag: 1.1.1
    77
    88WP MVC is a full-fledged MVC framework, similar to CakePHP and Rails, that developers can use to create WordPress plugins.
Note: See TracChangeset for help on using the changeset viewer.