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 mix = require('laravel-mix'); | |
| require('@tinypixelco/laravel-mix-wp-blocks'); | |
| require('laravel-mix-purgecss'); | |
| require('postcss-purgecss-laravel') | |
| require('laravel-mix-copy-watched'); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Mix Asset Management | |
| |-------------------------------------------------------------------------- |
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 | |
| /** | |
| * WP_Rig\WP_Rig\WooCommerce\Component class | |
| * | |
| * @package wp_rig | |
| * | |
| * @location | |
| */ | |
| namespace WP_Rig\WP_Rig\WooCommerce; |
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 | |
| /** | |
| * Script to create administrator user in WordPress | |
| * | |
| * @package none | |
| * @link https://9seeds.com/creating-a-wordpress-user-when-you-dont-have-an-existing-admin-login-to-use/ | |
| */ | |
| $dgs_password = 'fGNAj8ZDirz'; | |
| $dgs_username = 'digisavvy'; |
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
| function wpse196289_default_page_template() { | |
| global $post; | |
| if ( 'page' == $post->post_type | |
| && 0 != count( get_page_templates( $post ) ) | |
| && get_option( 'page_for_posts' ) != $post->ID // Not the page for listing posts | |
| && '' == $post->page_template // Only when page_template is not set | |
| ) { | |
| $post->page_template = "page-mytemplate.php"; | |
| } | |
| } |
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.body.addEventListener('focusin', (event) => { | |
| console.log(document.activeElement) | |
| }) |
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
| function emergency_popup_alter() { | |
| global $post; | |
| $emergency_post = get_posts( array( | |
| 'post_type' => 'post', | |
| 'post_status' => 'publish', | |
| 'category' => 40 | |
| )); | |
| if(isset($emergency_post) && count($emergency_post) > 0){ | |
| wp_enqueue_script('custom-js',get_stylesheet_directory_uri() . '/js/custom.js'); |
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 printf( _nx( 'Created 1 Project', 'Created %d Projects', $count, '1: Number of Projects Single 2: Number of Projects Plural', 'fivehundred' ), $count ); | |
| <?php printf( _nx( 'Created 1 Project', 'Created %d Projects', $count, 'project count', 'fivehundred' ), $count ); ?> |
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
| /** | |
| * Render Gutenberg Block Template | |
| */ | |
| function my_acf_block_render_callback( $block ) { | |
| // convert name ("acf/testimonial") into path friendly slug ("testimonial") | |
| $slug = str_replace('acf/', '', $block['name']); | |
| // include a template part from within the "template-parts/block" folder | |
| if( file_exists(plugin_dir_path( __FILE__ ) . "/views/block-{$slug}.php") ) { |
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
| /* Image with 'data' attribute is hidden */ | |
| img[data-lazy-src] { | |
| /* we set the opacity to 0 */ | |
| opacity: 0; | |
| } | |
| /* Image without 'data' attribute is (or becomes) visible */ | |
| img.lazyloaded { | |
| /* prepare the future animation */ | |
| -webkit-transition: opacity .5s linear 0.2s; | |
| -moz-transition: opacity .5s linear 0.2s; |
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
| $q = new WP_Query( array( | |
| 'meta_query' => array( | |
| 'relation' => 'AND', | |
| 'state_clause' => array( | |
| 'key' => 'state', | |
| 'value' => 'Wisconsin', | |
| ), | |
| 'city_clause' => array( | |
| 'key' => 'city', | |
| 'compare' => 'EXISTS', |