Changeset 952290
- Timestamp:
- 07/21/2014 04:47:37 PM (12 years ago)
- Location:
- ldd-directory-lite
- Files:
-
- 14 edited
- 1 copied
-
tags/0.7.3-beta (copied) (copied from ldd-directory-lite/trunk)
-
tags/0.7.3-beta/README.txt (modified) (3 diffs)
-
tags/0.7.3-beta/includes/admin/settings.php (modified) (2 diffs)
-
tags/0.7.3-beta/includes/class.processor.php (modified) (6 diffs)
-
tags/0.7.3-beta/includes/functions.php (modified) (4 diffs)
-
tags/0.7.3-beta/includes/shortcodes/submit.php (modified) (1 diff)
-
tags/0.7.3-beta/ldd-directory-lite.php (modified) (4 diffs)
-
tags/0.7.3-beta/uninstall.php (modified) (3 diffs)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/includes/admin/settings.php (modified) (2 diffs)
-
trunk/includes/class.processor.php (modified) (6 diffs)
-
trunk/includes/functions.php (modified) (4 diffs)
-
trunk/includes/shortcodes/submit.php (modified) (1 diff)
-
trunk/ldd-directory-lite.php (modified) (4 diffs)
-
trunk/uninstall.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ldd-directory-lite/tags/0.7.3-beta/README.txt
r948864 r952290 4 4 Requires at least: 3.9.1 5 5 Tested up to: 3.9.1 6 Stable tag: 0.7. 2-beta6 Stable tag: 0.7.3-beta 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 94 94 == Upgrade Notice == 95 95 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 = 97 0.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. 98 98 99 99 100 100 == Changelog == 101 101 102 = 0.7. 2-beta =102 = 0.7.3-beta = 103 103 104 104 * Cleaned up code formatting and style considerably across the entire plugin, adding much needed inline documentation … … 111 111 * Outlined an upgrade system for seamless transitions from one version to the next 112 112 * 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 114 115 115 116 = 0.5.4-beta = -
ldd-directory-lite/tags/0.7.3-beta/includes/admin/settings.php
r948223 r952290 53 53 54 54 wp_enqueue_style('wp-color-picker'); 55 wp_enqueue_style('lddlite-bootstrap', LDDLITE_URL . 'public/css/bootstrap.css', array(), LDDLITE_VERSION); 56 55 57 wp_enqueue_script('wp-color-picker'); 56 58 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');61 59 62 60 } … … 283 281 function _f_appearance_primary_normal() { 284 282 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_primary hover]" 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">'; 286 284 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">'; 287 285 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 89 89 90 90 if (is_array($value)) { 91 $this->data[ $field] = stripslashes_deep($value);91 $this->data[ $field ] = stripslashes_deep($value); 92 92 } else { 93 $this->data[ $field] = stripslashes(trim($value));93 $this->data[ $field ] = stripslashes(trim($value)); 94 94 } 95 95 … … 113 113 // Loop through and check for required fields first 114 114 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); 117 117 } 118 118 } … … 124 124 125 125 if ($error) { 126 $this->errors[ $field] = $error;126 $this->errors[ $field ] = $error; 127 127 } 128 128 … … 154 154 */ 155 155 public function get_value($field) { 156 return isset($this->data[ $field]) ? $this->data[$field] : '';156 return isset($this->data[ $field ]) ? $this->data[ $field ] : ''; 157 157 } 158 158 … … 164 164 */ 165 165 public function has_error($field) { 166 return isset($this->errors[ $field]);166 return isset($this->errors[ $field ]); 167 167 } 168 168 … … 193 193 $error_wrapper = apply_filters('lddlite_presentation_error_wrapper', $default_wrapper, $field ); 194 194 195 return isset($this->errors[ $field]) ? sprintf($error_wrapper, $this->errors[$field]) : '';195 return isset($this->errors[ $field ]) ? sprintf($error_wrapper, $this->errors[ $field ]) : ''; 196 196 } 197 197 -
ldd-directory-lite/tags/0.7.3-beta/includes/functions.php
r948864 r952290 165 165 * setting so that any filters or actions returning a link to the directories home page has a post_id to work with. 166 166 * 167 * @todo This can be removed once we have a notice in place for installing the necessary pages168 *169 167 * @param int $post_ID Post ID. 170 168 * @param WP_Post $post Post object. … … 195 193 $pattern = get_shortcode_regex(); 196 194 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); 198 196 199 197 // Reset the global array … … 201 199 202 200 } 201 203 202 add_action('save_post', 'ldl_haz_shortcode', 10, 2); 204 203 205 204 206 205 /** 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 */ 211 function 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 212 221 */ 213 222 function ldl_get_meta($key) { … … 222 231 } 223 232 224 225 /**226 * For now, nothing more than an alias for esc_url(). Consider how to evolve this to help with URLs across the227 * entire plugin.228 *229 * @todo This seems like it should be in template-functions.php; confirm if there's any reason why the get_meta230 * family needs to be in functions.php and if not, move it over.231 *232 * @param string $key The URL identifier233 * @return bool|string False if nothing is found, the escaped URL otherwise234 */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 listing250 *251 * @param $id252 * @param $field253 */254 function ldl_has_meta($key) {255 return ldl_get_meta($key) ? true : false;256 }257 233 258 234 /** -
ldd-directory-lite/tags/0.7.3-beta/includes/shortcodes/submit.php
r948239 r952290 212 212 global $lddlite_submit_processor; 213 213 214 $to = $lddlite_submit_processor->get_ data()['contact_email'];214 $to = $lddlite_submit_processor->get_value('contact_email'); 215 215 216 216 $subject = ldl_get_setting('email_onsubmit_subject'); -
ldd-directory-lite/tags/0.7.3-beta/ldd-directory-lite.php
r948864 r952290 11 11 * Plugin URI: http://wordpress.org/plugins/ldd-directory-lite 12 12 * Description: Powerful and simple to use, add a directory of business or other organizations to your web site. 13 * Version: 0.7. 2-beta13 * Version: 0.7.3-beta 14 14 * Author: LDD Web Design 15 15 * Author URI: http://www.lddwebdesign.com … … 27 27 * Define constants 28 28 */ 29 define('LDDLITE_VERSION', '0.7. 2-beta');29 define('LDDLITE_VERSION', '0.7.3-beta'); 30 30 31 31 define('LDDLITE_PATH', trailingslashit(dirname(__FILE__))); … … 215 215 216 216 $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'; 219 219 220 220 if (file_exists($mofile)) { … … 294 294 295 295 /** Das boot */ 296 ldl_get_instance(); 296 if (!defined('WP_UNINSTALL_PLUGIN')) 297 ldl_get_instance(); -
ldd-directory-lite/tags/0.7.3-beta/uninstall.php
r948223 r952290 14 14 die; 15 15 16 global $wpdb; 17 16 require_once(dirname(__FILE__) . '/ldd-directory-lite.php'); 18 17 19 18 /** … … 21 20 */ 22 21 function ldl_uninstall_attachments() { 22 global $wpdb; 23 23 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 25 33 if (!$post_ids) 26 34 return; … … 96 104 ldl_uninstall_posts(); 97 105 ldl_uninstall_taxonomies(); 98 echo 'IN HERE?!'; 106 99 107 delete_option('lddlite_settings'); 100 108 delete_option('lddlite_version'); -
ldd-directory-lite/trunk/README.txt
r948864 r952290 4 4 Requires at least: 3.9.1 5 5 Tested up to: 3.9.1 6 Stable tag: 0.7. 2-beta6 Stable tag: 0.7.3-beta 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 94 94 == Upgrade Notice == 95 95 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 = 97 0.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. 98 98 99 99 100 100 == Changelog == 101 101 102 = 0.7. 2-beta =102 = 0.7.3-beta = 103 103 104 104 * Cleaned up code formatting and style considerably across the entire plugin, adding much needed inline documentation … … 111 111 * Outlined an upgrade system for seamless transitions from one version to the next 112 112 * 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 114 115 115 116 = 0.5.4-beta = -
ldd-directory-lite/trunk/includes/admin/settings.php
r948223 r952290 53 53 54 54 wp_enqueue_style('wp-color-picker'); 55 wp_enqueue_style('lddlite-bootstrap', LDDLITE_URL . 'public/css/bootstrap.css', array(), LDDLITE_VERSION); 56 55 57 wp_enqueue_script('wp-color-picker'); 56 58 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');61 59 62 60 } … … 283 281 function _f_appearance_primary_normal() { 284 282 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_primary hover]" 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">'; 286 284 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">'; 287 285 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 89 89 90 90 if (is_array($value)) { 91 $this->data[ $field] = stripslashes_deep($value);91 $this->data[ $field ] = stripslashes_deep($value); 92 92 } else { 93 $this->data[ $field] = stripslashes(trim($value));93 $this->data[ $field ] = stripslashes(trim($value)); 94 94 } 95 95 … … 113 113 // Loop through and check for required fields first 114 114 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); 117 117 } 118 118 } … … 124 124 125 125 if ($error) { 126 $this->errors[ $field] = $error;126 $this->errors[ $field ] = $error; 127 127 } 128 128 … … 154 154 */ 155 155 public function get_value($field) { 156 return isset($this->data[ $field]) ? $this->data[$field] : '';156 return isset($this->data[ $field ]) ? $this->data[ $field ] : ''; 157 157 } 158 158 … … 164 164 */ 165 165 public function has_error($field) { 166 return isset($this->errors[ $field]);166 return isset($this->errors[ $field ]); 167 167 } 168 168 … … 193 193 $error_wrapper = apply_filters('lddlite_presentation_error_wrapper', $default_wrapper, $field ); 194 194 195 return isset($this->errors[ $field]) ? sprintf($error_wrapper, $this->errors[$field]) : '';195 return isset($this->errors[ $field ]) ? sprintf($error_wrapper, $this->errors[ $field ]) : ''; 196 196 } 197 197 -
ldd-directory-lite/trunk/includes/functions.php
r948864 r952290 165 165 * setting so that any filters or actions returning a link to the directories home page has a post_id to work with. 166 166 * 167 * @todo This can be removed once we have a notice in place for installing the necessary pages168 *169 167 * @param int $post_ID Post ID. 170 168 * @param WP_Post $post Post object. … … 195 193 $pattern = get_shortcode_regex(); 196 194 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); 198 196 199 197 // Reset the global array … … 201 199 202 200 } 201 203 202 add_action('save_post', 'ldl_haz_shortcode', 10, 2); 204 203 205 204 206 205 /** 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 */ 211 function 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 212 221 */ 213 222 function ldl_get_meta($key) { … … 222 231 } 223 232 224 225 /**226 * For now, nothing more than an alias for esc_url(). Consider how to evolve this to help with URLs across the227 * entire plugin.228 *229 * @todo This seems like it should be in template-functions.php; confirm if there's any reason why the get_meta230 * family needs to be in functions.php and if not, move it over.231 *232 * @param string $key The URL identifier233 * @return bool|string False if nothing is found, the escaped URL otherwise234 */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 listing250 *251 * @param $id252 * @param $field253 */254 function ldl_has_meta($key) {255 return ldl_get_meta($key) ? true : false;256 }257 233 258 234 /** -
ldd-directory-lite/trunk/includes/shortcodes/submit.php
r948239 r952290 212 212 global $lddlite_submit_processor; 213 213 214 $to = $lddlite_submit_processor->get_ data()['contact_email'];214 $to = $lddlite_submit_processor->get_value('contact_email'); 215 215 216 216 $subject = ldl_get_setting('email_onsubmit_subject'); -
ldd-directory-lite/trunk/ldd-directory-lite.php
r948864 r952290 11 11 * Plugin URI: http://wordpress.org/plugins/ldd-directory-lite 12 12 * Description: Powerful and simple to use, add a directory of business or other organizations to your web site. 13 * Version: 0.7. 2-beta13 * Version: 0.7.3-beta 14 14 * Author: LDD Web Design 15 15 * Author URI: http://www.lddwebdesign.com … … 27 27 * Define constants 28 28 */ 29 define('LDDLITE_VERSION', '0.7. 2-beta');29 define('LDDLITE_VERSION', '0.7.3-beta'); 30 30 31 31 define('LDDLITE_PATH', trailingslashit(dirname(__FILE__))); … … 215 215 216 216 $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'; 219 219 220 220 if (file_exists($mofile)) { … … 294 294 295 295 /** Das boot */ 296 ldl_get_instance(); 296 if (!defined('WP_UNINSTALL_PLUGIN')) 297 ldl_get_instance(); -
ldd-directory-lite/trunk/uninstall.php
r948223 r952290 14 14 die; 15 15 16 global $wpdb; 17 16 require_once(dirname(__FILE__) . '/ldd-directory-lite.php'); 18 17 19 18 /** … … 21 20 */ 22 21 function ldl_uninstall_attachments() { 22 global $wpdb; 23 23 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 25 33 if (!$post_ids) 26 34 return; … … 96 104 ldl_uninstall_posts(); 97 105 ldl_uninstall_taxonomies(); 98 echo 'IN HERE?!'; 106 99 107 delete_option('lddlite_settings'); 100 108 delete_option('lddlite_version');
Note: See TracChangeset
for help on using the changeset viewer.