Skip to content

Instantly share code, notes, and snippets.

View Stephen-Cronin's full-sized avatar

Stephen Cronin Stephen-Cronin

View GitHub Profile
<?php
/**
* Plugin Name: YOUR PLUGIN NAME
*/
include( dirname( __FILE__ ) . '/lib/requirements-check.php' );
$your_plugin_requirements_check = new YOUR_PREFIX_Requirements_Check( array(
'title' => 'YOUR PLUGIN NAME',
'php' => '5.4',
<?php
/**
* After creating the necessary table, run with `wp eval-file plugin-stats.php`
*/
use WP_CLI\Utils;
global $wpdb;
$original_request_url = 'https://wordpress.org/plugins/wp-json/plugins/v1/query-plugins?s=&posts_per_page=100';
@maddisondesigns
maddisondesigns / cookie-policy.md
Last active June 19, 2022 17:59
eCommerce Terms & Conditions and Privacy Templates
@danielbachhuber
danielbachhuber / gist:8af274e2b7f21c8c3bb6
Created July 3, 2014 14:40
Post-style permalinks for your custom post types
<?php
/**
* Post-style permalinks for your custom post types
* e.g. %year%/%monthnum%/%day%/%postname%
*/
function dbx_get_post_types() {
return array(
// replace with your custom post types
'my-custom-post-type'
);