Plugin Directory

Changeset 2556443


Ignore:
Timestamp:
06/30/2021 02:10:48 PM (5 years ago)
Author:
kees-brandenburg
Message:

Added: support for BOG projects

Location:
yes-co-ores-wordpress-plugin/trunk
Files:
4 added
27 edited
2 copied

Legend:

Unmodified
Added
Removed
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_3mcp.php

    r2198253 r2556443  
    5353    public function read($collectionUuid, \YogSystemLinkCredentials $credentials)
    5454    {
    55         delete_option('yog-' . $collectionUuid  . '-last-sync-read-main-collection');
     55      delete_option('yog-' . $collectionUuid  . '-last-sync-read-main-collection');
    5656
    5757      $mcp3Versions           = explode(';', YOG_MCP3_VERSIONS);
     
    111111      $entityLinks  = array('BBpr' => array(), 'BBty' => array(),
    112112                            'BBvk' => array(), 'BBvh' => array(), 'LIvk' => array(),
    113                             'BOvk' => array(), 'BOvh' => array(),
     113                            'BOpr' => array(), 'BOvk' => array(), 'BOvh' => array(),
    114114                            'NBpr' => array(), 'NBty' => array(), 'NBbn' => array(),
    115115                            'NBvk' => array(), 'NBvh' => array());
     
    133133                    }
    134134
    135           if (in_array($scenario, array('BBvk', 'BBvh', 'NBvk', 'NBvh', 'LIvk', 'BOvk', 'BOvh', 'NBpr', 'NBty', 'NBbn', 'BBpr', 'BBty')))
     135          if (in_array($scenario, array('BBvk', 'BBvh', 'NBvk', 'NBvh', 'LIvk', 'BOpr', 'BOvk', 'BOvh', 'NBpr', 'NBty', 'NBbn', 'BBpr', 'BBty')))
    136136            $entityLinks[$scenario][$uuid] = new Yog3McpProjectLink($uuid, $url, $doc->format('c'), $dlm->format('c'), $scenario);
    137137        }
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_3mcp_xml.php

    r2130919 r2556443  
    203203          return new Yog3McpXmlProjectBBty($xml, $namespace);
    204204          break;
     205        case 'BOpr':
     206          return new Yog3McpXmlProjectBOpr($xml, $namespace);
     207          break;
    205208        default:
    206209          throw new YogException(__METHOD__ . '; Unsupported scenario', YogException::GLOBAL_ERROR);
     
    516519            else
    517520                return 1;
     521    }
     522  }
     523
     524  /**
     525  * @desc Yog3McpXmlProjectBOpr
     526  * @author Kees Brandenburg - Yes-co Nederland
     527  */
     528  class Yog3McpXmlProjectBOpr extends Yog3McpXmlProjectAbstract
     529  {
     530    /**
     531    * @desc Get the address
     532    *
     533    * @param void
     534    * @return Yog3McpXmlAddress
     535    */
     536    public function getAddress()
     537    {
     538      $nodes = $this->xml->xpath('//project:General/project:Address');
     539      if ($nodes === false || count($nodes) == 0)
     540        throw new YogException(__METHOD__ . '; No address found', YogException::GLOBAL_ERROR);
     541
     542      $node = array_shift($nodes);
     543      $node->registerXPathNamespace('project', $this->ns);
     544
     545      return new Yog3McpXmlAddress($node, $this->ns);
     546    }
     547
     548    /**
     549    * @desc Check if address is set
     550    *
     551    * @param void
     552    * @return bool
     553    */
     554    public function hasAddress()
     555    {
     556      $nodes = $this->xml->xpath('//project:General/project:Address');
     557      return ($nodes !== false && count($nodes) > 0);
    518558    }
    519559  }
     
    578618      return ($nodes !== false && count($nodes) > 0);
    579619        }
     620
     621    /**
     622    * @desc Check if project has a link to a parent object (NBty or BBty)
     623    *
     624    * @param void
     625    * @return bool
     626    */
     627    public function hasParentUuid()
     628    {
     629      $nodes = $this->xml->xpath("//project:Project[project:Scenario = 'BOpr']/@uuid");
     630      return !($nodes === false || count($nodes) == 0);
     631    }
     632
     633    /**
     634    * @desc Get the parent object uuid (NBty or BBty)
     635    *
     636    * @param void
     637    * @return string
     638    */
     639    public function getParentUuid()
     640    {
     641      $nodes = $this->xml->xpath("//project:Project[project:Scenario = 'BOpr']/@uuid");
     642      if ($nodes === false || count($nodes) == 0)
     643        throw new YogException(__METHOD__ . '; No parent link found', YogException::GLOBAL_ERROR);
     644
     645      $node = array_shift($nodes);
     646      return (string) $node;
     647    }
    580648  }
    581649
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_checks.php

    r2394300 r2556443  
    5858        if (defined('TEMPLATEPATH'))
    5959        {
    60             // Single huis template check
    61             if (locate_template('single-huis.php') == '')
    62                 $warnings[] = 'Het ingestelde thema heeft op dit moment geen \'single-huis.php\' template. Er zal een alternatieve methode gebruikt worden voor het tonen van de Wonen object details.';
     60      $neededTemplates = [
     61        'single-huis.php'     => 'Wonen object details',
     62        'single-bedrijf.php'  => 'BOG object details',
     63        'single-yog-nbpr.php' => 'Nieuwbouw Project details',
     64        'single-yog-nbty.php' => 'Nieuwbouw type details',
     65        'single-yog-bbpr.php' => 'Bestaande bouw complexen',
     66        'single-yog-bbty.php' => 'Bestaande bouw complex types',
     67        'single-yog-bopr.php' => 'BOG project details'
     68      ];
    6369
    64             // Single bedrijf template check
    65             if (locate_template('single-bedrijf.php') == '')
    66                 $warnings[] = 'Het ingestelde thema heeft op dit moment geen \'single-bedrijf.php\' template. Er zal een alternatieve methode gebruikt worden voor het tonen van de BOG object details.';
     70      $missingTemplates = [];
    6771
    68             // Single NBpr template check
    69             if (locate_template('single-yog-nbpr.php') == '')
    70                 $warnings[] = 'Het ingestelde thema heeft op dit moment geen \'single-yog-nbpr.php\' template. Er zal een alternatieve methode gebruikt worden voor het tonen van de Nieuwbouw Project details.';
     72      foreach ($neededTemplates as $template => $title)
     73      {
     74        if (locate_template($template) == '')
     75          $missingTemplates[$template] = $title;
     76      }
    7177
    72             // Single NBpr template check
    73             if (locate_template('single-yog-nbty.php') == '')
    74                 $warnings[] = 'Het ingestelde thema heeft op dit moment geen \'single-yog-nbty.php\' template. Er zal een alternatieve methode gebruikt worden voor het tonen van de Nieuwbouw type details.';
    75 
    76             // Single BBpr template check
    77             if (locate_template('single-yog-bbpr.php') == '')
    78                 $warnings[] = 'Het ingestelde thema heeft op dit moment geen \'single-yog-bbpr.php\' template. Er zal een alternatieve methode gebruikt worden voor het tonen van de Bestaande bouw complexen.';
    79 
    80             // Single BBpr template check
    81             if (locate_template('single-yog-bbty.php') == '')
    82                 $warnings[] = 'Het ingestelde thema heeft op dit moment geen \'single-yog-bbty.php\' template. Er zal een alternatieve methode gebruikt worden voor het tonen van de Bestaande bouw complex types.';
     78      if (count($missingTemplates) > 0)
     79      {
     80        $warning  = 'Het ingestelde thema heeft op dit moment geen \'' . implode('\', \'', array_keys($missingTemplates)) . '\' template' . (count($missingTemplates) > 1 ? 's' : '') . '.';
     81        $warning .= 'Er zal een alternatieve methode gebruikt worden voor het tonen van de \'' . implode('\', \'', $missingTemplates) . '\'.';
     82       
     83        $warnings[] = $warning;
     84      }
    8385        }
    8486
    8587        // PHP version check
    86         if (version_compare(PHP_VERSION, '5.2.1', '>=') && !version_compare(PHP_VERSION, '5.5', '>='))
     88        if (version_compare(PHP_VERSION, '5.2.1', '>=') && !version_compare(PHP_VERSION, '7.3', '>='))
    8789            $warnings[] = 'PHP versie ' . PHP_VERSION . ' is gedetecteerd, voor deze php versie worden geen (beveiligings) updates meer uitgebracht. We raden je aan om contact op te nemen met je hosting provider om de PHP versie te laten upgraden. Er is ook geen garantie dat deze plugin blijft functioneren met deze php versie.';
    8890
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_fields_settings.php

    r2485742 r2556443  
    2525        case YOG_POST_TYPE_BOG:
    2626          return new YogBogFieldsSettings();
     27          break;
     28        case YOG_POST_TYPE_BOPR:
     29          return new YogBOprFieldsSettings();
    2730          break;
    2831        case YOG_POST_TYPE_NBPR:
     
    490493
    491494  /**
     495  * @desc YogBOprFieldsSettings
     496  * @author Kees Brandenburg - Yes-co Nederland
     497  */
     498  class YogBOprFieldsSettings extends YogFieldsSettingsAbstract
     499  {
     500    public function __construct()
     501    {
     502      $this->fieldsSettings = array(
     503        'yog-bopr_Updated'                  => array( 'title' => 'Laatste update via sync'),
     504        'yog-bopr_uuid'                     => array( 'title' => 'UUID'),
     505        'yog-bopr_scenario'                 => array( 'title' => 'Scenario'),
     506        'yog-bopr_Naam'                     => array( 'title' => 'Titel van object',
     507                                                      'width' => 450),
     508        'yog-bopr_Straat'                   => array(),
     509        'yog-bopr_Huisnummer'               => array( 'width' => 100),
     510        'yog-bopr_NummerreeksStart'         => array( 'title' => 'Nummerreeks start',
     511                                                      'width' => 50),
     512        'yog-bopr_NummerreeksEind'          => array( 'title' => 'Nummerreeks eind',
     513                                                      'width' => 50),
     514        'yog-bopr_Postcode'                 => array( 'width' => 100),
     515        'yog-nbpr_Wijk'                     => array( 'search'                  => 'exact',
     516                                                                                                            'replacementMeta' => 'yog-bopr_WijkCustom'),
     517        'yog-bopr_Buurt'                    => array( 'search'                  => 'exact',
     518                                                                                                            'replacementMeta' => 'yog-bopr_BuurtCustom'),
     519        'yog-bopr_Plaats'                   => array( 'search' => 'exact'),
     520        'yog-bopr_Gemeente'                 => array(),
     521        'yog-bopr_Provincie'                => array(),
     522        'yog-bopr_Land'                     => array(),
     523        'yog-bopr_Longitude'                => array(),
     524        'yog-bopr_Latitude'                 => array(),
     525        'yog-bopr_KoopPrijsMin'             => array( 'title' => 'Min.',
     526                                                      'type'  => 'price'),
     527        'yog-bopr_KoopPrijsMax'             => array( 'title' => 'Max.',
     528                                                      'type'  => 'price'),
     529        'yog-bopr_HuurPrijsMin'             => array( 'title' => 'Min.',
     530                                                      'type'  => 'price'),
     531        'yog-bopr_HuurPrijsMax'             => array( 'title' => 'Max.',
     532                                                      'type'  => 'price'),
     533        'yog-bopr_DatumStartBouw'           => array( 'title' => 'Datum start bouw'),
     534        'yog-bopr_DatumOplevering'          => array( 'title' => 'Datum oplevering'),
     535        'yog-bopr_DatumStartVerkoop'        => array( 'title' => 'Datum start verkoop'),
     536        'yog-bopr_GebouwNaam'               => array( 'title' => 'Gebouw naam'),
     537        'yog-bopr_AantalVerdiepingen'       => array( 'title' => 'Aantal verdiepingen')
     538      );
     539    }
     540  }
     541
     542  /**
    492543  * @desc YogNBprFieldsSettings
    493544  * @author Kees Brandenburg - Yes-co Nederland
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_object_search_manager.php

    r2177624 r2556443  
    5050    if ($this->searchExtended === false)
    5151    {
     52      add_filter('pre_get_posts',         array($this, 'limitDefaultSearchPostTypes'));
    5253      add_action('posts_where_request',     array($this, 'extendSearchWhere'));
    5354      add_action('posts_orderby_request', array($this, 'changePostSortOrder'));
    5455
    5556      $this->searchExtended = true;
     57    }
     58  }
     59
     60  public function limitDefaultSearchPostTypes($query)
     61  {
     62    if (is_search() && !empty($_REQUEST['object']) && in_array($_REQUEST['object'], yog_getAllObjectPostTypes()) && isset($query->query) && isset($query->query['s']))
     63    {
     64      $query->set('post_type',  [sanitize_text_field($_REQUEST['object'])]);
    5665    }
    5766  }
     
    117126    if (is_search())
    118127    {
    119       if (!empty($_REQUEST['object_type']) && in_array($_REQUEST['object_type'], array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY)))
     128      if (!empty($_REQUEST['object_type']) && in_array($_REQUEST['object_type'], array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_BOPR)))
    120129        $where = $this->extendSearchWhereSearchWidget($where);
    121130      else
     
    156165    global $wp;
    157166
    158     $objectType                     = empty($_REQUEST['object']) ? 'all' : sanitize_text_field($_REQUEST['object']);
    159         $objectTypeSpecified    = !empty($_REQUEST['object']);
    160     $searchTerm                     = $wp->query_vars['s'];
    161     $postTbl                            = $this->db->posts;
    162         $addressMode                    = false;
     167    $objectType   = empty($_REQUEST['object']) ? 'all' : sanitize_text_field($_REQUEST['object']);
     168    $searchTerm     = $wp->query_vars['s'];
     169    $postTbl            = $this->db->posts;
     170        $addressMode  = false;
    163171
    164172        // Use address as search term if set and search term not
     
    172180        if (empty($searchTerm) || $searchTerm == '%25' || $searchTerm == '%')
    173181    {
    174       // Only search specific post type
    175       if ($objectType != 'all')
    176         $where .= " AND " . $postTbl . ".post_type = '" . $this->escape($objectType) . "'";
    177       else if ($objectTypeSpecified === true)
    178         $where .= " AND " . $postTbl . ".post_type IN ('" . YOG_POST_TYPE_WONEN . "', '" . YOG_POST_TYPE_BOG . "', '" . YOG_POST_TYPE_NBPR . "', '" . YOG_POST_TYPE_NBTY . "', '" . YOG_POST_TYPE_BBPR . "', '" . YOG_POST_TYPE_BBTY . "')";
    179 
    180182            if (!empty($_REQUEST['collection']))
    181183            {
     
    205207    $supportedMetaFields = array();
    206208    if (in_array($objectType, array(YOG_POST_TYPE_WONEN, 'all')))
    207       $supportedMetaFields = array_merge($supportedMetaFields, array('huis_Wijk','huis_WijkCustom', 'huis_Buurt', 'huis_BuurtCustom', 'huis_Land','huis_Provincie','huis_Gemeente','huis_Plaats', 'huis_PlaatsCustom', 'huis_Straat','huis_Huisnummer','huis_Postcode','huis_SoortWoning','huis_TypeWoning','huis_KenmerkWoning'));
     209      $supportedMetaFields = array_merge($supportedMetaFields, array('huis_Wijk','huis_WijkCustom', 'huis_Buurt', 'huis_BuurtCustom', 'huis_Land','huis_Provincie','huis_Gemeente','huis_Plaats', 'huis_PlaatsCustom', 'huis_Straat','huis_Huisnummer','huis_Postcode','huis_SoortWoning','huis_TypeWoning','huis_KenmerkWoning', 'huis_tags'));
    208210    if (in_array($objectType, array(YOG_POST_TYPE_BOG, 'all')))
    209       $supportedMetaFields = array_merge($supportedMetaFields, array('bedrijf_Wijk', 'bedrijf_WijkCustom', 'bedrijf_Buurt', 'bedrijf_BuurtCustom', 'bedrijf_Land', 'bedrijf_Provincie', 'bedrijf_Gemeente', 'bedrijf_Plaats', 'bedrijf_PlaatsCustom', 'bedrijf_Straat', 'bedrijf_Huisnummer', 'bedrijf_Postcode', 'bedrijf_Type'));
     211      $supportedMetaFields = array_merge($supportedMetaFields, array('bedrijf_Wijk', 'bedrijf_WijkCustom', 'bedrijf_Buurt', 'bedrijf_BuurtCustom', 'bedrijf_Land', 'bedrijf_Provincie', 'bedrijf_Gemeente', 'bedrijf_Plaats', 'bedrijf_PlaatsCustom', 'bedrijf_Straat', 'bedrijf_Huisnummer', 'bedrijf_Postcode', 'bedrijf_Type', 'bedrijf_tags'));
    210212    if (in_array($objectType, array(YOG_POST_TYPE_NBPR, 'all')))
    211       $supportedMetaFields = array_merge($supportedMetaFields, array('yog-nbpr_Wijk', 'yog-nbpr_WijkCustom', 'yog-nbpr_Buurt', 'yog-nbpr_BuurtCustom', 'yog-nbpr_Land', 'yog-nbpr_Provincie', 'yog-nbpr_Gemeente', 'yog-nbpr_Plaats', 'yog-nbpr_PlaatsCustom', 'yog-nbpr_Straat', 'yog-nbpr_Huisnummer', 'yog-nbpr_Postcode', 'yog-nbpr_ProjectSoort'));
     213      $supportedMetaFields = array_merge($supportedMetaFields, array('yog-nbpr_Wijk', 'yog-nbpr_WijkCustom', 'yog-nbpr_Buurt', 'yog-nbpr_BuurtCustom', 'yog-nbpr_Land', 'yog-nbpr_Provincie', 'yog-nbpr_Gemeente', 'yog-nbpr_Plaats', 'yog-nbpr_PlaatsCustom', 'yog-nbpr_Straat', 'yog-nbpr_Huisnummer', 'yog-nbpr_Postcode', 'yog-nbpr_ProjectSoort', 'yog-nbpr_tags'));
    212214    if (in_array($objectType, array(YOG_POST_TYPE_BBPR, 'all')))
    213       $supportedMetaFields = array_merge($supportedMetaFields, array('yog-bbpr_Wijk', 'yog-bbpr_WijkCustom', 'yog-bbpr_Buurt', 'yog-bbpr_BuurtCustom', 'yog-bbpr_Land', 'yog-bbpr_Provincie', 'yog-bbpr_Gemeente', 'yog-bbpr_Plaats', 'yog-bbpr_PlaatsCustom', 'yog-bbpr_Postcode'));
     215      $supportedMetaFields = array_merge($supportedMetaFields, array('yog-bbpr_Wijk', 'yog-bbpr_WijkCustom', 'yog-bbpr_Buurt', 'yog-bbpr_BuurtCustom', 'yog-bbpr_Land', 'yog-bbpr_Provincie', 'yog-bbpr_Gemeente', 'yog-bbpr_Plaats', 'yog-bbpr_PlaatsCustom', 'yog-bbpr_Postcode', 'yog-bbpr_tags'));
    214216
    215217    $metaTbl              = $this->db->postmeta;
     
    221223            $whereQuery[] = "meta_key = '" . $metaField . "' AND meta_value LIKE '%" . $searchTerm . "%'";
    222224    }
     225
     226    // Extent with tags
     227    $tagsQuery = '';
    223228
    224229        $query = "SELECT DISTINCT post_id FROM " . $metaTbl . " WHERE (" . implode(') OR (', $whereQuery) . ')';
     
    245250                }
    246251            }
    247 
    248       // Only search specific post type
    249       if ($objectType != 'all')
    250         $where .= " AND " . $postTbl . ".post_type = '" . $objectType . "'";
    251       else if ($objectTypeSpecified === true)
    252         $where .= " AND " . $postTbl . ".post_type IN ('" . YOG_POST_TYPE_WONEN . "', '" . YOG_POST_TYPE_BOG . "', '" . YOG_POST_TYPE_NBPR . "', '" . YOG_POST_TYPE_NBTY . "', '" . YOG_POST_TYPE_BBPR . "', '" . YOG_POST_TYPE_BBTY . "')";
    253         }
    254     // No objects found and post type specific, so make sure query returns no posts
    255     else if ($objectTypeSpecified === true)
    256     {
    257       $where .= ' AND true = false';
    258252    }
    259253
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_plugin.php

    r2458473 r2556443  
    225225        register_taxonomy('yog_category',
    226226                          array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY,
    227                                 YOG_POST_TYPE_NBBN, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY),
     227                                YOG_POST_TYPE_NBBN, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_BOPR),
    228228                          array('hierarchical'      => true,
    229229                                'show_ui'           => true,
     
    257257                          'show_in_menu'      => 'yog_posts_menu',
    258258                            'show_in_nav_menus' => true,
     259                          'has_archive'       => true,
    259260                            'capability_type'   => 'post',
    260261                          'menu_icon'         => YOG_PLUGIN_URL . '/img/icon_yes-co.gif',
     
    281282                          'show_in_menu'      => 'yog_posts_menu',
    282283                            'show_in_nav_menus' => true,
     284                          'has_archive'       => true,
    283285                            'capability_type'   => 'post',
    284286                          'menu_icon'         => YOG_PLUGIN_URL . '/img/icon_yes-co.gif',
    285287                            'hierarchical'      => false,
    286288                            'rewrite'           => array('slug' => YOG_POST_TYPE_BOG), // Permalinks format
     289                            'supports'          => array('title','editor', 'thumbnail'),
     290                            'taxonomies'        => $taxonomies
     291                            )
     292        );
     293
     294        register_post_type(YOG_POST_TYPE_BOPR,
     295                      array('labels'    => array('name'               => 'BOG projecten',
     296                                                'singular_name'       => 'BOG project',
     297                                              'add_new'             => 'BOG project toevoegen',
     298                                              'add_new_item'        => 'Project toevoegen',
     299                                              'search_items'        => 'Projecten zoeken',
     300                                              'not_found'           => 'Geen BOG projecten gevonden',
     301                                              'not_found_in_trash'  => 'Geen BOG projecten gevonden in de prullenbak',
     302                                              'edit_item'           => 'Project bewerken',
     303                                              'view_item'           => __('View')
     304                                              ),
     305                          'public'            => true,
     306                            'show_ui'           => true, // UI in admin panel
     307                          'show_in_menu'      => 'yog_posts_menu',
     308                            'show_in_nav_menus' => true,
     309                          'has_archive'       => true,
     310                            'capability_type'   => 'post',
     311                          'menu_icon'         => YOG_PLUGIN_URL . '/img/icon_yes-co.gif',
     312                            'hierarchical'      => false,
     313                            'rewrite'           => array('slug' => 'bog-project'), // Permalinks format
    287314                            'supports'          => array('title','editor', 'thumbnail'),
    288315                            'taxonomies'        => $taxonomies
     
    756783            }
    757784            break;
     785
     786          case YOG_POST_TYPE_BOPR:
     787
     788            // Add location
     789            $suffix .= yog_retrieveDynamicMap();
     790
     791            // Add types
     792            $childs = yog_retrieveChildObjects();
     793            if (is_array($childs) && count($childs) > 0)
     794            {
     795              $suffix .= '<h2>Objecten</h2>';
     796
     797              foreach ($childs as $child)
     798              {
     799                $name   = $child->post_title;
     800                $image  = get_the_post_thumbnail($child->ID, 'thumbnail', array('alt' => $name, 'title' => $name));
     801                $url    = get_permalink($child->ID);
     802
     803                $suffix .= '<div class="yog-post-child">';
     804                if (!empty($image))
     805                  $suffix .= '<a href="' . esc_url($url) . '" title="' . esc_attr($name) . '">' . $image . '</a> ';
     806
     807                  $suffix .= '<a href="' . esc_url($url) . '" title="' . esc_attr($name) . '">' . esc_html($name) . '</a>';
     808                $suffix .= '</div>';
     809              }
     810            }
     811
     812            break;
    758813        }
    759814      }
     
    800855          if (!in_array(YOG_POST_TYPE_BOG, $postTypes))
    801856            $postTypes[] = YOG_POST_TYPE_BOG;
     857
     858          if (!in_array(YOG_POST_TYPE_BOPR, $postTypes))
     859            $postTypes[] = YOG_POST_TYPE_BOPR;
    802860
    803861          if (!in_array(YOG_POST_TYPE_NBPR, $postTypes))
     
    9611019    public function handleObjectsShortcode($attr)
    9621020    {
     1021      $output = '';
    9631022      // Determine provided params
    964       $type           = !empty($attr['type']) ? explode(',', $attr['type']) : array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY);
     1023      $type           = !empty($attr['type']) ? explode(',', $attr['type']) : array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_BOPR, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY);
     1024      $showPagination = (!empty($attr['pagination']));
     1025      $currentPage    = (int) get_query_var('page', 1);
    9651026
    9661027      // Determine query attributes
     
    9681029        'post_type'       => $type,
    9691030        'posts_per_page'  => (!empty($attr['num']) ? (int) $attr['num'] : 5000),
    970         'nopaging'        => (!empty($attr['num']) ? true : false)
     1031        'nopaging'        => (!empty($attr['num']) ? false : true),
     1032        'paged'           => $currentPage
    9711033      );
    9721034
     
    10021064
    10031065      // Retrieve posts
    1004       $posts  = new WP_Query($query);
    1005 
    1006       if ($posts->have_posts())
     1066      $wpQuery  = new WP_Query($query);
     1067
     1068      if ($wpQuery->have_posts())
    10071069      {
    1008         while ($posts->have_posts())
     1070        while ($wpQuery->have_posts())
    10091071        {
    1010           $posts->the_post();
     1072          $wpQuery->the_post();
    10111073
    10121074          // Use template to show object
     
    10331095          }
    10341096        }
     1097      }
     1098
     1099      if ($showPagination === true && $wpQuery->max_num_pages > 1)
     1100      {
     1101        $paginationType     = !empty($attr['pagination']) ? $attr['pagination'] : '';
     1102        $paginationClass    = !empty($attr['pagination_class']) ? ' ' . esc_attr($attr['pagination_class']) . '' : '';
     1103        $paginationUlClass  = !empty($attr['pagination_ul_class']) ? ' class="' . esc_attr($attr['pagination_ul_class']) . '"' : '';
     1104        $supportedPrevNext  = ['glyphicon', 'fa', 'text'];
     1105        $paginationPrevNext = (!empty($attr['pagination_prev_next']) && in_array($attr['pagination_prev_next'], $supportedPrevNext)) ? $attr['pagination_prev_next'] : '';
     1106
     1107        // Determine link options
     1108        $linkOptions        = ['type' => 'array', 'prev_next' => (!empty($paginationPrevNext)), 'total' => $wpQuery->max_num_pages, 'current' => $currentPage];
     1109
     1110        // Add prev / next text to link options
     1111        switch ($paginationPrevNext)
     1112        {
     1113          case 'glyphicon':
     1114            $linkOptions['prev_text'] = '<span aria-hidden="true" class="glyphicon glyphicon-triangle-left"></span>';
     1115            $linkOptions['next_text'] = '<span aria-hidden="true" class="glyphicon glyphicon-triangle-right"></span>';
     1116            break;
     1117          case 'fa':
     1118            $linkOptions['prev_text'] = '<i class="fas fa-caret-left"></i>';
     1119            $linkOptions['next_text'] = '<i class="fas fa-caret-right"></i>';
     1120            break;
     1121        }
     1122
     1123        // Generate links
     1124        $pageLinks          = paginate_links($linkOptions);
     1125
     1126        // Generate navigation output
     1127        $output .= '<nav class="yog-objects-shortcode-navigation' . $paginationClass . '">';
     1128
     1129        switch ($paginationType)
     1130        {
     1131          case 'ul':
     1132            $output .= '<ul' . $paginationUlClass . '><li>' . implode('</li><li>', $pageLinks) . '</li></ul>';
     1133            break;
     1134          default:
     1135            $output .= implode('', $pageLinks);
     1136            break;
     1137        }
     1138
     1139        $output .= '</nav>';
    10351140      }
    10361141
     
    12281333    {
    12291334      $objects = get_posts(array( 'numberposts' => 5,
    1230                                   'post_type'   => array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY),
     1335                                  'post_type'   => array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_BOPR),
    12311336                                  'orderby'     => 'modified'));
    12321337
     
    13211426      add_options_page('Yes-co ORES Synchronisatie', 'Synchronisatie', 'manage_options', 'yesco_OG_synchronisation', array($this, 'renderSynchronisationPage'));
    13221427      add_options_page('Yes-co ORES HTML', 'HTML', 'manage_options', 'yesco_OG_html', array($this, 'renderHtmlPage'));
    1323       add_options_page('Yes-co ORES Wijken / buurten', 'Wijken / buurten', 'manage_options', 'yesco_OG_areas', array($this, 'renderAreasPage'));
    1324       add_options_page('Yes-co ORES Response formulieren', 'Response formulieren', 'manage_options', 'yesco_OG_responseforms', array($this, 'renderResponseFormsPage'));
    1325       add_options_page('Yes-co ORES MijnHuiszaken', 'MijnHuiszaken', 'manage_options', 'yesco_OG_mijnhuiszaken', array($this, 'renderMijnHuiszakenPage'));
     1428      add_options_page('Yes-co ORES Wijken / buurten', 'Wijken / buurten', 'manage_options', 'yesco_OG_areas', array($this, 'renderAreasPage'));
     1429      add_options_page('Yes-co ORES Response formulieren', 'Response formulieren', 'manage_options', 'yesco_OG_responseforms', array($this, 'renderResponseFormsPage'));
     1430      add_options_page('Yes-co ORES MijnHuiszaken', 'MijnHuiszaken', 'manage_options', 'yesco_OG_mijnhuiszaken', array($this, 'renderMijnHuiszakenPage'));
    13261431      add_options_page('Yes-co ORES Google Maps', 'Google Maps', 'manage_options', 'yesco_OG_googlemaps', array($this, 'renderGoogleMapsPage'));
    13271432      add_options_page('Map shortcode generator', 'Map shortcode generator', 'manage_options', 'yesco_OG_shortcode_map', array($this, 'renderShortcodeMapPage'));
    13281433      add_options_page('Objecten shortcode generator', 'Objecten shortcode generator', 'manage_options', 'yesco_OG_shortcode_objects', array($this, 'renderShortcodeObjectsPage'));
    1329       add_options_page('Yes-co ORES Geavanceerd', 'Geavanceerd', 'manage_options', 'yesco_OG_advanced', array($this, 'renderAdvancedPage'));
    1330 
    1331             remove_submenu_page('options-general.php', 'yesco_OG_synchronisation');
     1434      add_options_page('Yes-co ORES Geavanceerd', 'Geavanceerd', 'manage_options', 'yesco_OG_advanced', array($this, 'renderAdvancedPage'));
     1435      add_options_page('Yes-co ORES Rest API', 'Rest API', 'manage_options', 'yesco_OG_api', array($this, 'renderApiSettingsPage'));
     1436
     1437        remove_submenu_page('options-general.php', 'yesco_OG_synchronisation');
    13321438            remove_submenu_page('options-general.php', 'yesco_OG_areas');
    13331439            remove_submenu_page('options-general.php', 'yesco_OG_html');
     
    13381444      remove_submenu_page('options-general.php', 'yesco_OG_shortcode_objects');
    13391445            remove_submenu_page('options-general.php', 'yesco_OG_advanced');
     1446      remove_submenu_page('options-general.php', 'yesco_OG_api');
    13401447    }
    13411448
     
    14301537            $systemObjectCounts = array();
    14311538
    1432             // Retrieve number of objects per system
    1433             foreach ($systemLinks as $systemLink)
     1539            // Retrieve number of objects per system (not if a lot of systems are linked)
     1540            if (!empty($systemLinks) && count($systemLinks) < 10)
    14341541            {
     1542              foreach ($systemLinks as $systemLink)
     1543              {
    14351544                if ($systemLink->getState() === YogSystemLink::STATE_ACTIVE)
    14361545                {
    1437                     $metaKeys = array();
    1438                     foreach (yog_getAllObjectPostTypes() as $postType)
    1439                     {
    1440                         $metaKeys[] = $postType . '_' . $systemLink->getCollectionUuid() . '_uuid';
    1441                     }
    1442 
    1443                     $sql  = 'SELECT COUNT(ID) AS count FROM ' . $wpdb->posts;
    1444                     $sql .= ' WHERE post_type IN (\'' . implode('\',\'', yog_getAllObjectPostTypes()) . '\')';
    1445                     $sql .= ' AND EXISTS (';
    1446                     $sql .= 'SELECT true FROM ' . $wpdb->postmeta;
    1447                     $sql .= ' WHERE ' . $wpdb->postmeta . '.post_id=' . $wpdb->posts . '.ID';
    1448                     $sql .= ' AND meta_key IN (\'' . implode('\',\'', $metaKeys) . '\')';
    1449                     $sql .= ')';
    1450 
    1451                     $results  = $wpdb->get_results($sql);
    1452 
    1453                     $systemObjectCounts[$systemLink->getCollectionUuid()] = (int) $results[0]->count;
     1546                  $metaKeys = array();
     1547                  foreach (yog_getAllObjectPostTypes() as $postType)
     1548                  {
     1549                      $metaKeys[] = $postType . '_' . $systemLink->getCollectionUuid() . '_uuid';
     1550                  }
     1551
     1552                  $sql  = 'SELECT COUNT(ID) AS count FROM ' . $wpdb->posts;
     1553                  $sql .= ' WHERE post_type IN (\'' . implode('\',\'', yog_getAllObjectPostTypes()) . '\')';
     1554                  $sql .= ' AND EXISTS (';
     1555                  $sql .= 'SELECT true FROM ' . $wpdb->postmeta;
     1556                  $sql .= ' WHERE ' . $wpdb->postmeta . '.post_id=' . $wpdb->posts . '.ID';
     1557                  $sql .= ' AND meta_key IN (\'' . implode('\',\'', $metaKeys) . '\')';
     1558                  $sql .= ')';
     1559
     1560                  $results  = $wpdb->get_results($sql);
     1561
     1562                  $systemObjectCounts[$systemLink->getCollectionUuid()] = (int) $results[0]->count;
    14541563                }
     1564              }
    14551565            }
    14561566
     
    15711681      wp_enqueue_script('yog-admin-objects-shortcode-js',   YOG_PLUGIN_URL .'/inc/js/admin_objects_shortcode' . $minifyExtension . '.js', array('jquery'), YOG_PLUGIN_VERSION);
    15721682
    1573       $postTypes      = array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY);
     1683      $postTypes      = array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_BOPR);
    15741684      $sortOptions    = array('date_asc' => 'datum oplopend', '' => 'datum aflopend',
    15751685                              'title_asc' => 'titel oplopend', 'title_desc' => 'titel aflopend',
     
    17501860
    17511861            $sql  = 'SELECT DISTINCT ';
    1752             $sql .= ' (SELECT UPPER(meta_value) FROM ' . $wpdb->postmeta . ' WHERE post_id=' . $wpdb->posts . '.ID AND meta_key IN (\'' . YOG_POST_TYPE_WONEN . '_Plaats\',\'' . YOG_POST_TYPE_BOG . '_Plaats\',\'' . YOG_POST_TYPE_NBPR . '_Plaats\',\'' . YOG_POST_TYPE_BBPR . '_Plaats\')) AS city, ';
    1753             $sql .= ' (SELECT meta_value FROM ' . $wpdb->postmeta . ' WHERE post_id=' . $wpdb->posts . '.ID AND meta_key IN (\'' . YOG_POST_TYPE_WONEN . '_Wijk\',\'' . YOG_POST_TYPE_BOG . '_Wijk\',\'' . YOG_POST_TYPE_NBPR . '_Wijk\',\'' . YOG_POST_TYPE_BBPR . '_Wijk\')) AS area, ';
    1754             $sql .= ' (SELECT meta_value FROM ' . $wpdb->postmeta . ' WHERE post_id=' . $wpdb->posts . '.ID AND meta_key IN (\'' . YOG_POST_TYPE_WONEN . '_Buurt\',\'' . YOG_POST_TYPE_BOG . '_Buurt\',\'' . YOG_POST_TYPE_NBPR . '_Buurt\',\'' . YOG_POST_TYPE_BBPR . '_Buurt\')) AS neighbourhood ';
     1862            $sql .= ' (SELECT UPPER(meta_value) FROM ' . $wpdb->postmeta . ' WHERE post_id=' . $wpdb->posts . '.ID AND meta_key IN (\'' . YOG_POST_TYPE_WONEN . '_Plaats\',\'' . YOG_POST_TYPE_BOG . '_Plaats\',\'' . YOG_POST_TYPE_NBPR . '_Plaats\',\'' . YOG_POST_TYPE_BBPR . '_Plaats\',\'' . YOG_POST_TYPE_BOPR . '_Plaats\')) AS city, ';
     1863            $sql .= ' (SELECT meta_value FROM ' . $wpdb->postmeta . ' WHERE post_id=' . $wpdb->posts . '.ID AND meta_key IN (\'' . YOG_POST_TYPE_WONEN . '_Wijk\',\'' . YOG_POST_TYPE_BOG . '_Wijk\',\'' . YOG_POST_TYPE_NBPR . '_Wijk\',\'' . YOG_POST_TYPE_BBPR . '_Wijk\',\'' . YOG_POST_TYPE_BOPR . '_Wijk\')) AS area, ';
     1864            $sql .= ' (SELECT meta_value FROM ' . $wpdb->postmeta . ' WHERE post_id=' . $wpdb->posts . '.ID AND meta_key IN (\'' . YOG_POST_TYPE_WONEN . '_Buurt\',\'' . YOG_POST_TYPE_BOG . '_Buurt\',\'' . YOG_POST_TYPE_NBPR . '_Buurt\',\'' . YOG_POST_TYPE_BBPR . '_Buurt\',\'' . YOG_POST_TYPE_BOPR . '_Buurt\')) AS neighbourhood ';
    17551865            $sql .= ' FROM ' . $wpdb->posts;
    1756             $sql .= ' WHERE post_type IN (\'' . YOG_POST_TYPE_WONEN . '\',\'' . YOG_POST_TYPE_BOG . '\',\'' . YOG_POST_TYPE_NBPR . '\',\'' . YOG_POST_TYPE_BBPR . '\') AND post_status = \'publish\'';
     1866            $sql .= ' WHERE post_type IN (\'' . YOG_POST_TYPE_WONEN . '\',\'' . YOG_POST_TYPE_BOG . '\',\'' . YOG_POST_TYPE_NBPR . '\',\'' . YOG_POST_TYPE_BBPR . '\',\'' . YOG_POST_TYPE_BOPR . '\') AND post_status = \'publish\'';
    17571867
    17581868            $results        = $wpdb->get_results($sql);
     
    18771987      // Render html
    18781988      include(YOG_PLUGIN_DIR . '/includes/pages/advanced.php');
     1989        }
     1990
     1991        /**
     1992         * Render API settings page
     1993         */
     1994        public function renderAPISettingsPage()
     1995        {
     1996      require_once(__DIR__ . '/yog_rest_api_key.php');
     1997      require_once(__DIR__ . '/yog_rest_api_key_manager.php');
     1998     
     1999      $apiKeyManager  = new YogRestApiKeyManager();
     2000      $errors         = [];
     2001
     2002            // Handle post
     2003            if (!empty($_POST) && isset($_POST['mode']) && in_array($_POST['mode'], ['create', 'delete']))
     2004            {
     2005        try
     2006        {
     2007          // Check if current user has enough rights to edit plugin settings (should already be done by wordpress, but just to be sure)
     2008          if (!current_user_can('manage_options'))
     2009            throw new \InvalidArgumentException('Je hebt niet de juiste rechten om deze pagina te mogen zien');
     2010
     2011          // Determine nonce name (based on mode / key)
     2012          $mode         = sanitize_text_field($_POST['mode']);
     2013          $key          = (empty($_POST['key']) ? null : sanitize_text_field($_POST['key']));
     2014          $nonceName    = '_wpnonce-api-' . $mode . (empty($key) ? '' : '-' . $key);
     2015          $nonceAction  = 'yog-api-' . $mode . (empty($key) ? '' : '-' . $key);
     2016
     2017          // Check nonce
     2018          if (empty($_POST[$nonceName]) || !wp_verify_nonce($_POST[$nonceName], $nonceAction))
     2019            throw new \InvalidArgumentException('Je hebt de pagina te lang open staan, herlaad de pagina en probeer opnieuw.');
     2020
     2021          switch ($mode)
     2022          {
     2023            // Handle creattion of API key
     2024            case 'create':
     2025
     2026              if (!empty($_POST['name']))
     2027              {
     2028                // Create new API key
     2029                $apiKey = new YogRestApiKey(wp_generate_uuid4(), sanitize_text_field($_POST['name']));
     2030
     2031                // Store the API key
     2032                $apiKeyManager->store($apiKey);
     2033              }
     2034
     2035              break;
     2036
     2037            // Handle deltion of API key
     2038            case 'delete':
     2039
     2040              if (!empty($key))
     2041              {
     2042                // Retrieve API key
     2043                $apiKey = $apiKeyManager->retrieveByKey($key);
     2044
     2045                // Delete API key
     2046                $apiKeyManager->delete($apiKey);
     2047              }
     2048
     2049              break;
     2050          }
     2051        }
     2052        catch (\InvalidArgumentException $e)
     2053        {
     2054          $errors[] = $e->getMessage();
     2055        }
     2056        catch (\Exception $e)
     2057        {
     2058          $errors[] = 'Er is een fout opgetreden';
     2059        }
     2060            }
     2061
     2062      // Retrieve all API keys
     2063      $apiKeys  = $apiKeyManager->retrieveAll();
     2064
     2065      // Render html
     2066      include(YOG_PLUGIN_DIR . '/includes/pages/api.php');
    18792067        }
    18802068
     
    22532441        // Retrieve existing YOG posts
    22542442        $posts = get_posts(array(
    2255                                                         'post_type'             => array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY),
     2443                                                        'post_type'             => array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_BOPR),
    22562444                                                        'post_status'           => 'any',
    22572445                                                        'posts_per_page'    => -1
     
    22802468            case YOG_POST_TYPE_BBPR:
    22812469            case YOG_POST_TYPE_BBTY:
     2470            case YOG_POST_TYPE_BOPR:
    22822471              $priceMetaKeys = array($postType . '_KoopPrijsMin', $postType . '_HuurPrijsMin', $postType . '_KoopPrijsMax', $postType . '_HuurPrijsMax');
    22832472              break;
     
    23112500        // Retrieve existing YOG posts
    23122501        $posts = get_posts(array(
    2313                                                         'post_type'             => array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY),
     2502                                                        'post_type'             => array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_BOPR),
    23142503                                                        'post_status'           => 'any',
    23152504                                                        'posts_per_page'    => -1
     
    23302519            case YOG_POST_TYPE_WONEN:
    23312520            case YOG_POST_TYPE_BOG:
     2521            case YOG_POST_TYPE_BOPR:
    23322522              $metaKeys = array($postType . '_Plaats', $postType . '_Straat', $postType . '_Huisnummer');
    23332523              break;
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_bbpr_translation.php

    r2130272 r2556443  
    8989            if (!empty($textData))
    9090                $data = array_merge($data, $textData);
     91
     92      // Also add generic meta data
     93      $genericMetaData = $this->getGenericMetaData();
     94      if (!empty($genericMetaData))
     95        $data = array_merge($data, $genericMetaData);
    9196
    9297      return $data;
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_bbty_translation.php

    r2130272 r2556443  
    166166                $data = array_merge($data, $textData);
    167167
     168      // Also add generic meta data
     169      $genericMetaData = $this->getGenericMetaData();
     170      if (!empty($genericMetaData))
     171        $data = array_merge($data, $genericMetaData);
     172
    168173      return $data;
    169174    }
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_bog_translation.php

    r2485742 r2556443  
    4747    {
    4848      // General meta data
    49       $data = $this->getGeneralMetaData();
     49      $data = array_merge($this->getGenericMetaData(), $this->getGeneralMetaData());
    5050      $type = ($this->mcp3Project->hasSubType()) ? $this->mcp3Project->getSubType() : $this->mcp3Project->getType();
    5151
     
    284284
    285285      return $categories;
     286    }
     287
     288    /**
     289    * @desc Check if a parent uuid is set
     290    *
     291    * @param void
     292    * @return bool
     293    */
     294    public function hasParentUuid()
     295    {
     296      return $this->mcp3Project->hasParentUuid();
     297    }
     298
     299    /**
     300    * @desc Get the parent uuid
     301    *
     302    * @param void
     303    * @return string
     304    * @throws Exception
     305    */
     306    public function getParentUuid()
     307    {
     308      if (!$this->hasParentUuid())
     309        throw new Exception(__METHOD__ . '; Object does not have a parent object');
     310
     311      return $this->mcp3Project->getParentUuid();
    286312    }
    287313
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_bopr_translation.php

    r2485738 r2556443  
    11<?php
    22  /**
    3   * @desc YogProjectNBprTranslation
     3  * @desc YogProjectBOprTranslation
    44  * @author Kees Brandenburg - Yes-co Nederland
    55  */
    6   class YogProjectNBprTranslation extends YogProjectTranslationAbstract
     6  class YogProjectBOprTranslation extends YogProjectTranslationAbstract
    77  {
    88    /**
     
    1414    public function getPostType()
    1515    {
    16       return YOG_POST_TYPE_NBPR;
     16      return YOG_POST_TYPE_BOPR;
    1717    }
    1818
     
    4949        'Status'                      => $this->determineState(),
    5050        'Naam'                        => $this->mcp3Project->getStringByPath('//project:General/project:Name'),
    51         'Land'                        => $this->mcp3Project->getStringByPath('//project:General/project:Location/project:Country'),
    52         'Provincie'                   => $this->mcp3Project->getStringByPath('//project:General/project:Location/project:State'),
    53         'Gemeente'                    => $this->mcp3Project->getStringByPath('//project:General/project:Location/project:Municipality'),
    54         'Plaats'                      => $this->mcp3Project->getStringByPath('//project:General/project:Location/project:City'),
    55         'Wijk'                        => $this->mcp3Project->getStringByPath('//project:General/project:Location/project:Area'),
    56         'Buurt'                       => $this->mcp3Project->getStringByPath('//project:General/project:Location/project:Neighbourhood'),
    57         'Straat'                      => $this->mcp3Project->getStringByPath('//project:General/project:Location/project:Street'),
    58         'Postcode'                    => $this->mcp3Project->getStringByPath('//project:General/project:Location/project:Zipcode'),
     51        'BouwType'                    => $this->mcp3Project->getStringByPath('//project:General/project:BouwType'),
     52        'Land'                        => $this->mcp3Project->getStringByPath('//project:General/project:Address/project:Country'),
     53        'Provincie'                   => $this->mcp3Project->getStringByPath('//project:General/project:Address/project:State'),
     54        'Gemeente'                    => $this->mcp3Project->getStringByPath('//project:General/project:Address/project:Municipality'),
     55        'Plaats'                      => $this->mcp3Project->getStringByPath('//project:General/project:Address/project:City'),
     56        'Wijk'                        => $this->mcp3Project->getStringByPath('//project:General/project:Address/project:Area'),
     57        'Buurt'                       => $this->mcp3Project->getStringByPath('//project:General/project:Address/project:Neighbourhood'),
     58        'Straat'                      => $this->mcp3Project->getStringByPath('//project:General/project:Address/project:Street'),
     59        'Postcode'                    => $this->mcp3Project->getStringByPath('//project:General/project:Address/project:Zipcode'),
    5960        'Longitude'                   => $this->mcp3Project->getStringByPath('//project:General/project:GeoCode/project:Longitude'),
    6061        'Latitude'                    => $this->mcp3Project->getStringByPath('//project:General/project:GeoCode/project:Latitude'),
    61         'KoopAanneemSomMin'           => $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:KoopAanneemSom/project:Min'),
    62         'KoopAanneemSomMax'           => $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:KoopAanneemSom/project:Max'),
     62        'NummerreeksStart'            => $this->mcp3Project->getStringByPath('//project:General/project:Nummerreeks/project:Start'),
     63        'NummerreeksEind'             => $this->mcp3Project->getStringByPath('//project:General/project:Nummerreeks/project:End'),
     64        'KoopPrijsMin'                => $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:Prijs/project:Min'),
     65        'KoopPrijsMax'                => $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:Prijs/project:Max'),
    6366        'HuurPrijsMin'                => $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Min'),
    6467        'HuurPrijsMax'                => $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Max'),
    65         'HuurPrijsConditie'           => $this->translatePriceCondition($this->mcp3Project->getStringByPath('//project:Details/project:Huur/project:PrijsConditie')),
    66         'PerceelOppervlakteMin'       => $this->mcp3Project->getIntByPath('//project:Details/project:PerceelOppervlakte/project:Min'),
    67         'PerceelOppervlakteMax'       => $this->mcp3Project->getIntByPath('//project:Details/project:PerceelOppervlakte/project:Max'),
    68         'WoonOppervlakteMin'          => $this->mcp3Project->getIntByPath('//project:Details/project:Woonruimte/project:WoonOppervlakte/project:Min'),
    69         'WoonOppervlakteMax'          => $this->mcp3Project->getIntByPath('//project:Details/project:Woonruimte/project:WoonOppervlakte/project:Max'),
    70         'InhoudMin'                   => $this->mcp3Project->getIntByPath('//project:Details/project:Woonruimte/project:Inhoud/project:Min'),
    71         'InhoudMax'                   => $this->mcp3Project->getIntByPath('//project:Details/project:Woonruimte/project:Inhoud/project:Max'),
    72         'Fase'                        => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:Fase'),
    73         'Status'                      => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:Status'),
    74         'ProjectSoort'                => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:Projectsoort'),
    75         'AantalEenheden'              => $this->mcp3Project->getIntByPath('//project:Details/project:Ontwikkeling/project:AantalEenheden'),
    76         'StartBouw'                   => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:StartBouw'),
    7768        'DatumStartBouw'              => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:DatumStartBouw'),
    78         'Oplevering'                  => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:Oplevering'),
    7969        'DatumOplevering'             => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:DatumOplevering'),
    80                 'DatumStartVerkoop'           => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:DatumStartVerkoop')
     70                'DatumStartVerkoop'           => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:DatumStartVerkoop'),
     71        'GebouwNaam'                  => $this->mcp3Project->getStringByPath('//project:Gebouw/project:Naam'),
     72        'AantalVerdiepingen'          => $this->mcp3Project->getIntByPath('//project:Gebouw/project:Verdiepingen/project:Aantal')
    8173      );
    8274
    8375            // ApiKey
    8476            if ($this->mcp3Project->hasNodeByXpath('/project:Project/@apiId'))
    85                 $data['ApiKey']           = $this->mcp3Project->getStringByPath('/project:Project/@apiId'); // 3mcp 1.6
    86             else
    87                 $data['ApiKey']           = $this->mcp3Project->getStringByPath('/project:Project/project:YProjectNumber'); // 3mcp 1.4
     77                $data['ApiKey']           = $this->mcp3Project->getStringByPath('/project:Project/@apiId');
    8878
    8979      // Housenumber
    90       if ($this->mcp3Project->hasLocation())
     80      if ($this->mcp3Project->hasAddress())
    9181      {
    92         $address                  = $this->mcp3Project->getLocation();
    93         $data['Huisnummer']       = $address->getHouseNumber() . $address->getHouseNumberAddition();
     82        $address                                        = $this->mcp3Project->getAddress();
     83                $addition                                       = $address->getHouseNumberAddition();
     84
     85        $data['Huisnummer']                 = $address->getHouseNumber() . $addition;
     86                $data['HuisnummerNumeriek'] = $address->getHouseNumber();
     87
     88                if (!empty($addition))
     89                    $data['HuisnummerToevoeging'] = $addition;
    9490      }
    9591
     
    9894            if (!empty($textData))
    9995                $data = array_merge($data, $textData);
     96
     97      // Also add generic meta data
     98      $genericMetaData = $this->getGenericMetaData();
     99      if (!empty($genericMetaData))
     100        $data = array_merge($data, $genericMetaData);
    100101
    101102      return $data;
     
    110111    public function determineSortPrice()
    111112    {
    112       $price = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:KoopAanneemSom/project:Min');
     113      $price = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:Prijs/project:Min');
    113114      if (!empty($price))
    114115        return $price;
     
    118119        return $price;
    119120
    120       $price = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:KoopAanneemSom/project:Max');
     121      $price = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:Prijs/project:Max');
    121122      if (!empty($price))
    122123        return $price;
     
    139140            $sort = '';
    140141
    141       if ($this->mcp3Project->hasLocation())
     142      if ($this->mcp3Project->hasAddress())
    142143      {
    143         $location   = $this->mcp3Project->getLocation();
    144                 $city           = $location->getCity();
    145                 $sort           = $city . ' ' . str_replace($city, '', $this->determineTitle());
     144        $address    = $this->mcp3Project->getAddress();
     145                $sort           = $address->getCity() . ' ' . $address->getStreet() . ' ' . $address->getHouseNumber() . $address->getHouseNumberAddition();
    146146      }
    147147
     
    157157    public function getCategories()
    158158    {
    159         $categories = array('nieuwbouw-projecten', 'nieuwbouw-project');
     159      $categories = ['bog-project'];
    160160
    161161      // Verkoop
    162       $min = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:KoopAanneemSom/project:Min');
    163       $max = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:KoopAanneemSom/project:Max');
    164       if (!empty($min) || !empty($max))
    165         $categories[] = 'nieuwbouw-project-verkoop';
     162      $koopMin = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:Prijs/project:Min');
     163      $koopMax = $this->mcp3Project->getIntByPath('//project:Details/project:Koop/project:Prijs/project:Max');
     164      if (!empty($koopMin) || !empty($koopMax))
     165        $categories[] = 'bog-project-verkoop';
    166166
    167167      // Verhuur
    168       $min = $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Min');
    169       $max = $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Max');
    170       if (!empty($min) || !empty($max))
    171         $categories[] = 'nieuwbouw-project-verhuur';
     168      $huurMin = $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Min');
     169      $huurMax = $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Max');
     170      if (!empty($huurMin) || !empty($huurMax))
     171        $categories[] = 'bog-project-verhuur';
    172172
    173           // State
    174       if (in_array($this->determineState(), array('verkocht', 'verhuurd', 'verkocht/verhuurd')))
    175               $categories[] = 'nieuwbouw-project-verkochtverhuurd';
    176 
    177       // Allow the theme to add custom categories
    178       $this->getThemeCategories($this->mcp3Project, $categories);
     173      // Sold?
     174      $state = strtolower($this->determineState());
     175      if (in_array($state, ['verkocht onder voorbehoud', 'verhuurd onder voorbehoud']))
     176        $categories[] = 'bog-project-verkochtverhuurd';
    179177
    180178      return $categories;
     
    189187    private function determineState()
    190188    {
    191         $state = $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:Status');
     189        $state = $this->mcp3Project->getStringByPath('//project:General/project:ObjectStatus');
     190      if (!empty($state))
     191        return ucfirst($state);
    192192
    193       return $state;
     193      return 'Beschikbaar';
    194194    }
    195195  }
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_nbbn_translation.php

    r2130272 r2556443  
    110110                $data = array_merge($data, $textData);
    111111
     112      // Also add generic meta data
     113      $genericMetaData = $this->getGenericMetaData();
     114      if (!empty($genericMetaData))
     115        $data = array_merge($data, $genericMetaData);
     116
    112117      return $data;
    113118    }
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_nbpr_translation.php

    r2130272 r2556443  
    9999                $data = array_merge($data, $textData);
    100100
     101      // Also add generic meta data
     102      $genericMetaData = $this->getGenericMetaData();
     103      if (!empty($genericMetaData))
     104        $data = array_merge($data, $genericMetaData);
     105
    101106      return $data;
    102107    }
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_nbty_translation.php

    r2130272 r2556443  
    193193            }
    194194
    195 
    196 
    197195            // Also add text meta data?
    198196            $textData   = $this->getTextMetaData();
    199197            if (!empty($textData))
    200198                $data = array_merge($data, $textData);
     199
     200      // Also add generic meta data
     201      $genericMetaData = $this->getGenericMetaData();
     202      if (!empty($genericMetaData))
     203        $data = array_merge($data, $genericMetaData);
    201204
    202205      return $data;
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_translation.php

    r2383854 r2556443  
    7979
    8080        return new YogProjectBBtyTranslation($mcp3Project, $mcp3Link);
     81      }
     82      else if ($mcp3Project instanceOf Yog3McpXmlProjectBOpr)
     83      {
     84        require_once(YOG_PLUGIN_DIR . '/includes/classes/yog_project_bopr_translation.php');
     85
     86        return new YogProjectBOprTranslation($mcp3Project, $mcp3Link);
    8187      }
    8288      else
     
    139145    {
    140146      throw new YogException(__METHOD__ . '; No parent uuid', YogException::GLOBAL_ERROR);
     147    }
     148
     149    /**
     150     * Get the generic meta data
     151     * @return array
     152     */
     153    public function getGenericMetaData()
     154    {
     155      $metaData = [];
     156      $tags     = $this->getTags();
     157
     158      if (!empty($tags))
     159        $metaData['tags'] = '|' . implode('|', $tags) . '|';
     160
     161      return $metaData;
    141162    }
    142163
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_wonen_translation.php

    r2458473 r2556443  
    8686    {
    8787      // General meta data
    88       $data = $this->getGeneralMetaData();
     88      $data = array_merge($this->getGenericMetaData(), $this->getGeneralMetaData());
    8989
    9090            // Also add text meta data?
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_synchronization_manager.php

    r2458473 r2556443  
    681681          $postType = YOG_POST_TYPE_BBTY;
    682682          break;
     683        case 'BOpr':
     684          $postType = YOG_POST_TYPE_BOPR;
     685          break;
    683686      }
    684687
     
    11691172      $metaKeyBBpr    = $this->db->_real_escape(YOG_POST_TYPE_BBPR . '_' . $collectionUuid . '_uuid');
    11701173      $metaKeyBBty    = $this->db->_real_escape(YOG_POST_TYPE_BBTY . '_' . $collectionUuid . '_uuid');
     1174      $metaKeyBOpr    = $this->db->_real_escape(YOG_POST_TYPE_BOPR . '_' . $collectionUuid . '_uuid');
    11711175
    11721176      $tableName    = $this->db->prefix .'postmeta';
    1173       $results      = $this->db->get_results("SELECT post_id, meta_key, meta_value AS uuid FROM " . $tableName . " WHERE meta_key IN ('" . $metaKeyWonen . "', '" . $metaKeyBog . "', '" . $metaKeyNBpr . "', '" . $metaKeyNBty . "', '" . $metaKeyNBbn . "', '" . $metaKeyBBpr . "', '" . $metaKeyBBty . "') ORDER BY post_id DESC");
     1177      $results      = $this->db->get_results("SELECT post_id, meta_key, meta_value AS uuid FROM " . $tableName . " WHERE meta_key IN ('" . $metaKeyWonen . "', '" . $metaKeyBog . "', '" . $metaKeyNBpr . "', '" . $metaKeyNBty . "', '" . $metaKeyNBbn . "', '" . $metaKeyBBpr . "', '" . $metaKeyBBty . "', '" . $metaKeyBOpr . "') ORDER BY post_id DESC");
    11741178      $uuids        = array();
    11751179
     
    13271331      $woonruimteId = $this->createCategory('Woonruimte',           'woonruimte',           $consumentId);
    13281332      $bogId        = $this->createCategory('Bedrijf',              'bedrijf');
     1333      $boprId       = $this->createCategory('BOG project',          'bog-project');
    13291334      $nbId         = $this->createCategory('Nieuwbouw projecten',  'nieuwbouw-projecten');
    13301335      $nbprId       = $this->createCategory('Nieuwbouw project',    'nieuwbouw-project',    $nbId);
     
    13391344        'woonruimte'            => $woonruimteId,
    13401345        'bedrijf'               => $bogId,
     1346        'bog-project'           => $boprId,
    13411347        'nieuwbouw-projecten'   => $nbprId,
    13421348        'nieuwbouw-type'        => $nbtyId,
     
    13891395                                                                                                            'verhard-buitenterrein' => 'Verhard buitenterrein',
    13901396                                                                                                            'bog-belegging'                 => 'Belegging'),
     1397                              $boprId       => array( 'bog-project-verkoop'                   => 'Verkoop',
     1398                                                      'bog-project-verhuur'                   => 'Verhuur',
     1399                                                      'bog-project-verkochtverhuurd'          => 'Verkocht/verhuurd'),
    13911400                              $nbprId       => array( 'nieuwbouw-project-verkoop'             => 'Verkoop',
    13921401                                                      'nieuwbouw-project-verhuur'             => 'Verhuur',
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_system_link_manager.php

    r2130272 r2556443  
    7575
    7676    /**
     77    * @desc Retrieve system link by collection uuid
     78    *
     79    * @param string $collectionUuid
     80    * @return YogSystemLink
     81    */
     82    public function retrieveByCollectionUuid($collectionUuid)
     83    {
     84      $systemLinks  = $this->retrieveAll();
     85      $systemLink   = null;
     86
     87            foreach ($systemLinks as $curSystemLink)
     88      {
     89        if ($curSystemLink->getCollectionUuid() === $collectionUuid)
     90                    $systemLink = $curSystemLink;
     91            }
     92
     93      if (is_null($systemLink))
     94        YogException(__METHOD__ . '; No system link found', YogException::GLOBAL_ERROR);
     95
     96      return $systemLink;
     97    }
     98
     99    /**
    77100    * @desc Retrieve all system links
    78101    *
     
    91114      foreach ($storedSystemLinks as $storedSystemLink)
    92115      {
     116        if (empty($storedSystemLink['naam']))
     117          $storedSystemLink['naam'] = 'Nader te bepalen';
     118       
    93119        $systemLinks[] = YogSystemLink::create($storedSystemLink);
    94120      }
     
    172198  class YogSystemLink
    173199  {
    174     const STATE_ACTIVE  = 'Actief';
    175     const EMPTY_NAME    = 'Nog niet bekend, wacht op synchronisatie';
    176     const EMPTY_UUID    = '-';
     200    const STATE_ACTIVE        = 'Actief';
     201    const STATE_NOT_ACTIVATED = 'Nog niet geactiveerd';
     202    const EMPTY_NAME          = 'Nog niet bekend, wacht op synchronisatie';
     203    const EMPTY_UUID          = '-';
    177204
    178205    private $name;
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_wp_admin_object_ui.php

    r2363901 r2556443  
    2828        case YOG_POST_TYPE_NBPR:
    2929          require_once(YOG_PLUGIN_DIR . '/includes/classes/yog_wp_admin_object_ui_nbpr.php');
    30           return new YogWpAdminObjectUiNbpr();
     30          return new YogWpAdminObjectUiNBpr();
    3131          break;
    3232        case YOG_POST_TYPE_NBTY:
     
    4545          require_once(YOG_PLUGIN_DIR . '/includes/classes/yog_wp_admin_object_ui_bbty.php');
    4646          return new YogWpAdminObjectUiBbty();
     47          break;
     48        case YOG_POST_TYPE_BOPR:
     49          require_once(YOG_PLUGIN_DIR . '/includes/classes/yog_wp_admin_object_ui_bopr.php');
     50          return new YogWpAdminObjectUiBOpr();
    4751          break;
    4852        case YOG_POST_TYPE_RELATION:
     
    9599      {
    96100        case 'thumbnail':
    97           $thumbnail = get_the_post_thumbnail(null, 'thumbnail');
     101          $thumbnail = get_the_post_thumbnail(null, [200, 150]);
    98102          if (!empty($thumbnail))
    99103            echo $thumbnail;
    100104          else
    101             echo '<div class="no-image" style="width:' . get_option('thumbnail_size_w', 0) . 'px;"></div>';
     105            echo '<div class="no-image" style="width: 200px;"></div>';
    102106
    103107          break;
     
    632636                                'order'           => 'ASC',
    633637                                'post_parent'     => $post->ID,
    634                                 'post_type'       => array(YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_WONEN),
     638                                'post_type'       => array(YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG),
    635639                                'post_status'     => array('publish', 'pending', 'trash', 'draft', 'auto-draft', 'future', 'private')));
    636640
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_wp_admin_object_ui_bog.php

    r2485742 r2556443  
    6262      add_meta_box('yog-gebouw-meta',         'Gebouw',               array($this, 'renderGebouwMetaBox'),          YOG_POST_TYPE_BOG, 'normal', 'low');
    6363      add_meta_box('yog-bedrijfsruimte-meta', 'Bedrijfsruimte',       array($this, 'renderBedrijfsruimteMetaBox'),  YOG_POST_TYPE_BOG, 'normal', 'low');
    64       add_meta_box('yog-kantoorruimte-meta',   'Kantoorruimte',         array($this, 'renderKantoorruimteMetaBox'),    YOG_POST_TYPE_BOG, 'normal', 'low');
     64      add_meta_box('yog-kantoorruimte-meta',   'Kantoorruimte',       array($this, 'renderKantoorruimteMetaBox'),   YOG_POST_TYPE_BOG, 'normal', 'low');
    6565      add_meta_box('yog-winkelruimte-meta',   'Winkelruimte',         array($this, 'renderWinkelruimteMetaBox'),    YOG_POST_TYPE_BOG, 'normal', 'low');
    6666      add_meta_box('yog-horeca-meta',         'Horeca',               array($this, 'renderHorecaMetaBox'),          YOG_POST_TYPE_BOG, 'normal', 'low');
     
    6969        add_meta_box('yog-documents',           'Documenten',           array($this, 'renderDocumentsMetaBox'),       YOG_POST_TYPE_BOG, 'normal', 'low');
    7070        add_meta_box('yog-links',               'Externe koppelingen',  array($this, 'renderLinksMetaBox'),           YOG_POST_TYPE_BOG, 'normal', 'low');
     71
     72      // Only show parent object container when there is a parent object
     73      if (!empty($_REQUEST['post']) && yog_hasParentObject((int) $_REQUEST['post']))
     74        add_meta_box('yog-parent-meta',       'Project',              array($this, 'renderParentMetaBox') ,       $this->getPostType(), 'side', 'high');
    7175
    7276      add_meta_box('yog-meta-sync',           'Synchronisatie',       array($this, 'renderSyncMetaBox') ,         YOG_POST_TYPE_BOG, 'side', 'low');
  • yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_wp_admin_object_ui_bopr.php

    r2485738 r2556443  
    11<?php
    22  /**
    3   * @desc YogWpAdminObjectUiNBpr
     3  * @desc YogWpAdminObjectUiBOpr
    44  * @author Kees Brandenburg - Yes-co Nederland
    55  */
    6   class YogWpAdminObjectUiNBpr extends YogWpAdminObjectUiAbstract
     6  class YogWpAdminObjectUiBOpr extends YogWpAdminObjectUiAbstract
    77  {
    88    /**
     
    1414    public function getPostType()
    1515    {
    16       return YOG_POST_TYPE_NBPR;
     16      return YOG_POST_TYPE_BOPR;
    1717    }
    1818
     
    4141          'title'         => 'Object',
    4242          'description'   => 'Omschrijving',
    43           'location'      => 'Locatie',
     43          'address'       => 'Adres',
    4444        'dlm'           => 'Laatste wijziging'
    4545        );
     
    5454    public function addMetaBoxes()
    5555    {
    56       add_meta_box('yog-childprojects-meta','Types',                array($this, 'renderChildProjectsMetaBox'), $this->getPostType(), 'normal', 'high');
     56      add_meta_box('yog-childprojects-meta','Objecten',             array($this, 'renderChildProjectsMetaBox'), $this->getPostType(), 'normal', 'high');
    5757        add_meta_box('yog-standard-meta',     'Basis gegevens',       array($this, 'renderBasicMetaBox'),         $this->getPostType(), 'normal', 'low');
    5858        add_meta_box('yog-price-meta',        'Prijs',                array($this, 'renderPriceMetaBox'),         $this->getPostType(), 'normal', 'low');
    59         add_meta_box('yog-measurements-meta', 'Maten',                array($this, 'renderMeasurementsMetaBox'),  $this->getPostType(), 'normal', 'low');
    6059      add_meta_box('yog-development-meta',  'Ontwikkeling',         array($this, 'renderDevelopmentMetaBox'),   $this->getPostType(), 'normal', 'low');
     60      add_meta_box('yog-building-meta',     'Gebouw',               array($this, 'renderBuildingMetaBox'),      $this->getPostType(), 'normal', 'low');
     61
    6162        add_meta_box('yog-movies',            'Video',                array($this, 'renderMoviesMetaBox'),        $this->getPostType(), 'normal', 'low');
    6263        add_meta_box('yog-documents',         'Documenten',           array($this, 'renderDocumentsMetaBox'),     $this->getPostType(), 'normal', 'low');
     
    7980    {
    8081        echo '<table class="form-table">';
    81         echo $this->retrieveInputs($post->ID, array('Naam', 'Postcode', 'Wijk', 'Buurt', 'Plaats', 'Gemeente', 'Provincie', 'Land', 'Status'));
     82        echo $this->retrieveInputs($post->ID, array('Naam', 'Straat', 'Huisnummer', 'NummerreeksStart', 'NummerreeksEind', 'Postcode', 'Wijk', 'Buurt', 'Plaats', 'Gemeente', 'Provincie', 'Land', 'Status'));
    8283        echo '</table>';
    8384    }
     
    9596        // Koop
    9697        echo '<tr>';
    97         echo '<th colspan="2"><b>Koopaanneemsom</b></th>';
     98        echo '<th colspan="2"><b>Koopprijs</b></th>';
    9899        echo '</tr>';
    99         echo $this->retrieveInputs($post->ID, array('KoopAanneemSomMin', 'KoopAanneemSomMax'));
     100        echo $this->retrieveInputs($post->ID, array('KoopPrijsMin', 'KoopPrijsMax'));
    100101
    101102        // Huur
     
    103104        echo '<th colspan="2"><b>Huurprijs</b></th>';
    104105        echo '</tr>';
    105         echo $this->retrieveInputs($post->ID, array('HuurPrijsMin', 'HuurPrijsMax', 'HuurPrijsConditie'));
    106 
    107         echo '</table>';
    108     }
    109 
    110     /**
    111     * @desc Render object measurements meta box
    112     *
    113     * @param object $post
    114     * @return void
    115     */
    116     public function renderMeasurementsMetaBox($post)
    117     {
    118         echo '<table class="form-table">';
    119 
    120       // Perceel oppervlakte
    121         echo '<tr>';
    122         echo '<th colspan="2"><b>Perceel oppervlakte</b></th>';
    123         echo '</tr>';
    124         echo $this->retrieveInputs($post->ID, array('PerceelOppervlakteMin', 'PerceelOppervlakteMax'));
    125 
    126       // Woon oppervlakte
    127         echo '<tr>';
    128         echo '<th colspan="2"><b>Woon oppervlakte</b></th>';
    129         echo '</tr>';
    130         echo $this->retrieveInputs($post->ID, array('WoonOppervlakteMin', 'WoonOppervlakteMax'));
    131 
    132       // Inhoud
    133         echo '<tr>';
    134         echo '<th colspan="2"><b>Inhoud</b></th>';
    135         echo '</tr>';
    136         echo $this->retrieveInputs($post->ID, array('InhoudMin', 'InhoudMax'));
     106        echo $this->retrieveInputs($post->ID, array('HuurPrijsMin', 'HuurPrijsMax'));
    137107
    138108        echo '</table>';
     
    148118    {
    149119      echo '<table class="form-table">';
    150       echo $this->retrieveInputs($post->ID, array('Fase', 'Status', 'ProjectSoort', 'AantalEenheden', 'StartBouw', 'DatumStartBouw', 'Oplevering', 'DatumOplevering'));
     120      echo $this->retrieveInputs($post->ID, array('DatumStartBouw', 'DatumOplevering', 'DatumStartVerkoop'));
    151121      echo '</table>';
    152122    }
     123
     124    /**
     125    * @desc Render building meta box
     126    *
     127    * @param object $post
     128    * @return void
     129    */
     130    public function renderBuildingMetaBox($post)
     131    {
     132      echo '<table class="form-table">';
     133      echo $this->retrieveInputs($post->ID, array('GebouwNaam', 'AantalVerdiepingen'));
     134      echo '</table>';
     135    }
     136
    153137
    154138    /**
  • yes-co-ores-wordpress-plugin/trunk/includes/config/config.php

    r2485742 r2556443  
    1818  define('YOG_POST_TYPE_BBPR',        'yog-bbpr');
    1919  define('YOG_POST_TYPE_BBTY',        'yog-bbty');
     20  define('YOG_POST_TYPE_BOPR',        'yog-bopr');
    2021  define('YOG_POST_TYPE_RELATION',    'relatie');
    2122  define('YOG_POST_TYPE_ATTACHMENT',    'attachment');
    2223
    23   define('YOG_PLUGIN_VERSION',      '1.3.74');
     24  define('YOG_PLUGIN_VERSION',      '1.3.75');
    2425  define('YOG_PLUGIN_DOJO_VERSION', '1.12.2'); // Old 1.9.3
    2526?>
  • yes-co-ores-wordpress-plugin/trunk/includes/pages/shortcode_map.php

    r2363901 r2556443  
     1<?php
     2$mapType = get_option('yog_map_type', 'google-maps');
     3?>
    14<div class="wrap">
    25  <div class="icon32 icon32-config-yog"><br /></div>
     
    47  <?php require_once(__DIR__ . '/parts/menu.php'); ?>
    58  <p>Hiermee kun je snel een shortcode voor een map genereren die je kan plaatsen in een Page of Post.</p>
    6   <p>Shortcode: <br /><b id="yogShortcode" class="bold">[yog-map]</b></p>
    7 <?php
    8   $html = '<table class="form-table"><tbody>';
     9  <?php
     10  if ($mapType !== 'google-maps')
     11  {
     12    echo '<div id="message" class="error below-h2" style="padding: 5px 10px;background-color:#feffd1;border-color:#d5d738;">';
     13      echo '<p>De Map shortcode is enkel bruikbaar als er gebruik gemaakt wordt van kaarten via Google Maps.<br />Welk soort kaarten er gebruikt worden kan je <a href="options-general.php?page=yesco_OG_googlemaps">hier</a> instellen.</p>';
     14    echo '</div>';
     15  }
     16  else
     17  {
     18    ?>
     19    <p>Shortcode: <br /><b id="yogShortcode" class="bold">[yog-map]</b></p>
     20    <?php
     21    $html = '<table class="form-table"><tbody>';
    922
    10   // Types
    11   $checkboxesHtml = '';
     23    // Types
     24    $checkboxesHtml = '';
    1225
    13   foreach ($postTypes as $postTypeTmp)
    14   {
    15     $checked        = '';
     26    foreach ($postTypes as $postTypeTmp)
     27    {
     28      $checked        = '';
    1629
    17     if (in_array($postTypeTmp, $settings['postTypes']))
    18       $checked = ' checked="checked"';
     30      if (in_array($postTypeTmp, $settings['postTypes']))
     31        $checked = ' checked="checked"';
    1932
    20     $id             = 'shortcode_PostTypes_' . $postTypeTmp;
    21     $label          = '';
     33      $id             = 'shortcode_PostTypes_' . $postTypeTmp;
     34      $label          = '';
    2235
    23     $postTypeObject = get_post_type_object($postTypeTmp);
     36      $postTypeObject = get_post_type_object($postTypeTmp);
    2437
    25     $label          = $postTypeObject->labels->singular_name;
     38      $label          = $postTypeObject->labels->singular_name;
    2639
    27     $checkboxesHtml .= '<input type="checkbox" id="' . $id . '" name="shortcode_PostTypes[]" value="' . esc_attr($postTypeTmp) . '"' . $checked . ' />&nbsp;<label for="' . $id . '">' . esc_html($label) . '</label><br />';
    28   }
     40      $checkboxesHtml .= '<input type="checkbox" id="' . $id . '" name="shortcode_PostTypes[]" value="' . esc_attr($postTypeTmp) . '"' . $checked . ' />&nbsp;<label for="' . $id . '">' . esc_html($label) . '</label><br />';
     41    }
    2942
    30   $html .= $this->renderRow('<label for="shortcode_PostTypes">Post types: </label>', $checkboxesHtml);
     43    $html .= $this->renderRow('<label for="shortcode_PostTypes">Post types: </label>', $checkboxesHtml);
    3144
    32   // Latitude
    33   $html .= $this->renderRow('<label for="shortcode_Latitude">Latitude: </label>', '<input id="shortcode_Latitude" name="shortcode_Latitude" type="text" value="' . esc_attr($settings['latitude']) . '" />');
     45    // Latitude
     46    $html .= $this->renderRow('<label for="shortcode_Latitude">Latitude: </label>', '<input id="shortcode_Latitude" name="shortcode_Latitude" type="text" value="' . esc_attr($settings['latitude']) . '" />');
    3447
    35   // Longitude
    36   $html .= $this->renderRow('<label for="shortcode_Longitude">Longitude: </label>', '<input id="shortcode_Longitude" name="shortcode_Longitude" type="text" value="' . esc_attr($settings['longitude']) . '" />');
     48    // Longitude
     49    $html .= $this->renderRow('<label for="shortcode_Longitude">Longitude: </label>', '<input id="shortcode_Longitude" name="shortcode_Longitude" type="text" value="' . esc_attr($settings['longitude']) . '" />');
    3750
    38   // Width
    39   $html .= $this->renderRow('<label for="shortcode_Width">Breedte (Geheel getal): </label>', '<input id="shortcode_Width" name="shortcode_Width" type="text" value="' . esc_attr($settings['width']) . '" />');
     51    // Width
     52    $html .= $this->renderRow('<label for="shortcode_Width">Breedte (Geheel getal): </label>', '<input id="shortcode_Width" name="shortcode_Width" type="text" value="' . esc_attr($settings['width']) . '" />');
    4053
    41   // Width Unit
    42   $selectHtml = '';
    43   $selectHtml .= '<select id="shortcode_WidthUnit" name="shortcode_WidthUnit">';
    44   $selectHtml .= '<option value="px"' . ($settings['widthUnit'] == 'px' ? ' selected="selected"' : '')  . '>px</option>';
    45   $selectHtml .= '<option value="%"' . ($settings['widthUnit'] == '%' ? ' selected="selected"' : '')  . '>%</option>';
    46   $selectHtml .= '<option value="vw"' . ($settings['widthUnit'] == 'vw' ? ' selected="selected"' : '')  . '>vw</option>';
    47   $selectHtml .= '</select>';
     54    // Width Unit
     55    $selectHtml = '';
     56    $selectHtml .= '<select id="shortcode_WidthUnit" name="shortcode_WidthUnit">';
     57    $selectHtml .= '<option value="px"' . ($settings['widthUnit'] == 'px' ? ' selected="selected"' : '')  . '>px</option>';
     58    $selectHtml .= '<option value="%"' . ($settings['widthUnit'] == '%' ? ' selected="selected"' : '')  . '>%</option>';
     59    $selectHtml .= '<option value="vw"' . ($settings['widthUnit'] == 'vw' ? ' selected="selected"' : '')  . '>vw</option>';
     60    $selectHtml .= '</select>';
    4861
    49   $html .= $this->renderRow('<label for="shortcode_WidthUnit">Breedte in ...: </label>', $selectHtml);
     62    $html .= $this->renderRow('<label for="shortcode_WidthUnit">Breedte in ...: </label>', $selectHtml);
    5063
    51   // Width
    52   $html .= $this->renderRow('<label for="shortcode_Width">Hoogte (Geheel getal): </label>', '<input id="shortcode_Height" name="shortcode_Height" type="text" value="' . esc_attr($settings['height']) . '" />');
     64    // Width
     65    $html .= $this->renderRow('<label for="shortcode_Width">Hoogte (Geheel getal): </label>', '<input id="shortcode_Height" name="shortcode_Height" type="text" value="' . esc_attr($settings['height']) . '" />');
    5366
    54   // Height Unit
    55   $selectHtml = '';
    56   $selectHtml .= '<select id="shortcode_HeightUnit" name="shortcode_HeightUnit">';
    57   $selectHtml .= '<option value="px"' . ($settings['heightUnit'] == 'px' ? ' selected="selected"' : '')  . '>px</option>';
    58   $selectHtml .= '<option value="%"' . ($settings['heightUnit'] == '%' ? ' selected="selected"' : '')  . '>%</option>';
    59   $selectHtml .= '<option value="vh"' . ($settings['heightUnit'] == 'vh' ? ' selected="selected"' : '')  . '>vh</option>';
    60   $selectHtml .= '</select>';
     67    // Height Unit
     68    $selectHtml = '';
     69    $selectHtml .= '<select id="shortcode_HeightUnit" name="shortcode_HeightUnit">';
     70    $selectHtml .= '<option value="px"' . ($settings['heightUnit'] == 'px' ? ' selected="selected"' : '')  . '>px</option>';
     71    $selectHtml .= '<option value="%"' . ($settings['heightUnit'] == '%' ? ' selected="selected"' : '')  . '>%</option>';
     72    $selectHtml .= '<option value="vh"' . ($settings['heightUnit'] == 'vh' ? ' selected="selected"' : '')  . '>vh</option>';
     73    $selectHtml .= '</select>';
    6174
    62   $html .= $this->renderRow('<label for="shortcode_HeightUnit">Hoogte in ...: </label>', $selectHtml);
     75    $html .= $this->renderRow('<label for="shortcode_HeightUnit">Hoogte in ...: </label>', $selectHtml);
    6376
    64   $html .= '</tbody></table>';
     77    $html .= '</tbody></table>';
    6578
    66   echo $html;
     79    echo $html;
    6780
    68   echo '<br /><br />';
     81    echo '<br /><br />';
    6982
    70   // @todo: Rewrite shortcode js so no dojo is needed
    71   $extraOnLoad = '
    72               require(["dojo/ready", "yog/admin/Shortcode" ], function(ready) {
     83    // @todo: Rewrite shortcode js so no dojo is needed
     84    $extraOnLoad = '
     85                require(["dojo/ready", "yog/admin/Shortcode" ], function(ready) {
    7386
    74                   ready(function() {
     87                    ready(function() {
    7588
    76                     var yogAdminShortcode = new yog.admin.Shortcode(mapDynamic, marker);
     89                      var yogAdminShortcode = new yog.admin.Shortcode(mapDynamic, marker);
    7790
    78                   });
    79               });';
     91                    });
     92                });';
    8093
    81   $settings['width']      = 800;
    82   $settings['widthUnit']  = 'px';
    83   $settings['height']     = 480;
    84   $settings['heightUnit'] = 'px';
     94    $settings['width']      = 800;
     95    $settings['widthUnit']  = 'px';
     96    $settings['height']     = 480;
     97    $settings['heightUnit'] = 'px';
    8598
    86   if (!YogPlugin::isDojoLoaded())
    87   {
    88     YogPlugin::loadDojo(false);
    89   }
     99    if (!YogPlugin::isDojoLoaded())
     100    {
     101      YogPlugin::loadDojo(false);
     102    }
    90103
    91   echo $yogMapWidget->generate($settings, $extraOnLoad, true);
    92 ?>
    93 </div>
     104    echo $yogMapWidget->generate($settings, $extraOnLoad, true);
     105  ?>
     106  </div>
     107  <?php
     108}
  • yes-co-ores-wordpress-plugin/trunk/includes/pages/synchronisation.php

    r2293421 r2556443  
    115115            </table>
    116116
    117             <h3>Gekoppelde yes-co open accounts</h3>
     117            <h3>Gekoppelde yes-co open accounts<?php echo (!empty($systemLinks) ? ' (' . count($systemLinks) . ')' : '');?></h3>
    118118            <span id="yog-add-system-link-holder">
    119119                <b>Een koppeling toevoegen:</b><br>
     
    126126                if (!empty($systemLinks))
    127127                {
     128          $numberOfSystemLinks = count($systemLinks);
     129         
    128130                    foreach ($systemLinks as $systemLink)
    129131                    {
     
    141143                                if (isset($systemObjectCounts[$systemLink->getCollectionUuid()]))
    142144                                  echo '<b>Aantal objecten:</b> <a href="' . esc_url(get_site_url()) . '?s=&object=all&amp;collection=' . esc_attr($systemLink->getCollectionUuid()) . '" target="_blank">' . esc_html($systemObjectCounts[$systemLink->getCollectionUuid()]) . '</a><br />';
     145                else if ($numberOfSystemLinks >= 10)
     146                  echo '<a href="' . esc_url(get_site_url()) . '?s=&object=all&amp;collection=' . esc_attr($systemLink->getCollectionUuid()) . '" target="_blank">Bekijk objecten</a><br />';
    143147
    144148                                echo '<a href="#TB_inline?width=600&height=250&inlineId=' . $systemLinkId . '-delete-screen" class="thickbox" title="Koppeling verwijderen">Koppeling verwijderen</a>';
  • yes-co-ores-wordpress-plugin/trunk/includes/widgets/yog_map_widget.php

    r2383796 r2556443  
    307307    if (!empty($settings['latitude']) && !empty($settings['longitude']) && !empty($settings['postTypes']))
    308308    {
     309      $yogMapType       = get_option('yog_map_type', 'google-maps');
    309310      $googleMapsApiKey = get_option('yog_google_maps_api_key');
    310311      $postTypes        = $settings['postTypes'];
    311       $mapType          = esc_attr($settings['mapType']);
     312      $googleMapsType   = esc_attr($settings['mapType']);
    312313      $latitude         = esc_attr($settings['latitude']);
    313314      $longitude        = esc_attr($settings['longitude']);
     
    320321      $initFunctionName = 'yogInitMapDynamic';
    321322
    322       if (!empty($googleMapsApiKey) && in_array($mapType, array('roadmap', 'satellite', 'hybrid', 'terrain')))
     323      if (!empty($googleMapsApiKey) && $yogMapType === 'google-maps' && in_array($googleMapsType, array('roadmap', 'satellite', 'hybrid', 'terrain')))
    323324      {
    324325        if ($adminMode === false)
     
    338339
    339340        // Create Inline script
    340         $inlineScript .= 'var mapDynamic;';
     341        $inlineScript = 'var mapDynamic;';
    341342        $inlineScript .= 'function ' . $initFunctionName . '() {';
    342343          $inlineScript .= 'var positionDynamic = { lat: ' . $latitude . ', lng: ' . $longitude . '};';
     
    344345            $inlineScript .= 'center: positionDynamic,';
    345346            $inlineScript .= 'zoom: ' . $zoomLevel . ',';
    346             $inlineScript .= 'mapTypeId: \'' . $mapType . '\',';
     347            $inlineScript .= 'mapTypeId: \'' . $googleMapsType . '\',';
    347348            // Hide POI's
    348349            $inlineScript .= 'styles: [';
  • yes-co-ores-wordpress-plugin/trunk/includes/widgets/yog_recent_objects_widget.php

    r2458473 r2556443  
    344344            if (!empty($new_instance['post_type_' . YOG_POST_TYPE_NBTY]))
    345345                $postTypes[]          = YOG_POST_TYPE_NBTY;
     346            if (!empty($new_instance['post_type_' . YOG_POST_TYPE_BOPR]))
     347                $postTypes[]          = YOG_POST_TYPE_BOPR;
    346348
    347349            // Set limit
     
    380382        $groupByCategoryOptions = empty($instance['group_by_category_options']) ? array() : $instance['group_by_category_options'];
    381383
    382     $supportedPostTypes = array(YOG_POST_TYPE_WONEN => 'Wonen', YOG_POST_TYPE_BOG => 'BOG', YOG_POST_TYPE_NBPR => 'Nieuwbouw projecten', YOG_POST_TYPE_NBTY => 'Nieuwbouw types');
     384    $supportedPostTypes = array(YOG_POST_TYPE_WONEN => 'Wonen', YOG_POST_TYPE_BOG => 'BOG', YOG_POST_TYPE_NBPR => 'Nieuwbouw projecten', YOG_POST_TYPE_NBTY => 'Nieuwbouw types', YOG_POST_TYPE_BOPR => 'BOG projecten');
    383385
    384386        echo '<div class="yog-recent-objects-widget-admin">';
  • yes-co-ores-wordpress-plugin/trunk/includes/yog_public_functions.php

    r2458473 r2556443  
    1616    $postType = get_post_type((int) $postId);
    1717
    18     return in_array($postType, array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY));
     18    return in_array($postType, array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_BOPR));
    1919  }
    2020
     
    5353    $values         = array();
    5454
    55     if (!empty($postType) && in_array($postType, array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_RELATION)))
     55    if (!empty($postType) && in_array($postType, array(YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG, YOG_POST_TYPE_BOPR, YOG_POST_TYPE_NBPR, YOG_POST_TYPE_NBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_BBPR, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_RELATION)))
    5656    {
    5757      $fieldsSettings = YogFieldsSettingsAbstract::create($postType);
     
    309309      case YOG_POST_TYPE_BBPR:
    310310      case YOG_POST_TYPE_BBTY:
     311      case YOG_POST_TYPE_BOPR:
    311312        $priceMinMaxTypes = array('KoopPrijs' => 'Koopprijs', 'HuurPrijs' => 'Huurprijs');
    312313        break;
     
    472473                              'offset'          => 0,
    473474                              'post_parent'     => (int) $postId,
    474                               'post_type'       => array(YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_WONEN),
     475                              'post_type'       => array(YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG),
    475476                              'post_status'     => array('publish')));
    476477
     
    494495                            'order'           => 'ASC',
    495496                            'post_parent'     => (int) $postId,
    496                             'post_type'       => array(YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_WONEN),
     497                            'post_type'       => array(YOG_POST_TYPE_NBTY, YOG_POST_TYPE_BBTY, YOG_POST_TYPE_NBBN, YOG_POST_TYPE_WONEN, YOG_POST_TYPE_BOG),
    497498                            'post_status'     => array('publish')));
    498499  }
     
    13391340      YOG_POST_TYPE_BBPR,
    13401341      YOG_POST_TYPE_BBTY,
     1342      YOG_POST_TYPE_BOPR,
    13411343      YOG_POST_TYPE_RELATION
    13421344    );
     
    13601362      YOG_POST_TYPE_NBBN,
    13611363      YOG_POST_TYPE_BBPR,
    1362       YOG_POST_TYPE_BBTY
     1364      YOG_POST_TYPE_BBTY,
     1365      YOG_POST_TYPE_BOPR
    13631366    );
    13641367
  • yes-co-ores-wordpress-plugin/trunk/package.json

    r2485742 r2556443  
    11{
    22    "name": "yesco-ores",
    3     "version": "1.3.74",
     3    "version": "1.3.75",
    44    "devDependencies": {
    55        "grunt": "~1.0.3",
  • yes-co-ores-wordpress-plugin/trunk/readme.txt

    r2485742 r2556443  
    33Tags: yes-co, yesco, projecten, project, projects, huizen, huis, house, onroerend goed, real estate, makelaar, realtor, broker
    44Requires at least: 3.1
    5 Tested up to: 5.6.2
    6 Stable tag: 1.3.74
     5Tested up to: 5.7.2
     6Stable tag: 1.3.75
    77
    88Directly post real estate objects from your Yes-co system to your wordpress blog with the Yes-co Open Real Estate System (Yes-co ORES) Plugin.
     
    9090
    9191== Changelog ==
     92= 1.3.75 =
     93* Added: support for BOG projects
    9294= 1.3.74 =
    9395* Added: support for BOG energy label
  • yes-co-ores-wordpress-plugin/trunk/yesco-og.php

    r2485742 r2556443  
    55  Text Domain: yes-co-ores-wordpress-plugin
    66  Description: Publiceert uw onroerend goed op uw Wordpress Blog
    7   Version: 1.3.74
     7  Version: 1.3.75
    88  Author: Yes-co
    99  Author URI: https://www.yes-co.nl
     
    2424  // Include files
    2525  require_once(YOG_PLUGIN_DIR . '/includes/config/config.php');
     26  require_once(YOG_PLUGIN_DIR . '/includes/yog_rest_api.php');
    2627
    2728  // Determine action
Note: See TracChangeset for help on using the changeset viewer.