Changeset 2556443
- Timestamp:
- 06/30/2021 02:10:48 PM (5 years ago)
- Location:
- yes-co-ores-wordpress-plugin/trunk
- Files:
-
- 4 added
- 27 edited
- 2 copied
-
includes/classes/yog_3mcp.php (modified) (3 diffs)
-
includes/classes/yog_3mcp_xml.php (modified) (3 diffs)
-
includes/classes/yog_checks.php (modified) (1 diff)
-
includes/classes/yog_fields_settings.php (modified) (2 diffs)
-
includes/classes/yog_object_search_manager.php (modified) (7 diffs)
-
includes/classes/yog_plugin.php (modified) (20 diffs)
-
includes/classes/yog_project_bbpr_translation.php (modified) (1 diff)
-
includes/classes/yog_project_bbty_translation.php (modified) (1 diff)
-
includes/classes/yog_project_bog_translation.php (modified) (2 diffs)
-
includes/classes/yog_project_bopr_translation.php (copied) (copied from yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_nbpr_translation.php) (9 diffs)
-
includes/classes/yog_project_nbbn_translation.php (modified) (1 diff)
-
includes/classes/yog_project_nbpr_translation.php (modified) (1 diff)
-
includes/classes/yog_project_nbty_translation.php (modified) (1 diff)
-
includes/classes/yog_project_translation.php (modified) (2 diffs)
-
includes/classes/yog_project_wonen_translation.php (modified) (1 diff)
-
includes/classes/yog_rest_api_key.php (added)
-
includes/classes/yog_rest_api_key_manager.php (added)
-
includes/classes/yog_synchronization_manager.php (modified) (5 diffs)
-
includes/classes/yog_system_link_manager.php (modified) (3 diffs)
-
includes/classes/yog_wp_admin_object_ui.php (modified) (4 diffs)
-
includes/classes/yog_wp_admin_object_ui_bog.php (modified) (2 diffs)
-
includes/classes/yog_wp_admin_object_ui_bopr.php (copied) (copied from yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_wp_admin_object_ui_nbpr.php) (8 diffs)
-
includes/config/config.php (modified) (1 diff)
-
includes/pages/api.php (added)
-
includes/pages/shortcode_map.php (modified) (2 diffs)
-
includes/pages/synchronisation.php (modified) (3 diffs)
-
includes/widgets/yog_map_widget.php (modified) (4 diffs)
-
includes/widgets/yog_recent_objects_widget.php (modified) (2 diffs)
-
includes/yog_public_functions.php (modified) (7 diffs)
-
includes/yog_rest_api.php (added)
-
package.json (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
yesco-og.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_3mcp.php
r2198253 r2556443 53 53 public function read($collectionUuid, \YogSystemLinkCredentials $credentials) 54 54 { 55 delete_option('yog-' . $collectionUuid . '-last-sync-read-main-collection');55 delete_option('yog-' . $collectionUuid . '-last-sync-read-main-collection'); 56 56 57 57 $mcp3Versions = explode(';', YOG_MCP3_VERSIONS); … … 111 111 $entityLinks = array('BBpr' => array(), 'BBty' => array(), 112 112 'BBvk' => array(), 'BBvh' => array(), 'LIvk' => array(), 113 'BO vk' => array(), 'BOvh' => array(),113 'BOpr' => array(), 'BOvk' => array(), 'BOvh' => array(), 114 114 'NBpr' => array(), 'NBty' => array(), 'NBbn' => array(), 115 115 'NBvk' => array(), 'NBvh' => array()); … … 133 133 } 134 134 135 if (in_array($scenario, array('BBvk', 'BBvh', 'NBvk', 'NBvh', 'LIvk', 'BO vk', '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'))) 136 136 $entityLinks[$scenario][$uuid] = new Yog3McpProjectLink($uuid, $url, $doc->format('c'), $dlm->format('c'), $scenario); 137 137 } -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_3mcp_xml.php
r2130919 r2556443 203 203 return new Yog3McpXmlProjectBBty($xml, $namespace); 204 204 break; 205 case 'BOpr': 206 return new Yog3McpXmlProjectBOpr($xml, $namespace); 207 break; 205 208 default: 206 209 throw new YogException(__METHOD__ . '; Unsupported scenario', YogException::GLOBAL_ERROR); … … 516 519 else 517 520 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); 518 558 } 519 559 } … … 578 618 return ($nodes !== false && count($nodes) > 0); 579 619 } 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 } 580 648 } 581 649 -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_checks.php
r2394300 r2556443 58 58 if (defined('TEMPLATEPATH')) 59 59 { 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 ]; 63 69 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 = []; 67 71 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 } 71 77 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 } 83 85 } 84 86 85 87 // 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', '>=')) 87 89 $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.'; 88 90 -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_fields_settings.php
r2485742 r2556443 25 25 case YOG_POST_TYPE_BOG: 26 26 return new YogBogFieldsSettings(); 27 break; 28 case YOG_POST_TYPE_BOPR: 29 return new YogBOprFieldsSettings(); 27 30 break; 28 31 case YOG_POST_TYPE_NBPR: … … 490 493 491 494 /** 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 /** 492 543 * @desc YogNBprFieldsSettings 493 544 * @author Kees Brandenburg - Yes-co Nederland -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_object_search_manager.php
r2177624 r2556443 50 50 if ($this->searchExtended === false) 51 51 { 52 add_filter('pre_get_posts', array($this, 'limitDefaultSearchPostTypes')); 52 53 add_action('posts_where_request', array($this, 'extendSearchWhere')); 53 54 add_action('posts_orderby_request', array($this, 'changePostSortOrder')); 54 55 55 56 $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'])]); 56 65 } 57 66 } … … 117 126 if (is_search()) 118 127 { 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))) 120 129 $where = $this->extendSearchWhereSearchWidget($where); 121 130 else … … 156 165 global $wp; 157 166 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; 163 171 164 172 // Use address as search term if set and search term not … … 172 180 if (empty($searchTerm) || $searchTerm == '%25' || $searchTerm == '%') 173 181 { 174 // Only search specific post type175 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 180 182 if (!empty($_REQUEST['collection'])) 181 183 { … … 205 207 $supportedMetaFields = array(); 206 208 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')); 208 210 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')); 210 212 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')); 212 214 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')); 214 216 215 217 $metaTbl = $this->db->postmeta; … … 221 223 $whereQuery[] = "meta_key = '" . $metaField . "' AND meta_value LIKE '%" . $searchTerm . "%'"; 222 224 } 225 226 // Extent with tags 227 $tagsQuery = ''; 223 228 224 229 $query = "SELECT DISTINCT post_id FROM " . $metaTbl . " WHERE (" . implode(') OR (', $whereQuery) . ')'; … … 245 250 } 246 251 } 247 248 // Only search specific post type249 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 posts255 else if ($objectTypeSpecified === true)256 {257 $where .= ' AND true = false';258 252 } 259 253 -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_plugin.php
r2458473 r2556443 225 225 register_taxonomy('yog_category', 226 226 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), 228 228 array('hierarchical' => true, 229 229 'show_ui' => true, … … 257 257 'show_in_menu' => 'yog_posts_menu', 258 258 'show_in_nav_menus' => true, 259 'has_archive' => true, 259 260 'capability_type' => 'post', 260 261 'menu_icon' => YOG_PLUGIN_URL . '/img/icon_yes-co.gif', … … 281 282 'show_in_menu' => 'yog_posts_menu', 282 283 'show_in_nav_menus' => true, 284 'has_archive' => true, 283 285 'capability_type' => 'post', 284 286 'menu_icon' => YOG_PLUGIN_URL . '/img/icon_yes-co.gif', 285 287 'hierarchical' => false, 286 288 '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 287 314 'supports' => array('title','editor', 'thumbnail'), 288 315 'taxonomies' => $taxonomies … … 756 783 } 757 784 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; 758 813 } 759 814 } … … 800 855 if (!in_array(YOG_POST_TYPE_BOG, $postTypes)) 801 856 $postTypes[] = YOG_POST_TYPE_BOG; 857 858 if (!in_array(YOG_POST_TYPE_BOPR, $postTypes)) 859 $postTypes[] = YOG_POST_TYPE_BOPR; 802 860 803 861 if (!in_array(YOG_POST_TYPE_NBPR, $postTypes)) … … 961 1019 public function handleObjectsShortcode($attr) 962 1020 { 1021 $output = ''; 963 1022 // 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); 965 1026 966 1027 // Determine query attributes … … 968 1029 'post_type' => $type, 969 1030 '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 971 1033 ); 972 1034 … … 1002 1064 1003 1065 // 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()) 1007 1069 { 1008 while ($ posts->have_posts())1070 while ($wpQuery->have_posts()) 1009 1071 { 1010 $ posts->the_post();1072 $wpQuery->the_post(); 1011 1073 1012 1074 // Use template to show object … … 1033 1095 } 1034 1096 } 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>'; 1035 1140 } 1036 1141 … … 1228 1333 { 1229 1334 $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), 1231 1336 'orderby' => 'modified')); 1232 1337 … … 1321 1426 add_options_page('Yes-co ORES Synchronisatie', 'Synchronisatie', 'manage_options', 'yesco_OG_synchronisation', array($this, 'renderSynchronisationPage')); 1322 1427 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')); 1326 1431 add_options_page('Yes-co ORES Google Maps', 'Google Maps', 'manage_options', 'yesco_OG_googlemaps', array($this, 'renderGoogleMapsPage')); 1327 1432 add_options_page('Map shortcode generator', 'Map shortcode generator', 'manage_options', 'yesco_OG_shortcode_map', array($this, 'renderShortcodeMapPage')); 1328 1433 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'); 1332 1438 remove_submenu_page('options-general.php', 'yesco_OG_areas'); 1333 1439 remove_submenu_page('options-general.php', 'yesco_OG_html'); … … 1338 1444 remove_submenu_page('options-general.php', 'yesco_OG_shortcode_objects'); 1339 1445 remove_submenu_page('options-general.php', 'yesco_OG_advanced'); 1446 remove_submenu_page('options-general.php', 'yesco_OG_api'); 1340 1447 } 1341 1448 … … 1430 1537 $systemObjectCounts = array(); 1431 1538 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) 1434 1541 { 1542 foreach ($systemLinks as $systemLink) 1543 { 1435 1544 if ($systemLink->getState() === YogSystemLink::STATE_ACTIVE) 1436 1545 { 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; 1454 1563 } 1564 } 1455 1565 } 1456 1566 … … 1571 1681 wp_enqueue_script('yog-admin-objects-shortcode-js', YOG_PLUGIN_URL .'/inc/js/admin_objects_shortcode' . $minifyExtension . '.js', array('jquery'), YOG_PLUGIN_VERSION); 1572 1682 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); 1574 1684 $sortOptions = array('date_asc' => 'datum oplopend', '' => 'datum aflopend', 1575 1685 'title_asc' => 'titel oplopend', 'title_desc' => 'titel aflopend', … … 1750 1860 1751 1861 $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 '; 1755 1865 $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\''; 1757 1867 1758 1868 $results = $wpdb->get_results($sql); … … 1877 1987 // Render html 1878 1988 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'); 1879 2067 } 1880 2068 … … 2253 2441 // Retrieve existing YOG posts 2254 2442 $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), 2256 2444 'post_status' => 'any', 2257 2445 'posts_per_page' => -1 … … 2280 2468 case YOG_POST_TYPE_BBPR: 2281 2469 case YOG_POST_TYPE_BBTY: 2470 case YOG_POST_TYPE_BOPR: 2282 2471 $priceMetaKeys = array($postType . '_KoopPrijsMin', $postType . '_HuurPrijsMin', $postType . '_KoopPrijsMax', $postType . '_HuurPrijsMax'); 2283 2472 break; … … 2311 2500 // Retrieve existing YOG posts 2312 2501 $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), 2314 2503 'post_status' => 'any', 2315 2504 'posts_per_page' => -1 … … 2330 2519 case YOG_POST_TYPE_WONEN: 2331 2520 case YOG_POST_TYPE_BOG: 2521 case YOG_POST_TYPE_BOPR: 2332 2522 $metaKeys = array($postType . '_Plaats', $postType . '_Straat', $postType . '_Huisnummer'); 2333 2523 break; -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_bbpr_translation.php
r2130272 r2556443 89 89 if (!empty($textData)) 90 90 $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); 91 96 92 97 return $data; -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_bbty_translation.php
r2130272 r2556443 166 166 $data = array_merge($data, $textData); 167 167 168 // Also add generic meta data 169 $genericMetaData = $this->getGenericMetaData(); 170 if (!empty($genericMetaData)) 171 $data = array_merge($data, $genericMetaData); 172 168 173 return $data; 169 174 } -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_bog_translation.php
r2485742 r2556443 47 47 { 48 48 // General meta data 49 $data = $this->getGeneralMetaData();49 $data = array_merge($this->getGenericMetaData(), $this->getGeneralMetaData()); 50 50 $type = ($this->mcp3Project->hasSubType()) ? $this->mcp3Project->getSubType() : $this->mcp3Project->getType(); 51 51 … … 284 284 285 285 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(); 286 312 } 287 313 -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_bopr_translation.php
r2485738 r2556443 1 1 <?php 2 2 /** 3 * @desc YogProject NBprTranslation3 * @desc YogProjectBOprTranslation 4 4 * @author Kees Brandenburg - Yes-co Nederland 5 5 */ 6 class YogProject NBprTranslation extends YogProjectTranslationAbstract6 class YogProjectBOprTranslation extends YogProjectTranslationAbstract 7 7 { 8 8 /** … … 14 14 public function getPostType() 15 15 { 16 return YOG_POST_TYPE_ NBPR;16 return YOG_POST_TYPE_BOPR; 17 17 } 18 18 … … 49 49 'Status' => $this->determineState(), 50 50 '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'), 59 60 'Longitude' => $this->mcp3Project->getStringByPath('//project:General/project:GeoCode/project:Longitude'), 60 61 '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'), 63 66 'HuurPrijsMin' => $this->mcp3Project->getIntByPath('//project:Details/project:Huur/project:Prijs/project:Min'), 64 67 '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'),77 68 'DatumStartBouw' => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:DatumStartBouw'), 78 'Oplevering' => $this->mcp3Project->getStringByPath('//project:Details/project:Ontwikkeling/project:Oplevering'),79 69 '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') 81 73 ); 82 74 83 75 // ApiKey 84 76 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'); 88 78 89 79 // Housenumber 90 if ($this->mcp3Project->has Location())80 if ($this->mcp3Project->hasAddress()) 91 81 { 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; 94 90 } 95 91 … … 98 94 if (!empty($textData)) 99 95 $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); 100 101 101 102 return $data; … … 110 111 public function determineSortPrice() 111 112 { 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'); 113 114 if (!empty($price)) 114 115 return $price; … … 118 119 return $price; 119 120 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'); 121 122 if (!empty($price)) 122 123 return $price; … … 139 140 $sort = ''; 140 141 141 if ($this->mcp3Project->has Location())142 if ($this->mcp3Project->hasAddress()) 142 143 { 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(); 146 146 } 147 147 … … 157 157 public function getCategories() 158 158 { 159 $categories = array('nieuwbouw-projecten', 'nieuwbouw-project');159 $categories = ['bog-project']; 160 160 161 161 // 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'; 166 166 167 167 // 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'; 172 172 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'; 179 177 180 178 return $categories; … … 189 187 private function determineState() 190 188 { 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); 192 192 193 return $state;193 return 'Beschikbaar'; 194 194 } 195 195 } -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_nbbn_translation.php
r2130272 r2556443 110 110 $data = array_merge($data, $textData); 111 111 112 // Also add generic meta data 113 $genericMetaData = $this->getGenericMetaData(); 114 if (!empty($genericMetaData)) 115 $data = array_merge($data, $genericMetaData); 116 112 117 return $data; 113 118 } -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_nbpr_translation.php
r2130272 r2556443 99 99 $data = array_merge($data, $textData); 100 100 101 // Also add generic meta data 102 $genericMetaData = $this->getGenericMetaData(); 103 if (!empty($genericMetaData)) 104 $data = array_merge($data, $genericMetaData); 105 101 106 return $data; 102 107 } -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_nbty_translation.php
r2130272 r2556443 193 193 } 194 194 195 196 197 195 // Also add text meta data? 198 196 $textData = $this->getTextMetaData(); 199 197 if (!empty($textData)) 200 198 $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); 201 204 202 205 return $data; -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_translation.php
r2383854 r2556443 79 79 80 80 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); 81 87 } 82 88 else … … 139 145 { 140 146 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; 141 162 } 142 163 -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_project_wonen_translation.php
r2458473 r2556443 86 86 { 87 87 // General meta data 88 $data = $this->getGeneralMetaData();88 $data = array_merge($this->getGenericMetaData(), $this->getGeneralMetaData()); 89 89 90 90 // Also add text meta data? -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_synchronization_manager.php
r2458473 r2556443 681 681 $postType = YOG_POST_TYPE_BBTY; 682 682 break; 683 case 'BOpr': 684 $postType = YOG_POST_TYPE_BOPR; 685 break; 683 686 } 684 687 … … 1169 1172 $metaKeyBBpr = $this->db->_real_escape(YOG_POST_TYPE_BBPR . '_' . $collectionUuid . '_uuid'); 1170 1173 $metaKeyBBty = $this->db->_real_escape(YOG_POST_TYPE_BBTY . '_' . $collectionUuid . '_uuid'); 1174 $metaKeyBOpr = $this->db->_real_escape(YOG_POST_TYPE_BOPR . '_' . $collectionUuid . '_uuid'); 1171 1175 1172 1176 $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"); 1174 1178 $uuids = array(); 1175 1179 … … 1327 1331 $woonruimteId = $this->createCategory('Woonruimte', 'woonruimte', $consumentId); 1328 1332 $bogId = $this->createCategory('Bedrijf', 'bedrijf'); 1333 $boprId = $this->createCategory('BOG project', 'bog-project'); 1329 1334 $nbId = $this->createCategory('Nieuwbouw projecten', 'nieuwbouw-projecten'); 1330 1335 $nbprId = $this->createCategory('Nieuwbouw project', 'nieuwbouw-project', $nbId); … … 1339 1344 'woonruimte' => $woonruimteId, 1340 1345 'bedrijf' => $bogId, 1346 'bog-project' => $boprId, 1341 1347 'nieuwbouw-projecten' => $nbprId, 1342 1348 'nieuwbouw-type' => $nbtyId, … … 1389 1395 'verhard-buitenterrein' => 'Verhard buitenterrein', 1390 1396 'bog-belegging' => 'Belegging'), 1397 $boprId => array( 'bog-project-verkoop' => 'Verkoop', 1398 'bog-project-verhuur' => 'Verhuur', 1399 'bog-project-verkochtverhuurd' => 'Verkocht/verhuurd'), 1391 1400 $nbprId => array( 'nieuwbouw-project-verkoop' => 'Verkoop', 1392 1401 'nieuwbouw-project-verhuur' => 'Verhuur', -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_system_link_manager.php
r2130272 r2556443 75 75 76 76 /** 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 /** 77 100 * @desc Retrieve all system links 78 101 * … … 91 114 foreach ($storedSystemLinks as $storedSystemLink) 92 115 { 116 if (empty($storedSystemLink['naam'])) 117 $storedSystemLink['naam'] = 'Nader te bepalen'; 118 93 119 $systemLinks[] = YogSystemLink::create($storedSystemLink); 94 120 } … … 172 198 class YogSystemLink 173 199 { 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 = '-'; 177 204 178 205 private $name; -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_wp_admin_object_ui.php
r2363901 r2556443 28 28 case YOG_POST_TYPE_NBPR: 29 29 require_once(YOG_PLUGIN_DIR . '/includes/classes/yog_wp_admin_object_ui_nbpr.php'); 30 return new YogWpAdminObjectUiN bpr();30 return new YogWpAdminObjectUiNBpr(); 31 31 break; 32 32 case YOG_POST_TYPE_NBTY: … … 45 45 require_once(YOG_PLUGIN_DIR . '/includes/classes/yog_wp_admin_object_ui_bbty.php'); 46 46 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(); 47 51 break; 48 52 case YOG_POST_TYPE_RELATION: … … 95 99 { 96 100 case 'thumbnail': 97 $thumbnail = get_the_post_thumbnail(null, 'thumbnail');101 $thumbnail = get_the_post_thumbnail(null, [200, 150]); 98 102 if (!empty($thumbnail)) 99 103 echo $thumbnail; 100 104 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>'; 102 106 103 107 break; … … 632 636 'order' => 'ASC', 633 637 '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), 635 639 'post_status' => array('publish', 'pending', 'trash', 'draft', 'auto-draft', 'future', 'private'))); 636 640 -
yes-co-ores-wordpress-plugin/trunk/includes/classes/yog_wp_admin_object_ui_bog.php
r2485742 r2556443 62 62 add_meta_box('yog-gebouw-meta', 'Gebouw', array($this, 'renderGebouwMetaBox'), YOG_POST_TYPE_BOG, 'normal', 'low'); 63 63 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'); 65 65 add_meta_box('yog-winkelruimte-meta', 'Winkelruimte', array($this, 'renderWinkelruimteMetaBox'), YOG_POST_TYPE_BOG, 'normal', 'low'); 66 66 add_meta_box('yog-horeca-meta', 'Horeca', array($this, 'renderHorecaMetaBox'), YOG_POST_TYPE_BOG, 'normal', 'low'); … … 69 69 add_meta_box('yog-documents', 'Documenten', array($this, 'renderDocumentsMetaBox'), YOG_POST_TYPE_BOG, 'normal', 'low'); 70 70 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'); 71 75 72 76 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 1 1 <?php 2 2 /** 3 * @desc YogWpAdminObjectUi NBpr3 * @desc YogWpAdminObjectUiBOpr 4 4 * @author Kees Brandenburg - Yes-co Nederland 5 5 */ 6 class YogWpAdminObjectUi NBpr extends YogWpAdminObjectUiAbstract6 class YogWpAdminObjectUiBOpr extends YogWpAdminObjectUiAbstract 7 7 { 8 8 /** … … 14 14 public function getPostType() 15 15 { 16 return YOG_POST_TYPE_ NBPR;16 return YOG_POST_TYPE_BOPR; 17 17 } 18 18 … … 41 41 'title' => 'Object', 42 42 'description' => 'Omschrijving', 43 ' location' => 'Locatie',43 'address' => 'Adres', 44 44 'dlm' => 'Laatste wijziging' 45 45 ); … … 54 54 public function addMetaBoxes() 55 55 { 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'); 57 57 add_meta_box('yog-standard-meta', 'Basis gegevens', array($this, 'renderBasicMetaBox'), $this->getPostType(), 'normal', 'low'); 58 58 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');60 59 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 61 62 add_meta_box('yog-movies', 'Video', array($this, 'renderMoviesMetaBox'), $this->getPostType(), 'normal', 'low'); 62 63 add_meta_box('yog-documents', 'Documenten', array($this, 'renderDocumentsMetaBox'), $this->getPostType(), 'normal', 'low'); … … 79 80 { 80 81 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')); 82 83 echo '</table>'; 83 84 } … … 95 96 // Koop 96 97 echo '<tr>'; 97 echo '<th colspan="2"><b>Koop aanneemsom</b></th>';98 echo '<th colspan="2"><b>Koopprijs</b></th>'; 98 99 echo '</tr>'; 99 echo $this->retrieveInputs($post->ID, array('Koop AanneemSomMin', 'KoopAanneemSomMax'));100 echo $this->retrieveInputs($post->ID, array('KoopPrijsMin', 'KoopPrijsMax')); 100 101 101 102 // Huur … … 103 104 echo '<th colspan="2"><b>Huurprijs</b></th>'; 104 105 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')); 137 107 138 108 echo '</table>'; … … 148 118 { 149 119 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')); 151 121 echo '</table>'; 152 122 } 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 153 137 154 138 /** -
yes-co-ores-wordpress-plugin/trunk/includes/config/config.php
r2485742 r2556443 18 18 define('YOG_POST_TYPE_BBPR', 'yog-bbpr'); 19 19 define('YOG_POST_TYPE_BBTY', 'yog-bbty'); 20 define('YOG_POST_TYPE_BOPR', 'yog-bopr'); 20 21 define('YOG_POST_TYPE_RELATION', 'relatie'); 21 22 define('YOG_POST_TYPE_ATTACHMENT', 'attachment'); 22 23 23 define('YOG_PLUGIN_VERSION', '1.3.7 4');24 define('YOG_PLUGIN_VERSION', '1.3.75'); 24 25 define('YOG_PLUGIN_DOJO_VERSION', '1.12.2'); // Old 1.9.3 25 26 ?> -
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 ?> 1 4 <div class="wrap"> 2 5 <div class="icon32 icon32-config-yog"><br /></div> … … 4 7 <?php require_once(__DIR__ . '/parts/menu.php'); ?> 5 8 <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>'; 9 22 10 // Types11 $checkboxesHtml = '';23 // Types 24 $checkboxesHtml = ''; 12 25 13 foreach ($postTypes as $postTypeTmp)14 {15 $checked = '';26 foreach ($postTypes as $postTypeTmp) 27 { 28 $checked = ''; 16 29 17 if (in_array($postTypeTmp, $settings['postTypes']))18 $checked = ' checked="checked"';30 if (in_array($postTypeTmp, $settings['postTypes'])) 31 $checked = ' checked="checked"'; 19 32 20 $id = 'shortcode_PostTypes_' . $postTypeTmp;21 $label = '';33 $id = 'shortcode_PostTypes_' . $postTypeTmp; 34 $label = ''; 22 35 23 $postTypeObject = get_post_type_object($postTypeTmp);36 $postTypeObject = get_post_type_object($postTypeTmp); 24 37 25 $label = $postTypeObject->labels->singular_name;38 $label = $postTypeObject->labels->singular_name; 26 39 27 $checkboxesHtml .= '<input type="checkbox" id="' . $id . '" name="shortcode_PostTypes[]" value="' . esc_attr($postTypeTmp) . '"' . $checked . ' /> <label for="' . $id . '">' . esc_html($label) . '</label><br />';28 }40 $checkboxesHtml .= '<input type="checkbox" id="' . $id . '" name="shortcode_PostTypes[]" value="' . esc_attr($postTypeTmp) . '"' . $checked . ' /> <label for="' . $id . '">' . esc_html($label) . '</label><br />'; 41 } 29 42 30 $html .= $this->renderRow('<label for="shortcode_PostTypes">Post types: </label>', $checkboxesHtml);43 $html .= $this->renderRow('<label for="shortcode_PostTypes">Post types: </label>', $checkboxesHtml); 31 44 32 // Latitude33 $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']) . '" />'); 34 47 35 // Longitude36 $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']) . '" />'); 37 50 38 // Width39 $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']) . '" />'); 40 53 41 // Width Unit42 $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>'; 48 61 49 $html .= $this->renderRow('<label for="shortcode_WidthUnit">Breedte in ...: </label>', $selectHtml);62 $html .= $this->renderRow('<label for="shortcode_WidthUnit">Breedte in ...: </label>', $selectHtml); 50 63 51 // Width52 $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']) . '" />'); 53 66 54 // Height Unit55 $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>'; 61 74 62 $html .= $this->renderRow('<label for="shortcode_HeightUnit">Hoogte in ...: </label>', $selectHtml);75 $html .= $this->renderRow('<label for="shortcode_HeightUnit">Hoogte in ...: </label>', $selectHtml); 63 76 64 $html .= '</tbody></table>';77 $html .= '</tbody></table>'; 65 78 66 echo $html;79 echo $html; 67 80 68 echo '<br /><br />';81 echo '<br /><br />'; 69 82 70 // @todo: Rewrite shortcode js so no dojo is needed71 $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) { 73 86 74 ready(function() {87 ready(function() { 75 88 76 var yogAdminShortcode = new yog.admin.Shortcode(mapDynamic, marker);89 var yogAdminShortcode = new yog.admin.Shortcode(mapDynamic, marker); 77 90 78 });79 });';91 }); 92 });'; 80 93 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'; 85 98 86 if (!YogPlugin::isDojoLoaded())87 {88 YogPlugin::loadDojo(false);89 }99 if (!YogPlugin::isDojoLoaded()) 100 { 101 YogPlugin::loadDojo(false); 102 } 90 103 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 115 115 </table> 116 116 117 <h3>Gekoppelde yes-co open accounts< /h3>117 <h3>Gekoppelde yes-co open accounts<?php echo (!empty($systemLinks) ? ' (' . count($systemLinks) . ')' : '');?></h3> 118 118 <span id="yog-add-system-link-holder"> 119 119 <b>Een koppeling toevoegen:</b><br> … … 126 126 if (!empty($systemLinks)) 127 127 { 128 $numberOfSystemLinks = count($systemLinks); 129 128 130 foreach ($systemLinks as $systemLink) 129 131 { … … 141 143 if (isset($systemObjectCounts[$systemLink->getCollectionUuid()])) 142 144 echo '<b>Aantal objecten:</b> <a href="' . esc_url(get_site_url()) . '?s=&object=all&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&collection=' . esc_attr($systemLink->getCollectionUuid()) . '" target="_blank">Bekijk objecten</a><br />'; 143 147 144 148 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 307 307 if (!empty($settings['latitude']) && !empty($settings['longitude']) && !empty($settings['postTypes'])) 308 308 { 309 $yogMapType = get_option('yog_map_type', 'google-maps'); 309 310 $googleMapsApiKey = get_option('yog_google_maps_api_key'); 310 311 $postTypes = $settings['postTypes']; 311 $ mapType= esc_attr($settings['mapType']);312 $googleMapsType = esc_attr($settings['mapType']); 312 313 $latitude = esc_attr($settings['latitude']); 313 314 $longitude = esc_attr($settings['longitude']); … … 320 321 $initFunctionName = 'yogInitMapDynamic'; 321 322 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'))) 323 324 { 324 325 if ($adminMode === false) … … 338 339 339 340 // Create Inline script 340 $inlineScript .= 'var mapDynamic;';341 $inlineScript = 'var mapDynamic;'; 341 342 $inlineScript .= 'function ' . $initFunctionName . '() {'; 342 343 $inlineScript .= 'var positionDynamic = { lat: ' . $latitude . ', lng: ' . $longitude . '};'; … … 344 345 $inlineScript .= 'center: positionDynamic,'; 345 346 $inlineScript .= 'zoom: ' . $zoomLevel . ','; 346 $inlineScript .= 'mapTypeId: \'' . $ mapType . '\',';347 $inlineScript .= 'mapTypeId: \'' . $googleMapsType . '\','; 347 348 // Hide POI's 348 349 $inlineScript .= 'styles: ['; -
yes-co-ores-wordpress-plugin/trunk/includes/widgets/yog_recent_objects_widget.php
r2458473 r2556443 344 344 if (!empty($new_instance['post_type_' . YOG_POST_TYPE_NBTY])) 345 345 $postTypes[] = YOG_POST_TYPE_NBTY; 346 if (!empty($new_instance['post_type_' . YOG_POST_TYPE_BOPR])) 347 $postTypes[] = YOG_POST_TYPE_BOPR; 346 348 347 349 // Set limit … … 380 382 $groupByCategoryOptions = empty($instance['group_by_category_options']) ? array() : $instance['group_by_category_options']; 381 383 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'); 383 385 384 386 echo '<div class="yog-recent-objects-widget-admin">'; -
yes-co-ores-wordpress-plugin/trunk/includes/yog_public_functions.php
r2458473 r2556443 16 16 $postType = get_post_type((int) $postId); 17 17 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)); 19 19 } 20 20 … … 53 53 $values = array(); 54 54 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))) 56 56 { 57 57 $fieldsSettings = YogFieldsSettingsAbstract::create($postType); … … 309 309 case YOG_POST_TYPE_BBPR: 310 310 case YOG_POST_TYPE_BBTY: 311 case YOG_POST_TYPE_BOPR: 311 312 $priceMinMaxTypes = array('KoopPrijs' => 'Koopprijs', 'HuurPrijs' => 'Huurprijs'); 312 313 break; … … 472 473 'offset' => 0, 473 474 '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), 475 476 'post_status' => array('publish'))); 476 477 … … 494 495 'order' => 'ASC', 495 496 '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), 497 498 'post_status' => array('publish'))); 498 499 } … … 1339 1340 YOG_POST_TYPE_BBPR, 1340 1341 YOG_POST_TYPE_BBTY, 1342 YOG_POST_TYPE_BOPR, 1341 1343 YOG_POST_TYPE_RELATION 1342 1344 ); … … 1360 1362 YOG_POST_TYPE_NBBN, 1361 1363 YOG_POST_TYPE_BBPR, 1362 YOG_POST_TYPE_BBTY 1364 YOG_POST_TYPE_BBTY, 1365 YOG_POST_TYPE_BOPR 1363 1366 ); 1364 1367 -
yes-co-ores-wordpress-plugin/trunk/package.json
r2485742 r2556443 1 1 { 2 2 "name": "yesco-ores", 3 "version": "1.3.7 4",3 "version": "1.3.75", 4 4 "devDependencies": { 5 5 "grunt": "~1.0.3", -
yes-co-ores-wordpress-plugin/trunk/readme.txt
r2485742 r2556443 3 3 Tags: yes-co, yesco, projecten, project, projects, huizen, huis, house, onroerend goed, real estate, makelaar, realtor, broker 4 4 Requires at least: 3.1 5 Tested up to: 5. 6.26 Stable tag: 1.3.7 45 Tested up to: 5.7.2 6 Stable tag: 1.3.75 7 7 8 8 Directly 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. … … 90 90 91 91 == Changelog == 92 = 1.3.75 = 93 * Added: support for BOG projects 92 94 = 1.3.74 = 93 95 * Added: support for BOG energy label -
yes-co-ores-wordpress-plugin/trunk/yesco-og.php
r2485742 r2556443 5 5 Text Domain: yes-co-ores-wordpress-plugin 6 6 Description: Publiceert uw onroerend goed op uw Wordpress Blog 7 Version: 1.3.7 47 Version: 1.3.75 8 8 Author: Yes-co 9 9 Author URI: https://www.yes-co.nl … … 24 24 // Include files 25 25 require_once(YOG_PLUGIN_DIR . '/includes/config/config.php'); 26 require_once(YOG_PLUGIN_DIR . '/includes/yog_rest_api.php'); 26 27 27 28 // Determine action
Note: See TracChangeset
for help on using the changeset viewer.