Skip to content

Instantly share code, notes, and snippets.

@justintadlock
justintadlock / register-post-type.php
Last active July 17, 2024 10:14
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
@fazlurr
fazlurr / WP_Query_Args.php
Last active July 18, 2024 20:12 — forked from billerickson/gist:3698476
WP_Query arguments list
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@growdev
growdev / update_next_payment.php
Created February 16, 2021 17:05
Update next payment date for subscribers
<?php
/**
* Update next payment date for subscriptions.
* Run this script using WP CLI:
* $ wp eval-file update_next_payment.php
*/
$subs = [
// ids of subscriptions to update
];