Skip to content

Instantly share code, notes, and snippets.

View ajvillegas's full-sized avatar

Alexis J. Villegas ajvillegas

View GitHub Profile
@westonruter
westonruter / wp-42573.php
Last active January 16, 2025 14:37
WP Trac #42573: Fix for theme template caching. https://core.trac.wordpress.org/ticket/42573
<?php
/**
* Plugin name: WP Trac #42573: Fix for theme template file caching.
* Description: Flush the theme file cache each time the admin screens are loaded which uses the file list.
* Plugin URI: https://core.trac.wordpress.org/ticket/42573
* Author: Weston Ruter, XWP.
* Author URI: https://weston.ruter.net
*/
function wp_42573_fix_template_caching( WP_Screen $current_screen ) {
@westonruter
westonruter / add-to-custom-css-help-text.php
Last active October 10, 2017 04:18
Add help text to the end of the Custom CSS section in the Customizer.
<?php
add_action( 'customize_register', function( $wp_customize ) {
$custom_css_section = $wp_customize->get_section( 'custom_css' );
if ( $custom_css_section ) {
// @todo The section-description-buttons should really not be part of the description help text.
$custom_css_section->description = preg_replace(
'/(?=<p class="section-description-buttons)|$/',
'<p>' . __( 'Here are some additional instructions for the theme, for example certain class names or IDs to target.' ) . '</p>',
$custom_css_section->description,
@pento
pento / stars-block.js
Last active January 4, 2022 14:00
Gutenberg Stars Block
( function( blocks, element ) {
var el = element.createElement;
function Stars( { stars } ) {
return el( 'div', { key: 'stars' },
'★'.repeat( stars ),
( ( stars * 2 ) % 2 ) ? '½' : '' );
}
blocks.registerBlockType( 'stars/stars-block', {
;(function () {
/**
* Run function when customizer is ready.
*/
wp.customize.bind('ready', function () {
wp.customize.control('slug_select_control', function (control) {
/**
* Run function on setting change of control.
*/
control.setting.bind(function (value) {
var logosListWidget = logosListWidget || {};
logosListWidget.render = function( id, JSON ){
// Model (Data for individual logo)
var Logo = Backbone.Model.extend( {
defaults: {
'url' : '',
'name': ''
}
} );
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active April 13, 2025 14:34
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@amboutwe
amboutwe / yoast_seo_admin_remove_columns.php
Last active October 17, 2024 22:36
Remove Yoast SEO columns from posts and pages
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast SEO columns for all users site wide
* Credit: Andrew Norcross http://andrewnorcross.com/
* Last Tested: Sep 17 2024 using Yoast SEO 23.4 on WordPress 6.6.2
*
* If you have custom post types, you can add additional lines in this format
* add_filter( 'manage_edit-{$post_type}_columns', 'yoast_seo_admin_remove_columns', 10, 1 );
* replacing {$post_type} with the name of the custom post type.
@srikat
srikat / class-custom-featured-post.php
Last active April 3, 2022 16:29 — forked from GaryJones/readme.md
Custom Featured Posts Widget plugin: Skeleton for amending the output of the Genesis Featured Posts widget. https://sridharkatakam.com/custom-featured-post-widget-plugin/
<?php
/**
* Plugin Name
*
* @package Custom_Featured_Post_Widget
* @author Gary Jones
* @license GPL-2.0+
* @link http://gamajo.com/
* @copyright 2013 Gary Jones, Gamajo Tech
*/
@slushman
slushman / customizer-links.php
Last active October 9, 2024 00:34
How to link into the WordPress Customizer
@ericakfranz
ericakfranz / envira-lightbox-custom-images.php
Last active November 20, 2018 22:38 — forked from n7studios/envira-lightbox-custom-images.php
Envira Gallery - Lightbox for Custom Images
<?php
/**
* Plugin Name: Envira Gallery - Lightbox for Custom Images
* Plugin URI: http://enviragallery.com
* Version: 2.0
* Author: Erica Franz
* Author URI: https://fatpony.me/
* Description: Use the Envira Gallery lightbox for non-gallery images throughout your site.
*/