Skip to content

Instantly share code, notes, and snippets.

@yazzou
yazzou / gist:58deecfda1287c87358380e3f4213778
Created December 26, 2019 12:41 — forked from dalethedeveloper/gist:2294765
WordPress: Popup YouTube Videos in Thickbox (via shortcode)
/**
* Add a custom shortcode to popup youtube videos in a thickbox overlay.
* Pastable to functions.php in a WordPress theme.
*
* Usage (in WP Editor):
* [ytp url="http://www.youtube.com/watch?v=xxxxxxxxxxxxx"]
*
* From: http://manchumahara.com/2010/03/22/using-wordpress-native-thickbox/
*/
<?php
/**
* Plugin Name: WordPress Importer Post ID Preservation
* Description: When importing posts make sure that post ID from the original site is used on the destination site. This should only be used when first setting up an environment, or if the destination site is not canonical (e.g. a dev or staging environment).
* Author: Weston Ruter, XWP
*/
/**
* Force WordPress Importer to never honor the post_exists() check, since we want to override existing posts.
*
<?php
/**
* Plugin Name: TOPTAL WP-CLI Commands
* Version: 0.1
* Plugin URI: https://n8finch.com/
* Description: Some rando wp-cli commands to make life easier...
* Author: Nate Finch
* Author URI: https://n8finch.com/
* Text Domain: toptal-wpcli
* Domain Path: /languages/
@yazzou
yazzou / admin_sys.md
Created March 26, 2020 06:18 — forked from raphaellarrinaga/admin_sys.md
Bash & admin sys commands
@yazzou
yazzou / make-elementor-default-editor.php
Created April 20, 2020 13:06 — forked from deckerweb/make-elementor-default-editor.php
Make Elementor the Default Editor, Not the WordPress Editor (Gutenberg or Classic)
<?php
/**
* Make Elementor the default editor, not the WordPress Editor (Gutenberg or Classic)
* Clicking the page title will take you to the Elementor editor directly
* Even non-Elementor-edited pages will become Elementor-edited pages now
* You can revert by clicking the "Back to WordPress Editor" button
*
* Author: Joe Fletcher, https://fletcherdigital.com
* URL: https://gist.github.com/heyfletch/7c59d1c0c9c56cbad51ef80290d86df7
@yazzou
yazzou / README.md
Created April 27, 2020 12:30 — forked from ControlledChaos/README.md
Add styles to the WordPress Customizer that mimics the WordPress admin.

Default Admin Styles for WordPress Customizer

WordPress Snippet - Stylesheet

@yazzou
yazzou / latestposts-control.php
Created April 29, 2020 10:16 — forked from danielpataki/latestposts-control.php
Custom Theme Customization Controls
$wp_customize->add_control(
new WP_Customize_Latest_Post_Control(
$wp_customize,
'featpost_control',
array(
'label' => __( 'Select A Featured Post', 'mytheme' ),
'section' => 'header_section',
'settings' => 'featured_post',
'post_type' => 'page'
)
@yazzou
yazzou / readme.md
Created September 25, 2020 09:34 — forked from Ademking/readme.md
💚 Android : How to record events and play them using ADB SHELL

1) Know the event name of touchpad :

Run :

adb shell getevent -pl

Search for : "ABS_MT_TRACKING_ID" - example :

@yazzou
yazzou / hooks.php
Created December 23, 2020 19:46 — forked from ibndawood/hooks.php
Electro - Single Product Hooks
/**
* Default WooCommerce Single Product Hooks
*/
/**
* Hook: woocommerce_before_single_product_summary.
*
* @hooked woocommerce_show_product_sale_flash - 10
* @hooked woocommerce_show_product_images - 20
*
* Hook: woocommerce_single_product_summary.
@yazzou
yazzou / monitor.sh
Created January 18, 2021 17:36 — forked from artbristol/monitor.sh
inotify watch a directory with timestamps
inotifywait --monitor --timefmt '%F %T' --format '%T %w %e' --recursive $1