- https://woffice.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Woffice members filter query | |
* See bp_nouveau_ajax_querystring() for details | |
* | |
* @since 2.8.0 | |
* | |
* @param $query_string | |
* | |
* @return string | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function remove_eonet_ui() { | |
wp_dequeue_style( 'eonet-ui-css' ); | |
} | |
add_action( 'wp_print_styles', 'remove_eonet_ui', 100 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Draw the marker of the members on the map | |
* | |
* So we can see them | |
*/ | |
drawMarkers: function() { | |
var self = this; | |
var infowindow = new google.maps.InfoWindow(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fetch the Members locations using AJAX | |
* | |
* The action sent to the WordPress router is: woffice_map_members | |
*/ | |
fetchLocations: function () { | |
var self = this; | |
$.ajax({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mounted: function() { | |
this.createMap(); | |
this.fetchLocations(); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
Vue.component('woffice-members-map', { | |
template: '<div id="woffice-members-map__content"></div>', | |
props: ['url', 'height'], | |
data: function () { | |
return { | |
loaded: false, | |
mapObject: null, | |
center: { | |
lat: 50.629250, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The public Google API key used for the Google Map API | |
* | |
* @var string | |
*/ | |
private $publicApiKey = 'yyyyyyy'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
Vue.component('woffice-members-map', { | |
template: '<div id="woffice-members-map__content"></div>', | |
props: ['url', 'height'], | |
data: function () { | |
return { | |
loaded: false, | |
members: [] | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register our [woffice_members_map] shortcode | |
* | |
* @return string | |
*/ | |
public function shortcode() | |
{ | |
return '<div id="woffice-members-map__wrapper"> | |
<woffice-members-map :url="'. admin_url( 'admin-ajax.php' ) .'" :height="200"></woffice-members-map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register our shortcode | |
add_shortcode( 'woffice_members_map', array($this, 'shortcode')); |
NewerOlder