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 | |
/** | |
* Print the clean basedomain in the admin footer | |
* | |
* Place the file under /wp-content/mu-plugins/wpse.php | |
* | |
* @uses get_clean_basedomain() | |
*/ | |
add_action( 'in_admin_footer', function(){ | |
if( function_exists( 'get_clean_basedomain' ) ) |
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
/** | |
* Redirect attachment page visits to the parent page, else the home page. | |
*/ | |
add_action( 'template_redirect', function() | |
{ | |
if( ! is_attachment() ) | |
return; | |
if( $parent_id = wp_get_post_parent_id() ) | |
wp_safe_redirect( esc_url( get_permalink( $parent_id ) ) ); |
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: Change the size of the Image preview on the media edit page | |
* Author: Birgir Erlendsson (birgire) | |
* Plugin URI: http://wordpress.stackexchange.com/questions/204280/change-the-size-of-the-image-preview-on-the-media-edit-page | |
* | |
* ------------------------------------------------------------------------------------ | |
* Possible workaround, without core modifications, | |
* but note that the javascript crop-selection numbers will not be accurate, | |
* when $inf <> 400 |
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
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 |
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: Hueman Theme - Sharrre Sharing Bar On Pages | |
* Description: Add the Hueman theme's sharing-bar to pages. (Fix for those who don't have a recommended child theme) | |
* Plugin URI: https://gist.github.com/birgire/be3dc8174e227233fa70 | |
* Author: Birgir Erlendsson (birgire) | |
* Author URI: https://github.com/birgire | |
* Version: 0.0.1 | |
* Licence: MIT | |
*/ |
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: 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 |
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: Field Query | |
* Description: Support the "field_query" argument in the WP_Query class | |
* Plugin URI: https://gist.github.com/birgire/ebf79ab6b12258a0e489 | |
* Plugin Author: Birgir Erlendsson (birgire) | |
* Version: Proposal (2015-07-28) | |
**/ | |
/** |
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: 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 |
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
/** | |
* Match any numbers in given a meta-key for WP_Query (PHP 5.2+) | |
* | |
* @see http://wordpress.stackexchange.com/a/177331/26350 | |
*/ | |
! is_admin() && add_filter( 'posts_where', 'wpse_posts_where' ); | |
function wpse_posts_where( $where ) | |
{ |
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: Simple Redirections | |
* Plugin URI: https://gist.github.com/birgire/b1c8b3b94da4ee2f94ba | |
* Author: Birgir Erlendsson (birgire) | |
* Version: 0.0.1 | |
* Licence: GPLv2+ | |
* Description: Redirect to the newest or the latest post with a GET parameter | |
*/ |