Plugin Directory

Changeset 2143393


Ignore:
Timestamp:
08/21/2019 10:21:10 PM (7 years ago)
Author:
fareharbor
Message:

Add support for langauges, schedules, and make simple fallback the default

Location:
fareharbor
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • fareharbor/trunk/fareharbor.php

    r1785859 r2143393  
    44    Plugin URI: https://fareharbor.com/help/setup/wordpress-plugin/
    55    Description: Easily add FareHarbor reservation calendars and buttons to your site
    6     Version: 3.5
     6    Version: 3.6
    77    Author: FareHarbor
    88    Author URI: https://fareharbor.com
     
    4444    private function __construct() {}
    4545
    46     public static $version = '3.5';
     46    public static $version = '3.6';
    4747
    4848    // Update the saved version number in the wp_options table
     
    218218        'full_items' => self::get_option( 'fh_default_full_items', 'no' ),
    219219        'sheet' => self::get_option( 'fh_default_sheet', '' ),
    220         'fallback' => self::get_option( 'fh_default_fallback', '' ),
     220        'schedule' => self::get_option( 'fh_default_schedule', '' ),
     221        'fallback' => 'simple',
    221222        'flow' => '',
     223        'language' => self::get_option( 'fh_default_language', '' ),
    222224
    223225      );
     
    317319
    318320      // The bookembed url structure is very similar to the simple fallback url structure
    319       $is_simple_fallback = ( $args[ 'fallback' ] === 'simple' ) || $is_bookembed;
     321      $is_simple_fallback = ( $args[ 'fallback' ] === '' ) || ( $args[ 'fallback' ] === 'simple' ) || $is_bookembed;
    320322
    321323      $url = 'https://' . self::url() . '/';
     
    694696      if ( $args[ 'sheet' ] )
    695697        $out[ 'sheet' ] = $args[ 'sheet' ];
     698       
     699      if ( $args[ 'schedule' ] )
     700        $out[ 'schedule' ] = $args[ 'schedule' ];
     701       
     702      if ( $args[ 'language' ] )
     703        $out[ 'language' ] = $args[ 'language' ];
    696704
    697705      if ( $include_flow && $args[ 'flow' ] )
     
    864872
    865873      add_settings_field(
    866         'fh_default_fallback',
    867         'fallback',
    868         array( __CLASS__, 'render_select_field' ),
    869         __FILE__,
    870         'fh_shortcode_defaults_section',
    871         array(
    872           'option_name' => 'fh_default_fallback',
    873           'choices' => array(
    874             'simple',
    875             'classic',
    876           ),
    877           'description' => 'On certain mobile and touch devices, the book form will open as a new page instead of in a Lightframe. Choose "simple" for this page to mirror the look and feel of the Lightframe. Choose "classic" to take the user to your FareHarbor shortname website (and to the appropriate item on that site, if applicable).',
    878         )
    879       );
    880 
    881       add_settings_field(
    882874        'fh_default_asn',
    883875        'asn',
     
    924916          'option_name' => 'fh_default_sheet',
    925917          'description' => 'The price sheet that should be used while creating bookings.',
     918        )
     919      );
     920     
     921      add_settings_field(
     922        'fh_default_schedule',
     923        'schedule',
     924        array( __CLASS__, 'render_input_field' ),
     925        __FILE__,
     926        'fh_shortcode_defaults_section',
     927        array(
     928          'option_name' => 'fh_default_schedule',
     929          'description' => 'The price schedule that should be used while creating bookings.',
     930        )
     931      );
     932     
     933      add_settings_field(
     934        'fh_default_language',
     935        'language',
     936        array( __CLASS__, 'render_input_field' ),
     937        __FILE__,
     938        'fh_shortcode_defaults_section',
     939        array(
     940          'option_name' => 'fh_default_language',
     941          'description' => 'The two letter code for the language that FareHarbor pages should be overridden to, instead of detecting the user\'s language. (Not recommended.)',
    926942        )
    927943      );
  • fareharbor/trunk/readme.txt

    r1785859 r2143393  
    33Tags: reservations, booking calendar, booking, reservation plugin, reservation calendar, booking system
    44Requires at least: 3.0
    5 Tested up to: 4.9.1
     5Tested up to: 5.2.2
    66Stable tag: trunk
    77License: GPLv2 or later
     
    3939== Screenshots ==
    4040
    41 1. Generated embedded reservations calendar
    42 2. Lightframe booking overlay: customers book your activity without leaving your website
     411. Plugin settings
     422. Generated embedded reservations calendar
     433. Lightframe booking overlay: customers book your activity without leaving your website
    4344
    4445== Changelog ==
     46
     47= 3.6 =
     48* Add support for overriding language selection via `langauge` shortcode option
     49* Add support for setting price schedule via `schedule` shortcode option
     50* Updates output to default to "simple" fallbacks if no value is set
    4551
    4652= 3.5 =
Note: See TracChangeset for help on using the changeset viewer.