Skip to content

Instantly share code, notes, and snippets.

View gicolek's full-sized avatar

Rafał Gicgier - Certified Codeable Expert Developer gicolek

View GitHub Profile
@gicolek
gicolek / gra2.php
Last active December 5, 2023 18:22
Plugins Code
<?php
/*
Plugin Name: Bunny vs Ghosts Shortcode
Plugin URI: https://wp-doin.com/2023/12/02/a-simple-platform-game-concept-made-with-ai/
Description: A Shortcode to display the HTML and CSS of a Side Scroller Game
Version: 1.0.0
Author: Rafał Gicgier
Author URI: https://wp-doin.com/
Text Domain:
Domain Path: /
@gicolek
gicolek / dodge_and_shoot.php
Last active December 5, 2023 18:23
Dodge and Shoot - basic concept of a 2D shooter made with ChatGPT
<?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
@gicolek
gicolek / image_fallery_full.php
Created July 7, 2023 14:18
image_gallery_full
<?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" />
@gicolek
gicolek / custom-widget-script.js
Created May 31, 2022 12:40
Sample Widget Script
jQuery(document).ready(function(e){
console.log( 'This is my custom widget script' );
});
@gicolek
gicolek / custom-widget-style.css
Created May 31, 2022 12:39
Sample Custom Widget Style
.c-posts {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 1024px;
}
.c-post {
flex: 0 0 25%;
@gicolek
gicolek / custom_elementor_widget_2.php
Created May 31, 2022 12:37
Custom Elementor Widget Part 2
<?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 {
@gicolek
gicolek / functions.php
Created May 30, 2022 15:21
Custom Elementor Widget functions.php
<?php
/**
* Custom Elementor Widgets
*/
class Custom_Elementor_Widgets {
protected static $instance = null;
public static function get_instance(){
if ( !isset( static::$instance ) ) {