Plugin Directory

Changeset 2215158


Ignore:
Timestamp:
12/19/2019 02:49:43 PM (6 years ago)
Author:
nathanrice
Message:

Tagging 1.3.4 from Github

Location:
agentpress-listings
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • agentpress-listings/tags/1.3.4/includes/class-agentpress-listings.php

    r2124646 r2215158  
    217217
    218218        // 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' ) );
    220221
    221222        /** Store the custom fields */
    222         foreach ( (array) $property_details[0] as $key => $value ) {
    223 
     223        foreach ( (array) $property_details as $key => $value ) {
    224224            /** Save/Update/Delete */
    225225            if ( $value ) {
     
    231231
    232232        // 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'] );
    235235            update_post_meta( $post_id, '_listing_price_sortable', floatval( $price_sortable ) );
    236236        } else {
     
    242242     * Filter the columns in the "Listings" screen, define our own.
    243243     *
    244      * @param array $columns Columns.
     244     * @param array $columns Columns data.
     245     * @return array Modified columns data.
    245246     */
    246247    public function columns_filter( $columns ) {
     
    373374     *
    374375     * @param  array $template Template.
     376     * @return string|array The template filename or the original template data.
    375377     */
    376378    public function search_template( $template ) {
     
    412414    }
    413415
     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
    414426}
  • agentpress-listings/tags/1.3.4/languages/agentpress-listings.pot

    r2124646 r2215158  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: AgentPress Listings 1.3.3\n"
     5"Project-Id-Version: AgentPress Listings 1.3.4\n"
    66"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"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
     
    153153msgstr ""
    154154
    155 #: includes/class-agentpress-listings.php:250
     155#: includes/class-agentpress-listings.php:251
    156156msgid "Thumbnail"
    157157msgstr ""
    158158
    159 #: includes/class-agentpress-listings.php:251
     159#: includes/class-agentpress-listings.php:252
    160160msgid "Listing Title"
    161161msgstr ""
    162162
    163 #: includes/class-agentpress-listings.php:252
     163#: includes/class-agentpress-listings.php:253
    164164msgid "Details"
    165165msgstr ""
    166166
    167 #: includes/class-agentpress-listings.php:253
     167#: includes/class-agentpress-listings.php:254
    168168msgid "Features"
    169169msgstr ""
    170170
    171 #: includes/class-agentpress-listings.php:254
     171#: includes/class-agentpress-listings.php:255
    172172msgid "Categories"
    173173msgstr ""
    174174
    175 #: includes/class-agentpress-listings.php:332
     175#: includes/class-agentpress-listings.php:333
    176176msgid "Additional Features:"
    177177msgstr ""
    178178
    179 #: includes/class-agentpress-listings.php:408
     179#: includes/class-agentpress-listings.php:410
    180180msgid "Listing Search Results"
    181181msgstr ""
  • agentpress-listings/tags/1.3.4/package.json

    r2124646 r2215158  
    3030    "author": "StudioPress",
    3131    "authoruri": "https://www.studiopress.com/",
    32     "version": "1.3.3",
     32    "version": "1.3.4",
    3333    "license": "GPL-2.0-or-later",
    3434    "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html",
  • agentpress-listings/tags/1.3.4/plugin.php

    r2124646 r2215158  
    77 * Author URI: https://www.studiopress.com/
    88 *
    9  * Version: 1.3.3
     9 * Version: 1.3.4
    1010 *
    1111 * Text Domain: agentpress-listings
     
    106106
    107107    define( 'APL_URL', plugin_dir_url( __FILE__ ) );
    108     define( 'APL_VERSION', '1.3.3' );
     108    define( 'APL_VERSION', '1.3.4' );
    109109
    110110    /** Load textdomain for translation */
  • agentpress-listings/tags/1.3.4/readme.txt

    r2124646 r2215158  
    33Tags: real estate, agentpress, genesis, genesiswp
    44Requires at least: 4.0.0
    5 Tested up to: 5.2.2
    6 Stable tag: 1.3.3
     5Tested up to: 5.3
     6Stable tag: 1.3.4
    77
    88This plugin adds a Listings custom post type for Real Estate agents.
     
    3131
    3232== Changelog ==
     33
     34= 1.3.4 =
     35* Ensure edited property details save in WordPress 5.3+.
    3336
    3437= 1.3.3 =
  • agentpress-listings/trunk/includes/class-agentpress-listings.php

    r2124646 r2215158  
    217217
    218218        // 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' ) );
    220221
    221222        /** Store the custom fields */
    222         foreach ( (array) $property_details[0] as $key => $value ) {
    223 
     223        foreach ( (array) $property_details as $key => $value ) {
    224224            /** Save/Update/Delete */
    225225            if ( $value ) {
     
    231231
    232232        // 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'] );
    235235            update_post_meta( $post_id, '_listing_price_sortable', floatval( $price_sortable ) );
    236236        } else {
     
    242242     * Filter the columns in the "Listings" screen, define our own.
    243243     *
    244      * @param array $columns Columns.
     244     * @param array $columns Columns data.
     245     * @return array Modified columns data.
    245246     */
    246247    public function columns_filter( $columns ) {
     
    373374     *
    374375     * @param  array $template Template.
     376     * @return string|array The template filename or the original template data.
    375377     */
    376378    public function search_template( $template ) {
     
    412414    }
    413415
     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
    414426}
  • agentpress-listings/trunk/languages/agentpress-listings.pot

    r2124646 r2215158  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: AgentPress Listings 1.3.3\n"
     5"Project-Id-Version: AgentPress Listings 1.3.4\n"
    66"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"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
     
    153153msgstr ""
    154154
    155 #: includes/class-agentpress-listings.php:250
     155#: includes/class-agentpress-listings.php:251
    156156msgid "Thumbnail"
    157157msgstr ""
    158158
    159 #: includes/class-agentpress-listings.php:251
     159#: includes/class-agentpress-listings.php:252
    160160msgid "Listing Title"
    161161msgstr ""
    162162
    163 #: includes/class-agentpress-listings.php:252
     163#: includes/class-agentpress-listings.php:253
    164164msgid "Details"
    165165msgstr ""
    166166
    167 #: includes/class-agentpress-listings.php:253
     167#: includes/class-agentpress-listings.php:254
    168168msgid "Features"
    169169msgstr ""
    170170
    171 #: includes/class-agentpress-listings.php:254
     171#: includes/class-agentpress-listings.php:255
    172172msgid "Categories"
    173173msgstr ""
    174174
    175 #: includes/class-agentpress-listings.php:332
     175#: includes/class-agentpress-listings.php:333
    176176msgid "Additional Features:"
    177177msgstr ""
    178178
    179 #: includes/class-agentpress-listings.php:408
     179#: includes/class-agentpress-listings.php:410
    180180msgid "Listing Search Results"
    181181msgstr ""
  • agentpress-listings/trunk/package.json

    r2124646 r2215158  
    3030    "author": "StudioPress",
    3131    "authoruri": "https://www.studiopress.com/",
    32     "version": "1.3.3",
     32    "version": "1.3.4",
    3333    "license": "GPL-2.0-or-later",
    3434    "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html",
  • agentpress-listings/trunk/plugin.php

    r2124646 r2215158  
    77 * Author URI: https://www.studiopress.com/
    88 *
    9  * Version: 1.3.3
     9 * Version: 1.3.4
    1010 *
    1111 * Text Domain: agentpress-listings
     
    106106
    107107    define( 'APL_URL', plugin_dir_url( __FILE__ ) );
    108     define( 'APL_VERSION', '1.3.3' );
     108    define( 'APL_VERSION', '1.3.4' );
    109109
    110110    /** Load textdomain for translation */
  • agentpress-listings/trunk/readme.txt

    r2124646 r2215158  
    33Tags: real estate, agentpress, genesis, genesiswp
    44Requires at least: 4.0.0
    5 Tested up to: 5.2.2
    6 Stable tag: 1.3.3
     5Tested up to: 5.3
     6Stable tag: 1.3.4
    77
    88This plugin adds a Listings custom post type for Real Estate agents.
     
    3131
    3232== Changelog ==
     33
     34= 1.3.4 =
     35* Ensure edited property details save in WordPress 5.3+.
    3336
    3437= 1.3.3 =
Note: See TracChangeset for help on using the changeset viewer.