Plugin Directory

Changeset 731426


Ignore:
Timestamp:
06/25/2013 09:51:12 AM (13 years ago)
Author:
karevn
Message:

An option to allow direct publishing.

Location:
usernoise/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • usernoise/trunk/admin/settings.php

    r705432 r731426  
    3939                'title' => __('Enable Usernoise', 'usernoise'), 'label' => __('Enable Usernoise', 'usernoise'),
    4040                'default' => '0'),
     41            array('type' => 'checkbox', 'name' => UN_PUBLISH_DIRECTLY, 'title' => __('Publish feedback directly without approval', 'usernoise'),
     42                'label' => __('Publish feedback directly without approval', 'usernoise'), 'default' => 0),
    4143            array('type' => 'checkbox', 'name' => UN_SHOW_POWERED_BY,
    4244                'title' => __('Show Powered by', 'usernoise'),
  • usernoise/trunk/inc/controller.php

    r731399 r731426  
    3535        if (isset($_REQUEST['email']) && $_REQUEST['email'] == un_get_option(UN_FEEDBACK_EMAIL_PLACEHOLDER))
    3636            $_REQUEST['email'] = '';
    37 
    3837        $errors = $un_model->validate_feedback_form(stripslashes_deep($_REQUEST));
    3938        if (empty($errors)){
  • usernoise/trunk/inc/model.php

    r703458 r731426  
    6868   
    6969    public function create_feedback($params){
     70        global $un_settings;
    7071        if (isset($params['title']) && $params['title'])
    7172            $title = $params['title'];
     
    7778            'post_title' => apply_filters('un_feedback_title', $title, $params),
    7879            'post_content' => apply_filters('un_feedback_content', $content, $params),
    79             'post_status' => 'pending',
     80            'post_status' => un_get_option(UN_PUBLISH_DIRECTLY) ? 'publish' : 'pending',
    8081            'post_author' => 0
    8182        ));
  • usernoise/trunk/readme.txt

    r731399 r731426  
    107107* RTL-related CSS fixes
    108108* Mobile detection using Mobile Detect library by Serban Ghita
     109* An option to allow direct publishing.
    109110
    110111= 3.7.4 =
  • usernoise/trunk/usernoise.php

    r731399 r731426  
    3737define('UN_FEEDBACK_FORM_SHOW_TYPE', 'feedback_form_show_type');
    3838define('UN_FEEDBACK_FORM_SHOW_EMAIL', 'feedback_form_show_email');
     39define('UN_PUBLISH_DIRECTLY', 'publish_directly');
    3940if (!defined('UN_ENABLED')){
    4041    define('UN_ENABLED', 'enabled');
  • usernoise/trunk/vendor/plugin-options-framework/plugin-options-framework.php

    r621573 r731426  
    354354            if (isset($field['disabled']) && $field['disabled'])
    355355                $attr['disabled'] = 'disabled';
     356            if (isset($field['readonly']) && $field['readonly'])
     357                $attr['disabled'] = 'readonly';
     358           
    356359            $attr['class'] = $this->field_classes(array('textarea'), $field);
    357360            $attr['rows'] = isset($field['rows']) ? $field['rows'] : get_option('default_post_edit_rows');
Note: See TracChangeset for help on using the changeset viewer.