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 | |
/** | |
* Class EoEventsRestAPI | |
* @version 1.0.0 | |
* @see https://gist.github.com/vollyimnetz/d694276674f3d38fcbecbfa34a2750be | |
* | |
* This class is responsible for registering the REST API endpoint for the events | |
* and handling the request. | |
* The endpoint is registered under /wp-json/eo/v1/events | |
* The endpoint accepts the following parameters: |
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 | |
/** | |
* Add immobilienMapCanvas to the list of complianz-placeholders. | |
* @param $tags | |
* @return array | |
*/ | |
add_filter('cmplz_placeholder_markers', function($tags){ | |
$tags['google-maps'][] = "immobilienMapCanvas"; | |
return $tags; |
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 | |
namespace tm; | |
/** | |
* @see https://gist.github.com/vollyimnetz/3670de82fd2b967722875627c27ea446 | |
*/ | |
class BackendLogger { | |
private static $secondsToRelaod = 5; | |
private static $version = '1.2'; |
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
/** | |
* Converts a simpleXML element into an array. Preserves attributes and everything. | |
* You can choose to get your elements either flattened, or stored in a custom index that | |
* you define. | |
* For example, for a given element | |
* <field name="someName" type="someType"/> | |
* if you choose to flatten attributes, you would get: | |
* $array['field']['name'] = 'someName'; | |
* $array['field']['type'] = 'someType'; | |
* If you choose not to flatten, you get: |
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
<!-- | |
HOW TO USE | |
add MessageAlert once anywhere inside your vuetify app. | |
On a place where it always get loaded, i.e. before the closing "v-app" | |
<MessageAlert entrypoint="my_entrypoint"></MessageAlert> | |
Now you can use it anywhere in your code: | |
### promise based | |
document.my_entrypoint.openAlert({ message:"Thats the text" }).then(() => { | |
console.log('Alert closed'); |
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
/* | |
@see https://gist.github.com/vollyimnetz/1df01fd0fd87af4564b545a67bec663d | |
HOW TO USE | |
data-image-preload="URL" | |
will add .preloadOverlay as soon as the function kicks in | |
will add .loaded as soon as the image is loaded | |
CODE | |
<div class="imageHolder" style="background-image:url('<?php esc_attr_e($thumb) ?>')" data-image-preload="<?php esc_attr_e($thumb) ?>"> | |
<a class="addToLightbox" href="<?php esc_attr_e($full) ?>"></a> | |
</div> |