Skip to content

Instantly share code, notes, and snippets.

View n7studios's full-sized avatar

Tim Carr n7studios

View GitHub Profile
@n7studios
n7studios / wp-to-buffer-pro-link-preview-acf-field.php
Last active August 7, 2025 03:21
WordPress to Buffer Pro: Set Link Preview URL from ACF Field
@n7studios
n7studios / kit-disable-append-form-to-content.php
Created July 24, 2025 06:26
Kit WordPress Plugin: Disable `append_form_to_content` on Front Page
<?php
/**
* Plugin Name: Kit: Disable `append_form_to_content` on Front Page
* Version: 0.0.1
* Author: Kit
* Description: Disables the `append_form_to_content` on the Front Page
*/
add_action( 'wp', function() {
@n7studios
n7studios / disable-load-textdomain-jit-notice.php
Created November 25, 2024 05:00
Disable "Notice: Function _load_textdomain_just_in_time was called incorrectly" in WordPress 6.7
<?php
/**
* Disable `_load_textdomain_just_in_time` `doing_it_wrong` notice
*
* @package ConvertKit
* @author ConvertKit
*
* @wordpress-plugin
* Plugin Name: Disable `_load_textdomain_just_in_time` `doing_it_wrong` notice
* Plugin URI: https://www.wpzinc.com/
@n7studios
n7studios / kit-exclude-forms-post-type.php
Created February 28, 2025 01:11
Kit: Exclude Forms on Post Type
<?php
/**
* Plugin Name: Kit: Exclude Post Type from Forms
* Version: 0.0.1
* Author: Kit
* Description: Exclude a Post Type from having Forms appended
*/
add_action( 'convertkit_get_supported_post_types', function( $post_types ) {
@n7studios
n7studios / gravity-forms-move-progress-bar-bottom.php
Created November 19, 2015 16:14
Gravity Forms - Move Progress Bar to Bottom of Form
<?php
/**
* Plugin Name: Gravity Forms: Move Progress Bar to Bottom of Form
* Plugin URI: http://www.n7studios.co.uk
* Version: 1.0.0
* Author: n7 Studios
* Author URI: http://www.n7studios.co.uk
* Description: Moves the progress bar from the top to the bottom of the Gravity Form. The Start Paging section of the form MUST have a CSS class = progress-bar-bottom
*/
@n7studios
n7studios / acf-blocks.php
Created December 14, 2018 16:01
Advanced Custom Fields: Registering Custom Gutenberg Blocks
<?php
/**
* Plugin Name: Advanced Custom Fields: Gutenberg Blocks
* Plugin URI: https://www.n7studios.co.uk
* Version: 1.0.0
* Author: n7 Studios
* Author URI: https://www.n7studios.co.uk
* Description: Example code to register Advanced Custom Field Groups as Blocks. Requires ACF 5.8+
*/
@n7studios
n7studios / post-to-social.php
Last active March 9, 2024 10:47
Determine Post Publish / Update via Classic Editor, Gutenberg and REST API
<?php
/**
* Example class implementation to perform actions, such as sending a Post
* to a third party API or service, when the Post is published or updated through:
* - Classic Editor
* - Gutenberg
* - REST API
*
* @package Post_To_Social
* @author Tim Carr
@n7studios
n7studios / wp-dropdown-categories-aria-label.php
Last active November 23, 2023 21:55
WordPress: Add the aria-label attribute to wp_dropdown_categories(): https://www.n7studios.co.uk/adding-aria-labels-wp_dropdown_categories/
<?php
/**
* If the aria-label argument has been specified in a wp_dropdown_categories() call,
* output the aria-label option in the <select>
*
* @since 1.0.0
*
* @param string $output HTML Output
* @param array $arguments wp_dropdown_category() arguments
* @return string Modified HTML Output
@n7studios
n7studios / wp-to-buffer-pro-custom-image.php
Last active May 30, 2023 12:49
WordPress to Buffer Pro: Programmatically specify status image(s)
<?php
/**
* Plugin Name: WP to Buffer Pro: Custom Image for Status
* Plugin URI: http://www.wpzinc.com/
* Version: 0.0.1
* Author: WP Zinc
* Author URI: http://www.wpzinc.com
* Description: Define a custom image for a status programmatically
*/
<?php
/**
* Adds a title attribute to iframe oembeds
*
* @since 1.0.0
*
* @param string $html HTML
* @param string $url URL to embed
* @param array $attributes HTML Attributes
* @param int $post_id Post ID