Plugin Directory

Changeset 2198669


Ignore:
Timestamp:
11/22/2019 08:45:28 AM (6 years ago)
Author:
webflowapp
Message:

Release 1.0.2
added support for webflow pagination

Location:
webflow-pages
Files:
75 added
5 edited

Legend:

Unmodified
Added
Removed
  • webflow-pages/trunk/README.txt

    r2167725 r2198669  
    6767
    6868== Changelog ==
     69= 1.0.2 =
     70* Tweak - Added support for Webflow Pagination
     71
    6972= 1.0.1 =
    7073* Fix - Fixed typo inside settings page
  • webflow-pages/trunk/includes/misc/misc-functions.php

    r2162160 r2198669  
    8181    function wf_pages_get_site_domain() {
    8282        $site_data = Webflow_API::get_instance()->get_main_site_data();
    83         if (is_wp_error($site_data)) {
     83        if (is_wp_error($site_data) || !$site_data) {
    8484            return "";
    8585        } else {
     
    101101     */
    102102    function wf_pages_get_url_content( $url ) {
     103
    103104        $url = esc_url_raw( $url );
    104105
  • webflow-pages/trunk/includes/public/class-webflow-api.php

    r2167725 r2198669  
    184184
    185185            $site = $this->get_site();
     186
    186187            if (is_wp_error($site)) {
    187188                return $site;
     189            }
     190
     191            if (!$site) {
     192                return new WP_Error('invalid_site_data', "Site data seems not valid");
    188193            }
    189194            //if (!$site->lastPublished) { Last published is null on site hosted only on subdomains
     
    366371        {
    367372
    368             if (is_wp_error($site)) {
     373            if (is_wp_error($site) || !$site) {
    369374                delete_transient("_wf_site_data");
    370375                return $site;
     
    601606
    602607            $list_response = $this->list_sites(); // With single token api you get only 1 site
    603             if (!is_wp_error($list_response)) {
     608
     609            if (!is_wp_error($list_response) && !empty($list_response)) {
    604610                $this->site = $list_response[0];
    605611
  • webflow-pages/trunk/includes/public/class-webflow-pages-public.php

    r2162160 r2198669  
    140140            $request = $wp->request;
    141141
     142
    142143            $domain = wf_pages_get_site_domain();
    143144            if ( "" == $domain ) {
     
    148149
    149150            if ( isset( $static[ $request ] ) ) {
    150                 return untrailingslashit( $domain ) . esc_url_raw( $static[ $request ] );
     151                $url = untrailingslashit( $domain ) . esc_url_raw( $static[ $request ] );
     152
     153                if (!empty($_GET)) { // Sanitize Get
     154                    foreach ($_GET as $key => $value) {
     155                        $url = add_query_arg(sanitize_key($key), sanitize_title($value), $url);
     156                    }
     157                }
     158
     159                return esc_url($url);
    151160            }
    152161
     
    157166                    $part = str_replace( $pattern, "", $request );
    158167                    if ( $part ) {
    159                         return esc_url_raw( untrailingslashit( $domain ) . trailingslashit( $match ). $part );
     168                        $url = esc_url_raw( untrailingslashit( $domain ) . trailingslashit( $match ). $part );
     169
     170                        if (!empty($_GET)) { // Sanitize Get
     171                            foreach ($_GET as $key => $value) {
     172                                $url = add_query_arg(sanitize_key($key), sanitize_title($value), $url);
     173                            }
     174                        }
     175
     176                        return esc_url($url);
    160177                    }
    161178                }
  • webflow-pages/trunk/webflow-pages.php

    r2167725 r2198669  
    33 * Plugin Name: Webflow Pages
    44 * Description: Build pages visually with the power of code in Webflow, then serve them right on your WordPress site.
    5  * Version:     1.0.1
     5 * Version:     1.0.2
    66 * Author:      Webflow
    77 * Author URI:  https://webflow.com
     
    2222
    2323// Define constants
    24 define('WEBFLOW_PAGES_PLUGIN_VERSION', '1.0.1');
     24define('WEBFLOW_PAGES_PLUGIN_VERSION', '1.0.2');
    2525define('WEBFLOW_PAGES_PLUGIN_DIRECTORY_PATH', plugin_dir_path(__FILE__));
    2626define('WEBFLOW_PAGES_PLUGIN_DIRECTORY_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.