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 | |
/* | |
Plugin Name: Bunny vs Ghosts | |
Plugin URI: https://wp-doin.com/a-simple-platform-game-concept-made-with-ai | |
Description: A simply plugin to be installed on a WordPress website, which when embeded prints a simple side scroller game. | |
Version: 1.0.0 | |
Author: Rafał Gicgier + ChatGPT | |
Author URI: https://wp-doin.com/ | |
Text Domain: wp-doin | |
Domain Path: /lang |
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 | |
/* | |
Plugin Name: Galaga Style Game | |
Plugin URI: https://wp-doin.com/2023/11/04/a-simple-javascript-dodge-and-shoot/ | |
Description: A Shortcode to display the HTML and CSS and JS of a Shooter Game | |
Version: 1.0.0 | |
Author: Rafał Gicgier | |
Author URI: https://wp-doin.com/ | |
Text Domain: wp-doin | |
Domain Path: /lang |
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 | |
// kudos https://wp-doin.com/2022/10/19/a-simple-accordion-image-gallery/ | |
add_shortcode( 'anim_block', 'wpd_anim_block_shortcode' ); | |
function wpd_anim_block_shortcode(){ | |
ob_start(); | |
?> | |
<div class="c-anim-block"> | |
<div class="c-anim_block__img-wrap c-anim_block__img-wrap--1"> | |
<img class="c-anim-block__img c-anim-block__img--1" src="https://wp-doin.com/wp-content/uploads/2022/10/pexels-hitesh-choudhary-340152-980x551.jpg" /> |
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
jQuery( document ).ready(function() { | |
jQuery('.c-anim_block__img-wrap').hover(function () { // while hoverin on our container | |
jQuery(this).toggleClass('is-active'); // add is-active class to the hovered element | |
jQuery('.c-anim_block__img-wrap').not(this).toggleClass('is-inactive'); // and inactive class to each other element | |
}); | |
}); |
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
.c-anim-block { | |
overflow: hidden; /* make sure images don't go outside of our container */ | |
border-radius: 25px; | |
display: flex; | |
justify-content: space-between; | |
} | |
.c-anim_block__img-wrap { | |
flex: 0 0 20%; /* initial width of each image */ | |
max-width: 20%; |
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
<div class="c-anim-block"> | |
<div class="c-anim_block__img-wrap c-anim_block__img-wrap--1"> | |
<img class="c-anim-block__img c-anim-block__img--1" src="https://wp-doin.com/wp-content/uploads/2022/10/pexels-hitesh-choudhary-340152-980x551.jpg" /> | |
</div> | |
<div class="c-anim_block__img-wrap c-anim_block__img-wrap--2"> | |
<img class="c-anim-block__img c-anim-block__img--2" src="https://wp-doin.com/wp-content/uploads/2022/10/pexels-negative-space-169573-980x653.jpg" /> | |
</div> | |
<div class="c-anim_block__img-wrap c-anim_block__img-wrap--3"> | |
<img class="c-anim-block__img c-anim-block__img--3" src="https://wp-doin.com/wp-content/uploads/2022/10/pexels-jeshoots-4316-980x653.jpg" /> | |
</div> |
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
jQuery(document).ready(function(e){ | |
console.log( 'This is my custom widget script' ); | |
}); |
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
.c-posts { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
flex-wrap: wrap; | |
max-width: 1024px; | |
} | |
.c-post { | |
flex: 0 0 25%; |
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 | |
// make sure this line is here, the Widget Base belongs to Elementor Namespace | |
namespace Elementor; | |
if ( !defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
// Extend the \Elementor\Widget_Base class | |
class My_Widget_Custom_Blog_Loop extends Widget_Base { |
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 | |
/** | |
* Custom Elementor Widgets | |
*/ | |
class Custom_Elementor_Widgets { | |
protected static $instance = null; | |
public static function get_instance(){ | |
if ( !isset( static::$instance ) ) { |