Skip to content

Instantly share code, notes, and snippets.

View moabi's full-sized avatar
🎯
Focusing

David Fieffé moabi

🎯
Focusing
View GitHub Profile
@moabi
moabi / class-backend-tables.php
Created December 10, 2015 19:59 — forked from wturnerharris/class-backend-tables.php
This is an example of extending the default class for tables in the admin section, WP_List_Table. It does take some setup arguments, but works and looks seamlessly within WordPress.
<?php
if(!class_exists('WP_List_Table')) require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
/**
* Extended class for displaying a list of items in an HTML table.
*
* @usage
* // be sure to modify the display_rows function to customize the output of the rows
* $args = array(
@moabi
moabi / wp_helper.sh
Created December 9, 2017 08:45 — forked from phlbnks/wp_helper.sh
Utility script to help manage WordPress sites on an EasyEngine server (but not limited to EE)
#!/bin/bash
# Help / usage info.
USAGE=$'WordPress Helper script, built for EasyEngine but should be widely compatible.\nWithout any args it will search /var/www/ for WordPress sites, loop over them in alphabetical order and check for core and plugin updates.\nAlso accepts:\n\t--sites=[space seperated list of site paths relative to /var/www]\n\t--update=[plugins|wp|all].'
# Die function for exiting on errors.
die () {
echo "${1}, exitting..." >&2 ; echo ; exit 1
}