Changeset 2215158
- Timestamp:
- 12/19/2019 02:49:43 PM (6 years ago)
- Location:
- agentpress-listings
- Files:
-
- 10 edited
- 1 copied
-
tags/1.3.4 (copied) (copied from agentpress-listings/trunk)
-
tags/1.3.4/includes/class-agentpress-listings.php (modified) (5 diffs)
-
tags/1.3.4/languages/agentpress-listings.pot (modified) (2 diffs)
-
tags/1.3.4/package.json (modified) (1 diff)
-
tags/1.3.4/plugin.php (modified) (2 diffs)
-
tags/1.3.4/readme.txt (modified) (2 diffs)
-
trunk/includes/class-agentpress-listings.php (modified) (5 diffs)
-
trunk/languages/agentpress-listings.pot (modified) (2 diffs)
-
trunk/package.json (modified) (1 diff)
-
trunk/plugin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
agentpress-listings/tags/1.3.4/includes/class-agentpress-listings.php
r2124646 r2215158 217 217 218 218 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 219 $property_details = array_map( 'wp_kses', array( wp_unslash( $_POST['ap'] ) ), array( $this->allowed_tags ) ); 219 $property_details = (array) wp_unslash( $_POST['ap'] ); 220 array_walk( $property_details, array( $this, 'sanitize_detail' ) ); 220 221 221 222 /** Store the custom fields */ 222 foreach ( (array) $property_details[0] as $key => $value ) { 223 223 foreach ( (array) $property_details as $key => $value ) { 224 224 /** Save/Update/Delete */ 225 225 if ( $value ) { … … 231 231 232 232 // Extra check for price that can create a sortable value. 233 if ( isset( $property_details[ 0]['_listing_price'] ) && ! empty( $property_details[0]['_listing_price'] ) ) {234 $price_sortable = preg_replace( '/[^0-9\.]/', '', $property_details[ 0]['_listing_price'] );233 if ( isset( $property_details['_listing_price'] ) && ! empty( $property_details['_listing_price'] ) ) { 234 $price_sortable = preg_replace( '/[^0-9\.]/', '', $property_details['_listing_price'] ); 235 235 update_post_meta( $post_id, '_listing_price_sortable', floatval( $price_sortable ) ); 236 236 } else { … … 242 242 * Filter the columns in the "Listings" screen, define our own. 243 243 * 244 * @param array $columns Columns. 244 * @param array $columns Columns data. 245 * @return array Modified columns data. 245 246 */ 246 247 public function columns_filter( $columns ) { … … 373 374 * 374 375 * @param array $template Template. 376 * @return string|array The template filename or the original template data. 375 377 */ 376 378 public function search_template( $template ) { … … 412 414 } 413 415 416 /** 417 * Callback for `array_walk` to sanitize property details during save. 418 * 419 * @param string $detail The property meta data. 420 * @param mixed $key Key, unused. 421 */ 422 protected function sanitize_detail( &$detail, $key ) { 423 $detail = wp_kses( $detail, (array) $this->allowed_tags ); 424 } 425 414 426 } -
agentpress-listings/tags/1.3.4/languages/agentpress-listings.pot
r2124646 r2215158 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: AgentPress Listings 1.3. 3\n"5 "Project-Id-Version: AgentPress Listings 1.3.4\n" 6 6 "Report-Msgid-Bugs-To: StudioPress <[email protected]>\n" 7 "POT-Creation-Date: 2019- 07-11 15:33:03+00:00\n"7 "POT-Creation-Date: 2019-12-16 13:14:51+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" … … 153 153 msgstr "" 154 154 155 #: includes/class-agentpress-listings.php:25 0155 #: includes/class-agentpress-listings.php:251 156 156 msgid "Thumbnail" 157 157 msgstr "" 158 158 159 #: includes/class-agentpress-listings.php:25 1159 #: includes/class-agentpress-listings.php:252 160 160 msgid "Listing Title" 161 161 msgstr "" 162 162 163 #: includes/class-agentpress-listings.php:25 2163 #: includes/class-agentpress-listings.php:253 164 164 msgid "Details" 165 165 msgstr "" 166 166 167 #: includes/class-agentpress-listings.php:25 3167 #: includes/class-agentpress-listings.php:254 168 168 msgid "Features" 169 169 msgstr "" 170 170 171 #: includes/class-agentpress-listings.php:25 4171 #: includes/class-agentpress-listings.php:255 172 172 msgid "Categories" 173 173 msgstr "" 174 174 175 #: includes/class-agentpress-listings.php:33 2175 #: includes/class-agentpress-listings.php:333 176 176 msgid "Additional Features:" 177 177 msgstr "" 178 178 179 #: includes/class-agentpress-listings.php:4 08179 #: includes/class-agentpress-listings.php:410 180 180 msgid "Listing Search Results" 181 181 msgstr "" -
agentpress-listings/tags/1.3.4/package.json
r2124646 r2215158 30 30 "author": "StudioPress", 31 31 "authoruri": "https://www.studiopress.com/", 32 "version": "1.3. 3",32 "version": "1.3.4", 33 33 "license": "GPL-2.0-or-later", 34 34 "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html", -
agentpress-listings/tags/1.3.4/plugin.php
r2124646 r2215158 7 7 * Author URI: https://www.studiopress.com/ 8 8 * 9 * Version: 1.3. 39 * Version: 1.3.4 10 10 * 11 11 * Text Domain: agentpress-listings … … 106 106 107 107 define( 'APL_URL', plugin_dir_url( __FILE__ ) ); 108 define( 'APL_VERSION', '1.3. 3' );108 define( 'APL_VERSION', '1.3.4' ); 109 109 110 110 /** Load textdomain for translation */ -
agentpress-listings/tags/1.3.4/readme.txt
r2124646 r2215158 3 3 Tags: real estate, agentpress, genesis, genesiswp 4 4 Requires at least: 4.0.0 5 Tested up to: 5. 2.26 Stable tag: 1.3. 35 Tested up to: 5.3 6 Stable tag: 1.3.4 7 7 8 8 This plugin adds a Listings custom post type for Real Estate agents. … … 31 31 32 32 == Changelog == 33 34 = 1.3.4 = 35 * Ensure edited property details save in WordPress 5.3+. 33 36 34 37 = 1.3.3 = -
agentpress-listings/trunk/includes/class-agentpress-listings.php
r2124646 r2215158 217 217 218 218 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 219 $property_details = array_map( 'wp_kses', array( wp_unslash( $_POST['ap'] ) ), array( $this->allowed_tags ) ); 219 $property_details = (array) wp_unslash( $_POST['ap'] ); 220 array_walk( $property_details, array( $this, 'sanitize_detail' ) ); 220 221 221 222 /** Store the custom fields */ 222 foreach ( (array) $property_details[0] as $key => $value ) { 223 223 foreach ( (array) $property_details as $key => $value ) { 224 224 /** Save/Update/Delete */ 225 225 if ( $value ) { … … 231 231 232 232 // Extra check for price that can create a sortable value. 233 if ( isset( $property_details[ 0]['_listing_price'] ) && ! empty( $property_details[0]['_listing_price'] ) ) {234 $price_sortable = preg_replace( '/[^0-9\.]/', '', $property_details[ 0]['_listing_price'] );233 if ( isset( $property_details['_listing_price'] ) && ! empty( $property_details['_listing_price'] ) ) { 234 $price_sortable = preg_replace( '/[^0-9\.]/', '', $property_details['_listing_price'] ); 235 235 update_post_meta( $post_id, '_listing_price_sortable', floatval( $price_sortable ) ); 236 236 } else { … … 242 242 * Filter the columns in the "Listings" screen, define our own. 243 243 * 244 * @param array $columns Columns. 244 * @param array $columns Columns data. 245 * @return array Modified columns data. 245 246 */ 246 247 public function columns_filter( $columns ) { … … 373 374 * 374 375 * @param array $template Template. 376 * @return string|array The template filename or the original template data. 375 377 */ 376 378 public function search_template( $template ) { … … 412 414 } 413 415 416 /** 417 * Callback for `array_walk` to sanitize property details during save. 418 * 419 * @param string $detail The property meta data. 420 * @param mixed $key Key, unused. 421 */ 422 protected function sanitize_detail( &$detail, $key ) { 423 $detail = wp_kses( $detail, (array) $this->allowed_tags ); 424 } 425 414 426 } -
agentpress-listings/trunk/languages/agentpress-listings.pot
r2124646 r2215158 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: AgentPress Listings 1.3. 3\n"5 "Project-Id-Version: AgentPress Listings 1.3.4\n" 6 6 "Report-Msgid-Bugs-To: StudioPress <[email protected]>\n" 7 "POT-Creation-Date: 2019- 07-11 15:33:03+00:00\n"7 "POT-Creation-Date: 2019-12-16 13:14:51+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" … … 153 153 msgstr "" 154 154 155 #: includes/class-agentpress-listings.php:25 0155 #: includes/class-agentpress-listings.php:251 156 156 msgid "Thumbnail" 157 157 msgstr "" 158 158 159 #: includes/class-agentpress-listings.php:25 1159 #: includes/class-agentpress-listings.php:252 160 160 msgid "Listing Title" 161 161 msgstr "" 162 162 163 #: includes/class-agentpress-listings.php:25 2163 #: includes/class-agentpress-listings.php:253 164 164 msgid "Details" 165 165 msgstr "" 166 166 167 #: includes/class-agentpress-listings.php:25 3167 #: includes/class-agentpress-listings.php:254 168 168 msgid "Features" 169 169 msgstr "" 170 170 171 #: includes/class-agentpress-listings.php:25 4171 #: includes/class-agentpress-listings.php:255 172 172 msgid "Categories" 173 173 msgstr "" 174 174 175 #: includes/class-agentpress-listings.php:33 2175 #: includes/class-agentpress-listings.php:333 176 176 msgid "Additional Features:" 177 177 msgstr "" 178 178 179 #: includes/class-agentpress-listings.php:4 08179 #: includes/class-agentpress-listings.php:410 180 180 msgid "Listing Search Results" 181 181 msgstr "" -
agentpress-listings/trunk/package.json
r2124646 r2215158 30 30 "author": "StudioPress", 31 31 "authoruri": "https://www.studiopress.com/", 32 "version": "1.3. 3",32 "version": "1.3.4", 33 33 "license": "GPL-2.0-or-later", 34 34 "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html", -
agentpress-listings/trunk/plugin.php
r2124646 r2215158 7 7 * Author URI: https://www.studiopress.com/ 8 8 * 9 * Version: 1.3. 39 * Version: 1.3.4 10 10 * 11 11 * Text Domain: agentpress-listings … … 106 106 107 107 define( 'APL_URL', plugin_dir_url( __FILE__ ) ); 108 define( 'APL_VERSION', '1.3. 3' );108 define( 'APL_VERSION', '1.3.4' ); 109 109 110 110 /** Load textdomain for translation */ -
agentpress-listings/trunk/readme.txt
r2124646 r2215158 3 3 Tags: real estate, agentpress, genesis, genesiswp 4 4 Requires at least: 4.0.0 5 Tested up to: 5. 2.26 Stable tag: 1.3. 35 Tested up to: 5.3 6 Stable tag: 1.3.4 7 7 8 8 This plugin adds a Listings custom post type for Real Estate agents. … … 31 31 32 32 == Changelog == 33 34 = 1.3.4 = 35 * Ensure edited property details save in WordPress 5.3+. 33 36 34 37 = 1.3.3 =
Note: See TracChangeset
for help on using the changeset viewer.