Plugin Directory

Changeset 952290


Ignore:
Timestamp:
07/21/2014 04:47:37 PM (12 years ago)
Author:
delayedinsanity
Message:

Tagging 0.7.3-beta

Location:
ldd-directory-lite
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ldd-directory-lite/tags/0.7.3-beta/README.txt

    r948864 r952290  
    44Requires at least: 3.9.1
    55Tested up to: 3.9.1
    6 Stable tag: 0.7.2-beta
     6Stable tag: 0.7.3-beta
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9494== Upgrade Notice ==
    9595
    96 = 0.7.2-beta =
    97 This is a major update towards releasing a stable version of ldd directory lite, and addresses numerous issues reported by users with the earlier beta copies.
     96= 0.7.3-beta =
     970.7.x is a major update to the functionality found in the older 0.5.x versions, please update immediately! 0.7.3 fixes some PHP backwards compatibility issues.
    9898
    9999
    100100== Changelog ==
    101101
    102 = 0.7.2-beta =
     102= 0.7.3-beta =
    103103
    104104* Cleaned up code formatting and style considerably across the entire plugin, adding much needed inline documentation
     
    111111* Outlined an upgrade system for seamless transitions from one version to the next
    112112* Improved the import process for upgrading from LDD Business Directory
    113 * Fixed a compatibility issue with ldl_has_meta()
     113* Fixed two backwards compatibility errors
     114* Fixed a bug in the uninstall that was causing it to fail
    114115
    115116= 0.5.4-beta =
  • ldd-directory-lite/tags/0.7.3-beta/includes/admin/settings.php

    r948223 r952290  
    5353
    5454        wp_enqueue_style('wp-color-picker');
     55        wp_enqueue_style('lddlite-bootstrap', LDDLITE_URL . 'public/css/bootstrap.css', array(), LDDLITE_VERSION);
     56
    5557        wp_enqueue_script('wp-color-picker');
    5658        wp_enqueue_script('lddlite-admin', LDDLITE_URL . 'public/js/admin.js', array('wp-color-picker'), false, true);
    57 
    58         wp_enqueue_style('lddlite-bootstrap', LDDLITE_URL . 'public/css/bootstrap.css', array(), LDDLITE_VERSION);
    59         wp_enqueue_script('bootstrap-tagsinput', LDDLITE_URL . 'public/js/bootstrap-tagsinput.min.js', array('lddlite-bootstrap'), false, true);
    60         wp_enqueue_style('bootstrap-tagsinput', LDDLITE_URL . 'public/css/bootstrap-tagsinput.css');
    6159
    6260    }
     
    283281        function _f_appearance_primary_normal() {
    284282            echo '<input id="appearance_primary_normal" type="text" name="lddlite_settings[appearance_primary_normal]" value="' . ldl_get_setting('appearance_primary_normal') . '" class="my-color-field" data-default-color="#3bafda">';
    285             echo '<input id="appearance_primary_hover" type="text" name="lddlite_settings[appearance_primaryhover]" value="' . ldl_get_setting('appearance_primary_hover') . '" class="my-color-field" data-default-color="#3071a9">';
     283            echo '<input id="appearance_primary_hover" type="text" name="lddlite_settings[appearance_primary_hover]" value="' . ldl_get_setting('appearance_primary_hover') . '" class="my-color-field" data-default-color="#3071a9">';
    286284            echo '<input id="appearance_primary_foreground" type="text" name="lddlite_settings[appearance_primary_foreground]" value="' . ldl_get_setting('appearance_primary_foreground') . '" class="my-color-field" data-default-color="#ffffff">';
    287285            echo '<p class="description">' . __('Set the <strong>normal / hover / foreground</strong> state for primary elements, including various buttons, labels and badges.', 'lddlite') . '</p>';
  • ldd-directory-lite/tags/0.7.3-beta/includes/class.processor.php

    r948239 r952290  
    8989
    9090            if (is_array($value)) {
    91                 $this->data[$field] = stripslashes_deep($value);
     91                $this->data[ $field ] = stripslashes_deep($value);
    9292            } else {
    93                 $this->data[$field] = stripslashes(trim($value));
     93                $this->data[ $field ] = stripslashes(trim($value));
    9494            }
    9595
     
    113113        // Loop through and check for required fields first
    114114        foreach ($required as $field) {
    115             if ('' == $this->data[$field]) {
    116                 $this->errors[$field] = apply_filters('lddlite_presentation_required_errmsg', $required_errmsg, $field);
     115            if ('' == $this->data[ $field ]) {
     116                $this->errors[ $field ] = apply_filters('lddlite_presentation_required_errmsg', $required_errmsg, $field);
    117117            }
    118118        }
     
    124124
    125125            if ($error) {
    126                 $this->errors[$field] = $error;
     126                $this->errors[ $field ] = $error;
    127127            }
    128128
     
    154154     */
    155155    public function get_value($field) {
    156         return isset($this->data[$field]) ? $this->data[$field] : '';
     156        return isset($this->data[ $field ]) ? $this->data[ $field ] : '';
    157157    }
    158158
     
    164164     */
    165165    public function has_error($field) {
    166         return isset($this->errors[$field]);
     166        return isset($this->errors[ $field ]);
    167167    }
    168168
     
    193193        $error_wrapper = apply_filters('lddlite_presentation_error_wrapper', $default_wrapper, $field );
    194194
    195         return isset($this->errors[$field]) ? sprintf($error_wrapper, $this->errors[$field]) : '';
     195        return isset($this->errors[ $field ]) ? sprintf($error_wrapper, $this->errors[ $field ]) : '';
    196196    }
    197197
  • ldd-directory-lite/tags/0.7.3-beta/includes/functions.php

    r948864 r952290  
    165165 * setting so that any filters or actions returning a link to the directories home page has a post_id to work with.
    166166 *
    167  * @todo This can be removed once we have a notice in place for installing the necessary pages
    168  *
    169167 * @param int     $post_ID Post ID.
    170168 * @param WP_Post $post    Post object.
     
    195193    $pattern = get_shortcode_regex();
    196194    if (preg_match("/$pattern/s", $post->post_content))
    197         ldl_update_setting('directory_front_page', $post_id);
     195        ldl_update_setting('directory_page', $post_id);
    198196
    199197    // Reset the global array
     
    201199
    202200}
     201
    203202add_action('save_post', 'ldl_haz_shortcode', 10, 2);
    204203
    205204
    206205/**
    207  * Identify and return meta data for the current listing. See @todo for ldl_get_url()
    208  *
    209  * @param string $key The meta identifier
    210  *
    211  * @return array|bool|string False if nothing is found, the listing metadata otherwise
     206 * Wrapper to collect post meta for a listing
     207 *
     208 * @param $id
     209 * @param $field
     210 */
     211function ldl_has_meta($key) {
     212    return ldl_get_meta($key) ? true : false;
     213}
     214
     215
     216/**
     217 * Wrapper to collect post meta for a listing
     218 *
     219 * @param $id
     220 * @param $field
    212221 */
    213222function ldl_get_meta($key) {
     
    222231}
    223232
    224 
    225 /**
    226  * For now, nothing more than an alias for esc_url(). Consider how to evolve this to help with URLs across the
    227  * entire plugin.
    228  *
    229  * @todo This seems like it should be in template-functions.php; confirm if there's any reason why the get_meta
    230  *       family needs to be in functions.php and if not, move it over.
    231  *
    232  * @param string $key The URL identifier
    233  * @return bool|string False if nothing is found, the escaped URL otherwise
    234  */
    235 function ldl_get_url($key) {
    236 
    237     $url = false;
    238     $key = 'url_' . $key;
    239 
    240     if (ldl_has_meta($key)) {
    241         $url = esc_url(ldl_get_meta($key));
    242     }
    243 
    244     return $url;
    245 }
    246 
    247 
    248 /**
    249  * Wrapper to collect post meta for a listing
    250  *
    251  * @param $id
    252  * @param $field
    253  */
    254 function ldl_has_meta($key) {
    255     return ldl_get_meta($key) ? true : false;
    256 }
    257233
    258234/**
  • ldd-directory-lite/tags/0.7.3-beta/includes/shortcodes/submit.php

    r948239 r952290  
    212212    global $lddlite_submit_processor;
    213213
    214     $to = $lddlite_submit_processor->get_data()['contact_email'];
     214    $to = $lddlite_submit_processor->get_value('contact_email');
    215215
    216216    $subject = ldl_get_setting('email_onsubmit_subject');
  • ldd-directory-lite/tags/0.7.3-beta/ldd-directory-lite.php

    r948864 r952290  
    1111 * Plugin URI:        http://wordpress.org/plugins/ldd-directory-lite
    1212 * Description:       Powerful and simple to use, add a directory of business or other organizations to your web site.
    13  * Version:           0.7.2-beta
     13 * Version:           0.7.3-beta
    1414 * Author:            LDD Web Design
    1515 * Author URI:        http://www.lddwebdesign.com
     
    2727 * Define constants
    2828 */
    29 define('LDDLITE_VERSION', '0.7.2-beta');
     29define('LDDLITE_VERSION', '0.7.3-beta');
    3030
    3131define('LDDLITE_PATH', trailingslashit(dirname(__FILE__)));
     
    215215
    216216        $lang_dir = LDDLITE_PATH . 'languages/';
    217         $locale = apply_filters('plugin_locale', get_locale(), 'lddlite');
    218         $mofile = $lang_dir . 'lddlite' . $locale . '.mo';
     217        $locale = apply_filters('plugin_locale', get_locale());
     218        $mofile = $lang_dir . $locale . '.mo';
    219219
    220220        if (file_exists($mofile)) {
     
    294294
    295295/** Das boot */
    296 ldl_get_instance();
     296if (!defined('WP_UNINSTALL_PLUGIN'))
     297    ldl_get_instance();
  • ldd-directory-lite/tags/0.7.3-beta/uninstall.php

    r948223 r952290  
    1414    die;
    1515
    16 global $wpdb;
    17 
     16require_once(dirname(__FILE__) . '/ldd-directory-lite.php');
    1817
    1918/**
     
    2120 */
    2221function ldl_uninstall_attachments() {
     22    global $wpdb;
    2323
    24     $post_ids = ldl_get_all_IDs();
     24    $query = sprintf("
     25                    SELECT ID
     26                    FROM `%s`
     27                    WHERE post_type = '%s'
     28                        AND post_status NOT IN ( 'auto-draft', 'inherit' )
     29                ", $wpdb->posts, LDDLITE_POST_TYPE);
     30
     31    $post_ids = $wpdb->get_col($query);
     32
    2533    if (!$post_ids)
    2634        return;
     
    96104ldl_uninstall_posts();
    97105ldl_uninstall_taxonomies();
    98 echo 'IN HERE?!';
     106
    99107delete_option('lddlite_settings');
    100108delete_option('lddlite_version');
  • ldd-directory-lite/trunk/README.txt

    r948864 r952290  
    44Requires at least: 3.9.1
    55Tested up to: 3.9.1
    6 Stable tag: 0.7.2-beta
     6Stable tag: 0.7.3-beta
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9494== Upgrade Notice ==
    9595
    96 = 0.7.2-beta =
    97 This is a major update towards releasing a stable version of ldd directory lite, and addresses numerous issues reported by users with the earlier beta copies.
     96= 0.7.3-beta =
     970.7.x is a major update to the functionality found in the older 0.5.x versions, please update immediately! 0.7.3 fixes some PHP backwards compatibility issues.
    9898
    9999
    100100== Changelog ==
    101101
    102 = 0.7.2-beta =
     102= 0.7.3-beta =
    103103
    104104* Cleaned up code formatting and style considerably across the entire plugin, adding much needed inline documentation
     
    111111* Outlined an upgrade system for seamless transitions from one version to the next
    112112* Improved the import process for upgrading from LDD Business Directory
    113 * Fixed a compatibility issue with ldl_has_meta()
     113* Fixed two backwards compatibility errors
     114* Fixed a bug in the uninstall that was causing it to fail
    114115
    115116= 0.5.4-beta =
  • ldd-directory-lite/trunk/includes/admin/settings.php

    r948223 r952290  
    5353
    5454        wp_enqueue_style('wp-color-picker');
     55        wp_enqueue_style('lddlite-bootstrap', LDDLITE_URL . 'public/css/bootstrap.css', array(), LDDLITE_VERSION);
     56
    5557        wp_enqueue_script('wp-color-picker');
    5658        wp_enqueue_script('lddlite-admin', LDDLITE_URL . 'public/js/admin.js', array('wp-color-picker'), false, true);
    57 
    58         wp_enqueue_style('lddlite-bootstrap', LDDLITE_URL . 'public/css/bootstrap.css', array(), LDDLITE_VERSION);
    59         wp_enqueue_script('bootstrap-tagsinput', LDDLITE_URL . 'public/js/bootstrap-tagsinput.min.js', array('lddlite-bootstrap'), false, true);
    60         wp_enqueue_style('bootstrap-tagsinput', LDDLITE_URL . 'public/css/bootstrap-tagsinput.css');
    6159
    6260    }
     
    283281        function _f_appearance_primary_normal() {
    284282            echo '<input id="appearance_primary_normal" type="text" name="lddlite_settings[appearance_primary_normal]" value="' . ldl_get_setting('appearance_primary_normal') . '" class="my-color-field" data-default-color="#3bafda">';
    285             echo '<input id="appearance_primary_hover" type="text" name="lddlite_settings[appearance_primaryhover]" value="' . ldl_get_setting('appearance_primary_hover') . '" class="my-color-field" data-default-color="#3071a9">';
     283            echo '<input id="appearance_primary_hover" type="text" name="lddlite_settings[appearance_primary_hover]" value="' . ldl_get_setting('appearance_primary_hover') . '" class="my-color-field" data-default-color="#3071a9">';
    286284            echo '<input id="appearance_primary_foreground" type="text" name="lddlite_settings[appearance_primary_foreground]" value="' . ldl_get_setting('appearance_primary_foreground') . '" class="my-color-field" data-default-color="#ffffff">';
    287285            echo '<p class="description">' . __('Set the <strong>normal / hover / foreground</strong> state for primary elements, including various buttons, labels and badges.', 'lddlite') . '</p>';
  • ldd-directory-lite/trunk/includes/class.processor.php

    r948239 r952290  
    8989
    9090            if (is_array($value)) {
    91                 $this->data[$field] = stripslashes_deep($value);
     91                $this->data[ $field ] = stripslashes_deep($value);
    9292            } else {
    93                 $this->data[$field] = stripslashes(trim($value));
     93                $this->data[ $field ] = stripslashes(trim($value));
    9494            }
    9595
     
    113113        // Loop through and check for required fields first
    114114        foreach ($required as $field) {
    115             if ('' == $this->data[$field]) {
    116                 $this->errors[$field] = apply_filters('lddlite_presentation_required_errmsg', $required_errmsg, $field);
     115            if ('' == $this->data[ $field ]) {
     116                $this->errors[ $field ] = apply_filters('lddlite_presentation_required_errmsg', $required_errmsg, $field);
    117117            }
    118118        }
     
    124124
    125125            if ($error) {
    126                 $this->errors[$field] = $error;
     126                $this->errors[ $field ] = $error;
    127127            }
    128128
     
    154154     */
    155155    public function get_value($field) {
    156         return isset($this->data[$field]) ? $this->data[$field] : '';
     156        return isset($this->data[ $field ]) ? $this->data[ $field ] : '';
    157157    }
    158158
     
    164164     */
    165165    public function has_error($field) {
    166         return isset($this->errors[$field]);
     166        return isset($this->errors[ $field ]);
    167167    }
    168168
     
    193193        $error_wrapper = apply_filters('lddlite_presentation_error_wrapper', $default_wrapper, $field );
    194194
    195         return isset($this->errors[$field]) ? sprintf($error_wrapper, $this->errors[$field]) : '';
     195        return isset($this->errors[ $field ]) ? sprintf($error_wrapper, $this->errors[ $field ]) : '';
    196196    }
    197197
  • ldd-directory-lite/trunk/includes/functions.php

    r948864 r952290  
    165165 * setting so that any filters or actions returning a link to the directories home page has a post_id to work with.
    166166 *
    167  * @todo This can be removed once we have a notice in place for installing the necessary pages
    168  *
    169167 * @param int     $post_ID Post ID.
    170168 * @param WP_Post $post    Post object.
     
    195193    $pattern = get_shortcode_regex();
    196194    if (preg_match("/$pattern/s", $post->post_content))
    197         ldl_update_setting('directory_front_page', $post_id);
     195        ldl_update_setting('directory_page', $post_id);
    198196
    199197    // Reset the global array
     
    201199
    202200}
     201
    203202add_action('save_post', 'ldl_haz_shortcode', 10, 2);
    204203
    205204
    206205/**
    207  * Identify and return meta data for the current listing. See @todo for ldl_get_url()
    208  *
    209  * @param string $key The meta identifier
    210  *
    211  * @return array|bool|string False if nothing is found, the listing metadata otherwise
     206 * Wrapper to collect post meta for a listing
     207 *
     208 * @param $id
     209 * @param $field
     210 */
     211function ldl_has_meta($key) {
     212    return ldl_get_meta($key) ? true : false;
     213}
     214
     215
     216/**
     217 * Wrapper to collect post meta for a listing
     218 *
     219 * @param $id
     220 * @param $field
    212221 */
    213222function ldl_get_meta($key) {
     
    222231}
    223232
    224 
    225 /**
    226  * For now, nothing more than an alias for esc_url(). Consider how to evolve this to help with URLs across the
    227  * entire plugin.
    228  *
    229  * @todo This seems like it should be in template-functions.php; confirm if there's any reason why the get_meta
    230  *       family needs to be in functions.php and if not, move it over.
    231  *
    232  * @param string $key The URL identifier
    233  * @return bool|string False if nothing is found, the escaped URL otherwise
    234  */
    235 function ldl_get_url($key) {
    236 
    237     $url = false;
    238     $key = 'url_' . $key;
    239 
    240     if (ldl_has_meta($key)) {
    241         $url = esc_url(ldl_get_meta($key));
    242     }
    243 
    244     return $url;
    245 }
    246 
    247 
    248 /**
    249  * Wrapper to collect post meta for a listing
    250  *
    251  * @param $id
    252  * @param $field
    253  */
    254 function ldl_has_meta($key) {
    255     return ldl_get_meta($key) ? true : false;
    256 }
    257233
    258234/**
  • ldd-directory-lite/trunk/includes/shortcodes/submit.php

    r948239 r952290  
    212212    global $lddlite_submit_processor;
    213213
    214     $to = $lddlite_submit_processor->get_data()['contact_email'];
     214    $to = $lddlite_submit_processor->get_value('contact_email');
    215215
    216216    $subject = ldl_get_setting('email_onsubmit_subject');
  • ldd-directory-lite/trunk/ldd-directory-lite.php

    r948864 r952290  
    1111 * Plugin URI:        http://wordpress.org/plugins/ldd-directory-lite
    1212 * Description:       Powerful and simple to use, add a directory of business or other organizations to your web site.
    13  * Version:           0.7.2-beta
     13 * Version:           0.7.3-beta
    1414 * Author:            LDD Web Design
    1515 * Author URI:        http://www.lddwebdesign.com
     
    2727 * Define constants
    2828 */
    29 define('LDDLITE_VERSION', '0.7.2-beta');
     29define('LDDLITE_VERSION', '0.7.3-beta');
    3030
    3131define('LDDLITE_PATH', trailingslashit(dirname(__FILE__)));
     
    215215
    216216        $lang_dir = LDDLITE_PATH . 'languages/';
    217         $locale = apply_filters('plugin_locale', get_locale(), 'lddlite');
    218         $mofile = $lang_dir . 'lddlite' . $locale . '.mo';
     217        $locale = apply_filters('plugin_locale', get_locale());
     218        $mofile = $lang_dir . $locale . '.mo';
    219219
    220220        if (file_exists($mofile)) {
     
    294294
    295295/** Das boot */
    296 ldl_get_instance();
     296if (!defined('WP_UNINSTALL_PLUGIN'))
     297    ldl_get_instance();
  • ldd-directory-lite/trunk/uninstall.php

    r948223 r952290  
    1414    die;
    1515
    16 global $wpdb;
    17 
     16require_once(dirname(__FILE__) . '/ldd-directory-lite.php');
    1817
    1918/**
     
    2120 */
    2221function ldl_uninstall_attachments() {
     22    global $wpdb;
    2323
    24     $post_ids = ldl_get_all_IDs();
     24    $query = sprintf("
     25                    SELECT ID
     26                    FROM `%s`
     27                    WHERE post_type = '%s'
     28                        AND post_status NOT IN ( 'auto-draft', 'inherit' )
     29                ", $wpdb->posts, LDDLITE_POST_TYPE);
     30
     31    $post_ids = $wpdb->get_col($query);
     32
    2533    if (!$post_ids)
    2634        return;
     
    96104ldl_uninstall_posts();
    97105ldl_uninstall_taxonomies();
    98 echo 'IN HERE?!';
     106
    99107delete_option('lddlite_settings');
    100108delete_option('lddlite_version');
Note: See TracChangeset for help on using the changeset viewer.