This file contains 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: A faster load_textdomain | |
Version: 0.0.1 | |
Description: While we're wating for https://core.trac.wordpress.org/ticket/32052. | |
Author: Per Soderlind | |
Author URI: https://soderlind.no | |
Plugin URI: https://gist.github.com/soderlind/610a9b24dbf95a678c3e | |
@link https://bjornjohansen.no/wordpress-translations-loading-time | |
License: GPL |
This file contains 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: Programmatically add Gravity Forms | |
Plugin URI: https://daan.kortenba.ch/programmatically-add-gravity-forms/ | |
Description: Programmatically add persistent Gravity Forms forms. | |
Author: Daan Kortenbach | |
Version: 0.1 | |
Author URI: https://daan.kortenba.ch/ | |
License: GPLv2 or later | |
*/ |
This file contains 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: Private Debug Log | |
Description: Enable debug log to a private folder not accessible from the web | |
Version: 0.0.1 | |
Author: WebAware | |
Author URI: http://www.webaware.com.au/ | |
*/ | |
/* |
This file contains 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 | |
// Forked from gist linked at https://docs.gravityview.co/article/311-gravityview-capabilities | |
/** | |
* Modify whether an user has access to edit a specific View. | |
* | |
* @see https://codex.wordpress.org/Plugin_API/Filter_Reference/user_has_cap | |
* | |
* @param array $allcaps All the capabilities of the user |
This file contains 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 | |
/** | |
* The WordPress Meme Shortcode admin page. | |
* | |
* @author Carl Alexander | |
*/ | |
class WPMemeShortcode_AdminPage | |
{ | |
/** |
This file contains 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 | |
/** | |
* If inserting a gif always place the full size image | |
* | |
* @link https://whoischris.com/code-sample-keep-gif-animation-when-adding-media-to-post-content-in-wordpress/ | |
* | |
* @param string $html | |
* @param int $send_id | |
* @param array $attachment | |
* |
This file contains 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
// Gravity Forms Dynamic Redirect | |
add_filter( 'gform_confirmation', 'dlm_gf_dynamic_redirect', 10, 4 ); | |
function dlm_gf_dynamic_redirect( $confirmation, $form, $entry, $ajax ) { | |
// DLM GF Handler | |
$dlm_gf_handler = new DLM_GF_Gravity_Forms_Handler(); | |
// fetch download ID dynamically from form | |
$lead_id = $dlm_gf_handler->get_lead_index_of_dlm_field( $form ); |
This file contains 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 | |
/** | |
* The Events Calendar and/or PRO: Set Region and Language biasing for Google Maps. | |
* | |
* @link https://gist.github.com/cliffordp/c7c2713e9f61166e9aef746823be6bfa This snippet. | |
* @link https://developers.google.com/maps/faq#languagesupport Language Codes. | |
* @link https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRegionCodes Region codes. | |
* | |
* @param string $api_url The Google Maps API URL. | |
* |
This file contains 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 | |
/* | |
WordPress Template Hierarchy (as of WordPress 4.9) | |
is_404() -------------------------------------------------------------------------------------------------> 404.php | |
is_search() ----------------------------------------------------------------------------------------------> search.php | |
is_front_page() ------------------------------------------------------------------------------------------> front-page.php | |
is_home() ------------------------------------------------------------------------------------------------> home.php |
This file contains 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 | |
/** | |
* The Events Calendar: Add "Post Date" column to the wp-admin Events posts list. | |
* | |
* @link https://gist.github.com/barryhughes/38d7131462bd3912e571d5e6f3b5762e | |
*/ | |
add_action( 'manage_posts_custom_column', 'events_post_date_column', 10, 2 ); | |
add_filter( 'manage_tribe_events_posts_columns', 'events_post_date_column_header' ); | |
function events_post_date_column( $column_id, $post_id ) { |