Skip to content

Instantly share code, notes, and snippets.

View birgire's full-sized avatar

Birgir Erlendsson birgire

View GitHub Profile
@birgire
birgire / woo-product-attributes-bulk-modifier.php
Last active March 4, 2024 10:09
WordPress: WooCommerce Product Attributes - Bulk Modifier ( from custom meta attributes to taxonomy attributes)
<?php
/**
* Plugin Name: WooPAM: Woo Product Attributes Modifier
* Description: Bulk update 'custom meta product attributes' to 'taxonomy product attributes' in WooCommerce. Supports the GET variables, like: woopam_mode=run&woopam_from_attribute_meta=colour&woopam_to_attribute_tax=pa_colour&woopam_keep_attribute_meta&woopam_posts_per_page=10&woopam_paged=0&woopam_post_type=product&woopam_post_status=any. WARNING: Backup DB first!!!
* Plugin Author: birgire
* Author URI: https://github.com/birgire
* Plugin URI: https://gist.github.com/birgire/0ed300ae4436fcaf508c
* Version: 1.0.0
* License: GPL2+
* Text Domain: woopam
@birgire
birgire / export-single-day.php
Last active May 14, 2023 13:24
WordPress Plugin: Enhance the native XML export - with a single day selection
<?php
/**
* Plugin Name: Single Day Posts Export
* Plugin URL: http://wordpress.stackexchange.com/a/199527/26350
* Plugin Author: Birgir Erlendsson (birgire)
* Version: 0.0.1
*/
/**
* Add our extra HTML
@birgire
birgire / my-stats-column-for-jetpack.php
Created February 8, 2023 22:05
WordPress Plugin: My Jetpack Stats Column
<?php
/**
* Plugin Name: My Jetpack Stats Column
* Plugin URI: http://xlino.com/projects/adding-a-stats-column-for-jetpack/
* Author: birgire
* Description: Adds a stats column to the posts table on the edit.php screen
* Version: 1.0.0
*/
add_action( 'admin_init', function()
@birgire
birgire / rapyd_card_payment_callback_debug.php
Last active May 13, 2022 11:58
WordPress plugin: Debug Rapyd Card payment callback
<?php
/**
* Plugin Name: Debug Rapyd Card payment callback.
* Description: This plugin saves the payload from the Rapyd Card callback into the order meta under the 'debug' key.
* Plugin URI: https://gist.github.com/birgire/beb3806eb15db4431e2ae0c35c6b53c4
* Author: birgire
* Author URI: https://github.com/birgire
* License: MIT
* Version: 0.0.4
*/
@birgire
birgire / actions_and_filters.log
Last active December 13, 2021 22:27
WordPress: Here we list all (exl. gettext) actions & filters that run when the `edit.php` (post) screen is loaded without any plugins and with a default theme activated:
Here we list all do_action, do_action_ref_array, apply_filters and apply_filters_ref_array calls (excluding gettext) for the edit.php (post) screen.php:
---
muplugins_loaded - do_action
pre_site_option_siteurl - apply_filters
default_site_option_siteurl - apply_filters
pre_option_siteurl - apply_filters
option_siteurl - apply_filters
site_option_siteurl - apply_filters
@birgire
birgire / menu-quick-search-tags-enhancements.php
Created June 21, 2016 14:59
WordPress Plugin: Search For Name Or Description In The Quick Search For Tags In The Menu Editor
<?php
/**
* Plugin Name: Quick Search Menu Enhancement
* Description: Search for name or description in the quick-search for tags in the menu editor
* Plugin URI: https://gist.github.com/birgire/b7001f51b3ad970f37fee2b8f854d939
* Author: birgire
* Version: 1.0.0
*/
/**
@birgire
birgire / extended-admin-tag-search.php
Last active July 6, 2021 19:08
WordPress Plugin:Search for name, slug or description in the tag search in /wp-admin/edit-tags.php?taxonomy=post_tag.
<?php
/**
* Plugin Name: Extend the tag search
* Description: Search for name, slug or description in the tag search in /wp-admin/edit-tags.php?taxonomy=post_tag.
* Plugin URI: https://gist.github.com/birgire/4a43dbe1b7566aa0f162b59066276d15
* Author: birgire
* Version: 1.0.0
*/
/**
@birgire
birgire / term-editor-search-field.php
Last active July 6, 2021 19:04
WordPress Plugin: Add custom search fields to the term editor.
<?php
/**
* Plugin Name: Term Editor Search Field
* Description: Adds Search fields to the term editor.
* Plugin URI: https://gist.github.com/birgire/22a57ad1eed45e366cc1d47575bba0b1
* Author: birgire
* Version: 1.0.2
*/
/**
@birgire
birgire / ping-screenshot-capture.php
Last active September 18, 2020 20:35
WordPress Plugin: Ping screenshots capture generation using an hidden iframe only once for published posts
<?php
/**
* Plugin Name: Ping Screenshots Capture
* Description: Ping screenshots capture generation using an hidden iframe only once for published posts
* Version: 1.0.0
* Author: birgire
*/
namespace PingScreenshotCapture;
@birgire
birgire / functions.php
Created March 7, 2020 11:07 — forked from RichardNesbitt/functions.php
WP Bakery Page Builder - Add URL option to make entire column clickable
/* add this to your theme's functions.php file */
/* Add option for URL to column settings */
vc_add_param("vc_column", array(
"type" => "vc_link",
"class" => "",
"heading" => "Column Link",
"param_name" => "column_link"
));