Skip to content

Instantly share code, notes, and snippets.

@rniswonger
rniswonger / wp-disable-plugin-update.php
Last active November 18, 2024 16:54
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
@deanoakley
deanoakley / wp-disable-plugin-update.php
Last active October 5, 2024 16:03 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin -
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Add to the core plugin file
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
$plugin_file_name = basename(__DIR__) . '/' . basename(__FILE__);
if ( isset( $value->response[$plugin_file_name] ) ) {
unset( $value->response[$plugin_file_name] );
@saifsultanc
saifsultanc / gppa-filter-advanced-select-search.php
Created October 31, 2024 15:30
gppa-filter-advanced-select-search.php
<?php
add_filter( 'gppa_object_type_query', function ( $query_builder_args, $args ) {
global $wpdb;
if ( ! wp_doing_ajax() || rgar( $_REQUEST, 'action' ) !== 'gp_advanced_select_get_gppa_results' ) {
return $query_builder_args;
}