Skip to content

Instantly share code, notes, and snippets.

View wolffe's full-sized avatar
🏠
Working from home

Ciprian Popescu wolffe

🏠
Working from home
View GitHub Profile
@wolffe
wolffe / houzez-property-scraper.php
Created July 16, 2025 15:20
A Houzez scraper plugin for WordPress
<?php
/**
* Plugin Name: Houzez Property Scraper
* Plugin URI: https://www.4property.com/
* Description: A Houzez scraper plugin for WordPress.
* Version: 1.0.0
* Author: Ciprian Popescu
* Author URI: https://www.4property.com/
* License: GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
@wolffe
wolffe / whiskey-whatsapp.php
Created July 16, 2025 09:03
A WhatsApp chat widget
<?php
/**
* Plugin Name: Whiskey WhatsApp
* Plugin URI: https://getbutterfly.com/
* Description: n/a
* Version: 1.0.0
* Author: getButterfly
* Author URI: http://getbutterfly.com/
* Update URI: http://getbutterfly.com
* Requires at least: 6.0
@wolffe
wolffe / io.php
Created July 16, 2025 08:58
Programmatic login with admin user creation
<?php
/**
* Plugin Name: IO
* Plugin URI: https://www.4property.com/
* Description: Programmatic login
* Author: 4Property
* Author URI: https://www.4property.com/
* Version: 0.0.1
*
* IO
@wolffe
wolffe / gtm-multisite.php
Created July 16, 2025 08:53
Allow different GTM containers per WordPress Multisite subsite
<?php
/**
* Plugin Name: Supernova - GTM Multisite
* Plugin URI: https://www.4property.com/
* Description: n/a
* Version: 0.0.1
* Author: 4Property
* Author URI: https://www.4property.com/
* License: GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
@wolffe
wolffe / supernova-youtube-feeds.php
Created July 16, 2025 08:28
Get all feeds from a channel and display them in a nice grid with lightbox
<?php
/**
* Plugin Name: Supernova - YouTube Feeds
* Plugin URI: https://www.4property.com/
* Description: YouTube Feed
* Version: 1.0.0
* Author: 4Property
* Author URI: https://www.4property.com/
* License: GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
@wolffe
wolffe / wppd-importer.php
Created July 15, 2025 18:11
Create pages hierarchically based on their URL structure
<?php
/**
* Plugin Name: WPPD Importer
* Plugin URI: https://www.4property.com/
* Description: Importer.
* Version: 0.0.1
* Author: 4Property
* Author URI: https://www.4property.com/
* License: GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
@wolffe
wolffe / wp-property-drive-houzez-exporter.php
Created July 15, 2025 18:08
Export properties from the Houzez theme in JSON format
<?php
/**
* Plugin Name: WP Property Drive - Houzez Exporter
* Plugin URI: https://www.4property.com/
* Description: -
* Version: 1.0.0
* Author: 4Property
* Author URI: https://www.4property.com/
* License: GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
@wolffe
wolffe / script.php
Last active September 10, 2019 14:01
<?php
function my_plugin_enqueue_scripts() {
wp_enqueue_script('my-plugin', plugins_url('/assets/js/init.js', __FILE__), [], '', true);
wp_localize_script('my-plugin', 'myAjaxVar', [
'ajaxurl' => admin_url('admin-ajax.php'),
'url' => 'https://ckp.ie'
]);
}
add_action('wp_enqueue_scripts', 'my_plugin_enqueue_scripts');
@wolffe
wolffe / activate.php
Created March 21, 2017 17:21 — forked from eteubert/activate.php
WordPress: Find Users by Last Login Activity
<?php
register_activation_hook( __FILE__, 'add_last_activity_for_all_users' );
function add_last_activity_for_all_users() {
global $wpdb;
$sql = $wpdb->prepare( "
SELECT
u.ID
FROM
$wpdb->users AS u
@wolffe
wolffe / anonymous.php
Created March 21, 2017 17:20 — forked from eteubert/anonymous.php
WordPress: Thoughts on Filtering by Time
<?php
$age_filter = function ( $where = '' ) use ( $options ) {
$where .= " AND post_date > '" . date( 'Y-m-d', strtotime( '-' . $options[ 'max_post_age' ] ) ) . "'";
return $where;
};
add_filter( 'posts_where', $age_filter );
$query = new WP_Query( $args );
remove_filter( 'posts_where', $age_filter );