Skip to content

Instantly share code, notes, and snippets.

View kamalahmed's full-sized avatar
💻
Learning & working in a silent mode

Kamal Ahmed kamalahmed

💻
Learning & working in a silent mode
View GitHub Profile
<?php
/**
* Functions
*
* @package amgeddotme2017
*/
/**
Updating the below article to work with Bootstrap 4
@kamalahmed
kamalahmed / gist:ed55e4cd8a226c6ffcb8c88b1ce70b58
Created July 30, 2017 08:37 — forked from toddlahman/gist:6302280
Save Plugin Error Messages in the database for The Plugin Generated x Characters of Unexpected Output During Activation errors
<?php
function tl_save_error() {
update_option( 'plugin_error', ob_get_contents() );
}
add_action( 'activated_plugin', 'tl_save_error' );
/* Then to display the error message: */
@kamalahmed
kamalahmed / font-awesome.php
Created July 25, 2017 09:34 — forked from justintadlock/font-awesome.php
PHP array of Font Awesome icons.
<?php
// Font Awesome v. 4.6.
function jt_get_font_icons() {
return array(
'fa-glass' => 'f000',
'fa-music' => 'f001',
'fa-search' => 'f002',
'fa-envelope-o' => 'f003',
@kamalahmed
kamalahmed / example-wp-list-table.php
Last active January 16, 2017 16:34 — forked from paulund/example-wp-list-table.php
An example code of using the WP_List_Table class.With Pagination.
<?php
/*
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI: http://www.paulund.co.uk
* Author: Paul Underwood
* Author URI: http://www.paulund.co.uk
* Version: 1.0
* License: GPL2
*/