Plugin Directory

Changeset 1871882


Ignore:
Timestamp:
05/10/2018 04:35:39 AM (8 years ago)
Author:
richartkeil
Message:

introducing custom type filter support

Location:
exposify
Files:
6 edited
5 copied

Legend:

Unmodified
Added
Removed
  • exposify/tags/1.10.0/README.txt

    r1852091 r1871882  
    44Requires at least: 4.5.0
    55Tested up to: 4.6.1
    6 Stable tag: 1.9.0
     6Stable tag: 1.10.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4848== Changelog ==
    4949
     50= 1.10 =
     51* Allow to filter by custom types
    5052= 1.9 =
    5153* Add Exposify SSR support
  • exposify/tags/1.10.0/admin.php

    r1755493 r1871882  
    11<?php
     2
     3/**
     4 * Autoload all classes in the 'Settings' directory.
     5 *
     6 * @return void
     7 */
     8function autoloadSettingClasses()
     9{
     10  spl_autoload_register(function ($className) {
     11    if (strpos($className, 'Exposify') === false) return;
     12    $path = __DIR__ . '/Settings/' . $className . '.php';
     13    if (!file_exists($path)) return;
     14    require($path);
     15  });
     16}
    217
    318/**
     
    1833function exposify_init_settings()
    1934{
    20   register_setting('exposify_settings', 'exposify_settings', 'exposify_sanitize_settings');
     35  // Register the setting which will be stored in the database.
     36  //   'exposify' is both group and page (http://bit.ly/2FWfcHr)
     37  //   'exposify_settings' is the database key
     38  //   'exposify_sanitize_settings' is the callback to - drum-roll - sanitize the setting
     39  register_setting('exposify', 'exposify_settings', 'exposify_sanitize_settings');
    2140
    22   // register general section and fields
    23   add_settings_section(
    24     'exposify_general_section',
    25     __('Allgemeines', 'exposify'),
    26     null,
    27     'exposify_settings'
    28   );
     41  // Register a general section.
     42  $generalSection = new ExposifyGeneralSection($page = 'exposify');
     43  $generalSection->addField(new ExposifyApiKeyField());
     44  $generalSection->addField(new ExposifySiteTitleField());
     45  $generalSection->addField(new ExposifySiteSlugField());
     46  $generalSection->addField(new ExposifyCustomTypesField());
     47  $generalSection->register();
    2948
    30   add_settings_field(
    31     'exposify_api_key',
    32     __('Dein API Schlüssel für Exposify*', 'exposify'),
    33     'exposify_api_key_render',
    34     'exposify_settings',
    35     'exposify_general_section'
    36   );
    37 
    38   add_settings_field(
    39     'exposify_site_title',
    40     __('Der angezeigte Titel für die Immobilienübersicht', 'exposify'),
    41     'exposify_site_title_render',
    42     'exposify_settings',
    43     'exposify_general_section'
    44   );
    45 
    46   add_settings_field(
    47     'exposify_site_slug',
    48     __('Der Slug für die Immobilienübersicht', 'exposify'),
    49     'exposify_site_slug_render',
    50     'exposify_settings',
    51     'exposify_general_section'
    52   );
    53 
    54   // register visual section and fields
    55   add_settings_section(
    56     'exposify_visual_section',
    57     __('Darstellung', 'exposify'),
    58     null,
    59     'exposify_settings'
    60   );
    61 
    62   add_settings_field(
    63     'exposify_theme_template',
    64     __('Page Template für die Anzeige der Immobilien', 'exposify'),
    65     'exposify_theme_template_render',
    66     'exposify_settings',
    67     'exposify_visual_section'
    68   );
     49  $generalSection = new ExposifyVisualSection($page = 'exposify');
     50  $generalSection->addField(new ExposifyThemeTemplateField());
     51  $generalSection->register();
    6952}
    7053
     
    7760function exposify_sanitize_settings($option)
    7861{
     62  $originalOption = get_option('exposify_settings');
     63
     64  if (!exposify_json_is_valid($option['exposify_custom_types'])) {
     65    add_settings_error(
     66      'exposify_settings',
     67      esc_attr( 'exposify_json_invalid' ),
     68      'Die übergebenen Objekttypen in JSON waren ungültig.',
     69      'error'
     70    );
     71    return $originalOption;
     72  }
     73
    7974  $option['exposify_api_key']        = sanitize_text_field($option['exposify_api_key']);
    8075  $option['exposify_site_title']     = sanitize_text_field($option['exposify_site_title']);
    8176  $option['exposify_site_slug']      = sanitize_text_field($option['exposify_site_slug']);
     77  $option['exposify_custom_types']   = exposify_decode_custom_types($option['exposify_custom_types']);
    8278  $option['exposify_theme_template'] = sanitize_text_field($option['exposify_theme_template']);
    8379
     
    8682
    8783/**
    88  * Display the field.
     84 * Validate the given JSON input.
    8985 *
     86 * @param  string  $data
    9087 * @return void
    9188 */
    92 function exposify_api_key_render()
     89function exposify_json_is_valid($data)
    9390{
    94   $options = get_option('exposify_settings');
    95   ?>
    96   <input class="regular-text" type="text" name="exposify_settings[exposify_api_key]" value="<?php echo $options['exposify_api_key']; ?>" placeholder="z.B. e7081hfnjhdf987341r8rq98exir8x73084rzneh">
    97   <?php
     91  @json_decode($data, true);
     92
     93  return json_last_error() === JSON_ERROR_NONE;
    9894}
    9995
    10096/**
    101  * Display the field.
     97 * Get the custom types to store in the database.
    10298 *
     99 * @param  string  $data
    103100 * @return void
    104101 */
    105 function exposify_site_title_render()
     102function exposify_decode_custom_types($data)
    106103{
    107   $options = get_option('exposify_settings');
    108   ?>
    109   <input class="regular-text" type="text" name="exposify_settings[exposify_site_title]" value="<?php echo $options['exposify_site_title']; ?>" placeholder="z.B. Immobilien">
    110   <?php
    111 }
    112 
    113 /**
    114  * Display the field.
    115  *
    116  * @return void
    117  */
    118 function exposify_site_slug_render()
    119 {
    120   $options = get_option('exposify_settings');
    121   ?>
    122   <input class="regular-text" type="text" name="exposify_settings[exposify_site_slug]" value="<?php echo $options['exposify_site_slug']; ?>" placeholder="z.B. immobilien">
    123   <?php
    124 }
    125 
    126 /**
    127  * Display the field.
    128  *
    129  * @return void
    130  */
    131 function exposify_theme_template_render()
    132 {
    133   $options = get_option('exposify_settings');
    134   ?>
    135   <select name="exposify_settings[exposify_theme_template]">
    136     <?php
    137     echo '<option value="default" ' . ($options['exposify_theme_template'] == 'default' ? 'selected' : '') . '>Default</option>';
    138     foreach(wp_get_theme()->get_page_templates() as $path => $name) {
    139       echo '<option value="' . $path . '" ' . ($options['exposify_theme_template'] == $path ? 'selected' : '') . '>' . $name . '</option>';
    140     }
    141     ?>
    142   </select>
    143   <?php
     104  return json_decode($data, true);
    144105}
    145106
     
    155116    <h2>Exposify</h2>
    156117    <?php
    157     settings_fields('exposify_settings');
    158     do_settings_sections('exposify_settings');
     118    echo_settings_form_meta_fields('exposify');
     119    echo_settings_form_sections('exposify');
    159120    submit_button();
    160121    ?>
     
    211172}
    212173
     174require(__DIR__ . '/settings_wrapper.php');
     175autoloadSettingClasses();
    213176add_action('parse_query', 'exposify_remove_pages_from_admin_interfaces');
    214177add_action('admin_menu', 'exposify_add_options_page');
  • exposify/tags/1.10.0/exposify.php

    r1852091 r1871882  
    55Plugin URI: https://exposify.de
    66Description: Zeigt alle eigenen Immobilienangebote von Exposify.
    7 Version: 1.9.0
     7Version: 1.10.0
    88Author: Exposify
    99Author URI: https://exposify.de
     
    4646{
    4747  $options = get_option('exposify_settings');
    48   $slug = $options['exposify_site_slug'] ? $options['exposify_site_slug'] : 'immobilien';
    49   add_rewrite_rule('^' . $slug . '/(.+)/?$', 'index.php?page_id=' . get_option('exposify_property_page_id') . '&slug=$matches[1]', 'top');
     48  $siteSlug = $options['exposify_site_slug'] ? $options['exposify_site_slug'] : 'immobilien';
     49  add_rewrite_rule(
     50    '^' . $siteSlug . '/([\w\d]+)/?\??(.+)?$',
     51    'index.php?page_id=' . get_option('exposify_property_page_id') . '&slug=$matches[1]&$matches[2]',
     52    'top'
     53  );
    5054  add_rewrite_tag('%slug%', '([^&]+)');
     55  add_rewrite_tag('%type%', '([^&]+)');
    5156  add_rewrite_rule('^exposify-detail$', 'index.php?error=404', 'top');
    5257}
  • exposify/tags/1.10.0/handler.php

    r1852091 r1871882  
    6868     *
    6969     * @param  string  $searchQuery
    70      * @return void
    71      */
    72     public function requestAllProperties($searchQuery)
    73     {
    74         $url = $this->apiUrl . '?api_token=' . $this->apiKey . '&search=' . urlencode($searchQuery);
     70     * @param  array  $types
     71     * @param  array  $marketing
     72     * @return void
     73     */
     74    public function requestAllProperties(string $searchQuery = '', array $types = [], array $marketing = [])
     75    {
     76        $url = $this->apiUrl . '?api_token=' . $this->apiKey;
     77        $url = $url . '&search=' . urlencode($searchQuery);
     78        $url = $url . '&types=' . urlencode(implode(',', $types));
     79        $url = $url . '&marketing=' . urlencode(implode(',', $marketing));
    7580        $url = $url . '&origin=' . urlencode($this->getRequestOriginUrl());
    7681
  • exposify/tags/1.10.0/public.php

    r1852091 r1871882  
    11<?php
     2
     3class CustomType {
     4  /**
     5   * Construct the type.
     6   *
     7   * @param  string  $customType
     8   * @return void
     9   */
     10  public function __construct($customType)
     11  {
     12    $this->query = $customType;
     13    $this->config = get_option('exposify_settings')['exposify_custom_types'];
     14  }
     15
     16  /**
     17   * Try to retrieve the config for the type based on its slug or name.
     18   *
     19   * @return array|null
     20   */
     21  protected function getCustomTypeConfig()
     22  {
     23    foreach ($this->config as $customType) {
     24      if (isset($customType['slug']) && $customType['slug'] == $this->query) {
     25        return $customType;
     26      }
     27      if (isset($customType['title']) && $customType['title'] == $this->query) {
     28        return $customType;
     29      }
     30    }
     31    return null;
     32  }
     33
     34  /**
     35   * Return the Exposify types of this custom types. Returns null if the
     36   * type doesn't exist.
     37   *
     38   * @return array|null
     39   */
     40  public function getExposifyTypes()
     41  {
     42    if (($config = $this->getCustomTypeConfig()) && isset($config['types'])) {
     43      return $config['types'];
     44    }
     45    return [];
     46  }
     47
     48  /**
     49   * Return the Exposify marketing of this custom types. Returns null if the
     50   * type doesn't exist.
     51   *
     52   * @return array|null
     53   */
     54  public function getExposifyMarketing()
     55  {
     56    if (($config = $this->getCustomTypeConfig()) && isset($config['marketing'])) {
     57      return $config['marketing'];
     58    }
     59    return [];
     60  }
     61
     62  /**
     63   * Returns whether the type exists.
     64   *
     65   * @return bool
     66   */
     67  public function exists()
     68  {
     69    return (bool) $this->getCustomTypeConfig();
     70  }
     71}
    272
    373class ExposifyViewer {
     
    43113  public function attemptRequest()
    44114  {
    45     if (empty($this->exposify->html->getResult())) {
    46       if (get_query_var('slug')) {
    47         $this->exposify->html->requestSingleProperty(get_query_var('slug'));
    48       } else {
    49         $this->exposify->html->requestAllProperties(get_query_var('search', ''));
    50       }
    51     }
     115    if (!empty($this->exposify->html->getResult())) {
     116      return;
     117    }
     118
     119    if (get_query_var('slug')) {
     120      $this->exposify->html->requestSingleProperty(get_query_var('slug'));
     121      return;
     122    }
     123
     124    $type = new CustomType(get_query_var('type'));
     125
     126    if (!$type->exists()) {
     127      $this->exposify->html->requestAllProperties(get_query_var('search', ''));
     128      return;
     129    }
     130
     131    $this->exposify->html->requestAllProperties(
     132      get_query_var('search', ''),
     133      $type->getExposifyTypes(),
     134      $type->getExposifyMarketing()
     135    );
    52136  }
    53137
  • exposify/trunk/README.txt

    r1852091 r1871882  
    44Requires at least: 4.5.0
    55Tested up to: 4.6.1
    6 Stable tag: 1.9.0
     6Stable tag: 1.10.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4848== Changelog ==
    4949
     50= 1.10 =
     51* Allow to filter by custom types
    5052= 1.9 =
    5153* Add Exposify SSR support
  • exposify/trunk/admin.php

    r1755493 r1871882  
    11<?php
     2
     3/**
     4 * Autoload all classes in the 'Settings' directory.
     5 *
     6 * @return void
     7 */
     8function autoloadSettingClasses()
     9{
     10  spl_autoload_register(function ($className) {
     11    if (strpos($className, 'Exposify') === false) return;
     12    $path = __DIR__ . '/Settings/' . $className . '.php';
     13    if (!file_exists($path)) return;
     14    require($path);
     15  });
     16}
    217
    318/**
     
    1833function exposify_init_settings()
    1934{
    20   register_setting('exposify_settings', 'exposify_settings', 'exposify_sanitize_settings');
     35  // Register the setting which will be stored in the database.
     36  //   'exposify' is both group and page (http://bit.ly/2FWfcHr)
     37  //   'exposify_settings' is the database key
     38  //   'exposify_sanitize_settings' is the callback to - drum-roll - sanitize the setting
     39  register_setting('exposify', 'exposify_settings', 'exposify_sanitize_settings');
    2140
    22   // register general section and fields
    23   add_settings_section(
    24     'exposify_general_section',
    25     __('Allgemeines', 'exposify'),
    26     null,
    27     'exposify_settings'
    28   );
     41  // Register a general section.
     42  $generalSection = new ExposifyGeneralSection($page = 'exposify');
     43  $generalSection->addField(new ExposifyApiKeyField());
     44  $generalSection->addField(new ExposifySiteTitleField());
     45  $generalSection->addField(new ExposifySiteSlugField());
     46  $generalSection->addField(new ExposifyCustomTypesField());
     47  $generalSection->register();
    2948
    30   add_settings_field(
    31     'exposify_api_key',
    32     __('Dein API Schlüssel für Exposify*', 'exposify'),
    33     'exposify_api_key_render',
    34     'exposify_settings',
    35     'exposify_general_section'
    36   );
    37 
    38   add_settings_field(
    39     'exposify_site_title',
    40     __('Der angezeigte Titel für die Immobilienübersicht', 'exposify'),
    41     'exposify_site_title_render',
    42     'exposify_settings',
    43     'exposify_general_section'
    44   );
    45 
    46   add_settings_field(
    47     'exposify_site_slug',
    48     __('Der Slug für die Immobilienübersicht', 'exposify'),
    49     'exposify_site_slug_render',
    50     'exposify_settings',
    51     'exposify_general_section'
    52   );
    53 
    54   // register visual section and fields
    55   add_settings_section(
    56     'exposify_visual_section',
    57     __('Darstellung', 'exposify'),
    58     null,
    59     'exposify_settings'
    60   );
    61 
    62   add_settings_field(
    63     'exposify_theme_template',
    64     __('Page Template für die Anzeige der Immobilien', 'exposify'),
    65     'exposify_theme_template_render',
    66     'exposify_settings',
    67     'exposify_visual_section'
    68   );
     49  $generalSection = new ExposifyVisualSection($page = 'exposify');
     50  $generalSection->addField(new ExposifyThemeTemplateField());
     51  $generalSection->register();
    6952}
    7053
     
    7760function exposify_sanitize_settings($option)
    7861{
     62  $originalOption = get_option('exposify_settings');
     63
     64  if (!exposify_json_is_valid($option['exposify_custom_types'])) {
     65    add_settings_error(
     66      'exposify_settings',
     67      esc_attr( 'exposify_json_invalid' ),
     68      'Die übergebenen Objekttypen in JSON waren ungültig.',
     69      'error'
     70    );
     71    return $originalOption;
     72  }
     73
    7974  $option['exposify_api_key']        = sanitize_text_field($option['exposify_api_key']);
    8075  $option['exposify_site_title']     = sanitize_text_field($option['exposify_site_title']);
    8176  $option['exposify_site_slug']      = sanitize_text_field($option['exposify_site_slug']);
     77  $option['exposify_custom_types']   = exposify_decode_custom_types($option['exposify_custom_types']);
    8278  $option['exposify_theme_template'] = sanitize_text_field($option['exposify_theme_template']);
    8379
     
    8682
    8783/**
    88  * Display the field.
     84 * Validate the given JSON input.
    8985 *
     86 * @param  string  $data
    9087 * @return void
    9188 */
    92 function exposify_api_key_render()
     89function exposify_json_is_valid($data)
    9390{
    94   $options = get_option('exposify_settings');
    95   ?>
    96   <input class="regular-text" type="text" name="exposify_settings[exposify_api_key]" value="<?php echo $options['exposify_api_key']; ?>" placeholder="z.B. e7081hfnjhdf987341r8rq98exir8x73084rzneh">
    97   <?php
     91  @json_decode($data, true);
     92
     93  return json_last_error() === JSON_ERROR_NONE;
    9894}
    9995
    10096/**
    101  * Display the field.
     97 * Get the custom types to store in the database.
    10298 *
     99 * @param  string  $data
    103100 * @return void
    104101 */
    105 function exposify_site_title_render()
     102function exposify_decode_custom_types($data)
    106103{
    107   $options = get_option('exposify_settings');
    108   ?>
    109   <input class="regular-text" type="text" name="exposify_settings[exposify_site_title]" value="<?php echo $options['exposify_site_title']; ?>" placeholder="z.B. Immobilien">
    110   <?php
    111 }
    112 
    113 /**
    114  * Display the field.
    115  *
    116  * @return void
    117  */
    118 function exposify_site_slug_render()
    119 {
    120   $options = get_option('exposify_settings');
    121   ?>
    122   <input class="regular-text" type="text" name="exposify_settings[exposify_site_slug]" value="<?php echo $options['exposify_site_slug']; ?>" placeholder="z.B. immobilien">
    123   <?php
    124 }
    125 
    126 /**
    127  * Display the field.
    128  *
    129  * @return void
    130  */
    131 function exposify_theme_template_render()
    132 {
    133   $options = get_option('exposify_settings');
    134   ?>
    135   <select name="exposify_settings[exposify_theme_template]">
    136     <?php
    137     echo '<option value="default" ' . ($options['exposify_theme_template'] == 'default' ? 'selected' : '') . '>Default</option>';
    138     foreach(wp_get_theme()->get_page_templates() as $path => $name) {
    139       echo '<option value="' . $path . '" ' . ($options['exposify_theme_template'] == $path ? 'selected' : '') . '>' . $name . '</option>';
    140     }
    141     ?>
    142   </select>
    143   <?php
     104  return json_decode($data, true);
    144105}
    145106
     
    155116    <h2>Exposify</h2>
    156117    <?php
    157     settings_fields('exposify_settings');
    158     do_settings_sections('exposify_settings');
     118    echo_settings_form_meta_fields('exposify');
     119    echo_settings_form_sections('exposify');
    159120    submit_button();
    160121    ?>
     
    211172}
    212173
     174require(__DIR__ . '/settings_wrapper.php');
     175autoloadSettingClasses();
    213176add_action('parse_query', 'exposify_remove_pages_from_admin_interfaces');
    214177add_action('admin_menu', 'exposify_add_options_page');
  • exposify/trunk/exposify.php

    r1852091 r1871882  
    55Plugin URI: https://exposify.de
    66Description: Zeigt alle eigenen Immobilienangebote von Exposify.
    7 Version: 1.9.0
     7Version: 1.10.0
    88Author: Exposify
    99Author URI: https://exposify.de
     
    4646{
    4747  $options = get_option('exposify_settings');
    48   $slug = $options['exposify_site_slug'] ? $options['exposify_site_slug'] : 'immobilien';
    49   add_rewrite_rule('^' . $slug . '/(.+)/?$', 'index.php?page_id=' . get_option('exposify_property_page_id') . '&slug=$matches[1]', 'top');
     48  $siteSlug = $options['exposify_site_slug'] ? $options['exposify_site_slug'] : 'immobilien';
     49  add_rewrite_rule(
     50    '^' . $siteSlug . '/([\w\d]+)/?\??(.+)?$',
     51    'index.php?page_id=' . get_option('exposify_property_page_id') . '&slug=$matches[1]&$matches[2]',
     52    'top'
     53  );
    5054  add_rewrite_tag('%slug%', '([^&]+)');
     55  add_rewrite_tag('%type%', '([^&]+)');
    5156  add_rewrite_rule('^exposify-detail$', 'index.php?error=404', 'top');
    5257}
  • exposify/trunk/handler.php

    r1852091 r1871882  
    6868     *
    6969     * @param  string  $searchQuery
    70      * @return void
    71      */
    72     public function requestAllProperties($searchQuery)
    73     {
    74         $url = $this->apiUrl . '?api_token=' . $this->apiKey . '&search=' . urlencode($searchQuery);
     70     * @param  array  $types
     71     * @param  array  $marketing
     72     * @return void
     73     */
     74    public function requestAllProperties(string $searchQuery = '', array $types = [], array $marketing = [])
     75    {
     76        $url = $this->apiUrl . '?api_token=' . $this->apiKey;
     77        $url = $url . '&search=' . urlencode($searchQuery);
     78        $url = $url . '&types=' . urlencode(implode(',', $types));
     79        $url = $url . '&marketing=' . urlencode(implode(',', $marketing));
    7580        $url = $url . '&origin=' . urlencode($this->getRequestOriginUrl());
    7681
  • exposify/trunk/public.php

    r1852091 r1871882  
    11<?php
     2
     3class CustomType {
     4  /**
     5   * Construct the type.
     6   *
     7   * @param  string  $customType
     8   * @return void
     9   */
     10  public function __construct($customType)
     11  {
     12    $this->query = $customType;
     13    $this->config = get_option('exposify_settings')['exposify_custom_types'];
     14  }
     15
     16  /**
     17   * Try to retrieve the config for the type based on its slug or name.
     18   *
     19   * @return array|null
     20   */
     21  protected function getCustomTypeConfig()
     22  {
     23    foreach ($this->config as $customType) {
     24      if (isset($customType['slug']) && $customType['slug'] == $this->query) {
     25        return $customType;
     26      }
     27      if (isset($customType['title']) && $customType['title'] == $this->query) {
     28        return $customType;
     29      }
     30    }
     31    return null;
     32  }
     33
     34  /**
     35   * Return the Exposify types of this custom types. Returns null if the
     36   * type doesn't exist.
     37   *
     38   * @return array|null
     39   */
     40  public function getExposifyTypes()
     41  {
     42    if (($config = $this->getCustomTypeConfig()) && isset($config['types'])) {
     43      return $config['types'];
     44    }
     45    return [];
     46  }
     47
     48  /**
     49   * Return the Exposify marketing of this custom types. Returns null if the
     50   * type doesn't exist.
     51   *
     52   * @return array|null
     53   */
     54  public function getExposifyMarketing()
     55  {
     56    if (($config = $this->getCustomTypeConfig()) && isset($config['marketing'])) {
     57      return $config['marketing'];
     58    }
     59    return [];
     60  }
     61
     62  /**
     63   * Returns whether the type exists.
     64   *
     65   * @return bool
     66   */
     67  public function exists()
     68  {
     69    return (bool) $this->getCustomTypeConfig();
     70  }
     71}
    272
    373class ExposifyViewer {
     
    43113  public function attemptRequest()
    44114  {
    45     if (empty($this->exposify->html->getResult())) {
    46       if (get_query_var('slug')) {
    47         $this->exposify->html->requestSingleProperty(get_query_var('slug'));
    48       } else {
    49         $this->exposify->html->requestAllProperties(get_query_var('search', ''));
    50       }
    51     }
     115    if (!empty($this->exposify->html->getResult())) {
     116      return;
     117    }
     118
     119    if (get_query_var('slug')) {
     120      $this->exposify->html->requestSingleProperty(get_query_var('slug'));
     121      return;
     122    }
     123
     124    $type = new CustomType(get_query_var('type'));
     125
     126    if (!$type->exists()) {
     127      $this->exposify->html->requestAllProperties(get_query_var('search', ''));
     128      return;
     129    }
     130
     131    $this->exposify->html->requestAllProperties(
     132      get_query_var('search', ''),
     133      $type->getExposifyTypes(),
     134      $type->getExposifyMarketing()
     135    );
    52136  }
    53137
Note: See TracChangeset for help on using the changeset viewer.