This file contains hidden or 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
version: '3.1' | |
services: | |
wordpress: | |
image: wordpress:php8.1-apache | |
ports: | |
- 8080:80 | |
environment: | |
WORDPRESS_DB_HOST: db |
This file contains hidden or 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 | |
/** | |
* | |
* Scripts and actions to optimize WordPress | |
* | |
*/ | |
// Remove block editor | |
add_filter( 'use_block_editor_for_post', '__return_false' ); |
This file contains hidden or 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
document.addEventListener('alpine:init', async () => { | |
// eslint-disable-next-line no-unused-expressions, no-undef | |
Alpine.data('animatedCounter', (target) => ({ | |
current: 0, | |
// eslint-disable-next-line object-shorthand | |
target: target, | |
time: 400, | |
start: 0, | |
updateCounter() { | |
const { start } = this; |
This file contains hidden or 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_action('rest_api_init', function () { | |
register_rest_route('custom/v1', '/transactions/', [ | |
'methods' => 'GET', | |
'callback' => 'get_transactions', | |
]); | |
}); | |
function get_transactions($request) { |
This file contains hidden or 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 | |
$replaceme = get_posts([ | |
'posts_per_page' => -1, | |
'post_type' => 'custom_post_type', | |
'meta_key' => 'custom_field_name', | |
'meta_compare' => '=', // optional | |
'meta_value' => 'custom_field_value', | |
]); |
This file contains hidden or 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
class ExampleSliders { | |
splideSettings() { | |
const elms = document.getElementsByClassName('splide'); | |
for (let i = 0; i < elms.length; i++) { | |
// eslint-disable-next-line no-undef | |
new Splide(elms[i]).mount(); | |
} | |
} |
This file contains hidden or 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
document.addEventListener('alpine:init', async () => { | |
// eslint-disable-next-line no-unused-expressions, no-undef | |
Alpine.data('transactionFilter', () => ({ | |
uri: window.location.origin, | |
isLoading: true, | |
yearx: null, | |
transactionType: null, | |
locationx: null, | |
sector: null, | |
yearMobile: null, |
This file contains hidden or 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
const lenis = new Lenis({ | |
duration: 1.2, | |
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)), | |
direction: 'vertical', // vertical, horizontal | |
gestureDirection: 'vertical', // vertical, horizontal, both | |
smooth: true, | |
mouseMultiplier: 1, | |
smoothTouch: false, | |
touchMultiplier: 2, | |
infinite: false, |