A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer
- Composer Related
- Frameworks
- Micro Frameworks
ul.tags { | |
display: inline; | |
margin: 0; | |
padding: 0; | |
} | |
ul.tags li { | |
display: inline; | |
list-style: none; | |
margin: 0; |
<?php | |
/* | |
Plugin Name: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
<!-- Prevent FOUC (flash of unstyled content) - http://johnpolacek.com/2012/10/03/help-prevent-fouc/ --> | |
<style type="text/css"> | |
.no-fouc {display: none;} | |
</style> | |
<script type="text/javascript"> | |
document.documentElement.className = 'no-fouc'; | |
// add to document ready: $('.no-fouc').removeClass('no-fouc'); | |
</script> |
<?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 | |
*/ |
//* Register widget areas | |
genesis_register_sidebar( array( | |
'id' => 'parallax-section-below-header', | |
'name' => __( 'Parallax Section Below Header', 'your-theme-slug' ), | |
'description' => __( 'This is the parallax section below header.', 'your-theme-slug' ), | |
) ); | |
genesis_register_sidebar( array( | |
'id' => 'parallax-section-above-footer', | |
'name' => __( 'Parallax Section Above Footer', 'your-theme-slug' ), |
<?php | |
class My_Plugin_Options { | |
var $options; | |
var $option_name; | |
var $is_site_option; // Are we using Multisite and saving to global options? | |
function My_Plugin_Options($option_name, $is_site_options = false){ | |
$this->option_name = $option_name; | |
$this->is_site_option = $is_site_options; | |
if($this->is_site_option){ |
Taken from:https://github.com/dnschneid/crouton/wiki/Build-kernel-headers-and-install-Virtualbox-(x86) | |
https://github.com/dnschneid/crouton/wiki/Build-kernel-headers-and-install-Virtualbox-(x86) | |
only pasted here so I can be sure I will always have it. | |
NB: do this ALTERNATIVE INSTEAD(it solves multi reboots on vagrant up) | |
1. build kernel headers as per this diff method: https://github.com/divx118/crouton-packages/blob/master/README.md | |
ie: from a shell in ua chroot(ubuntu) | |
$ cd ~ | |
$ wget https://raw.githubusercontent.com/divx118/crouton-packages/master/setup-headers.sh |
function third_party_tab( $tabs ) { | |
global $product; | |
$some_check = $product ? third_party_check( $product->id ) : null; | |
if ( $product && ! $some_check ) { | |
return $tabs; | |
} | |
$tabs['third_party_tab'] = array( |
<?php | |
// The ID of the lists you want to add a user to | |
$list_ids = array( 1 ); | |
// User Data without the custom fields | |
$data_subscriber = array( | |
'user' => array( | |
'email' => '[email protected]', | |
'firstname' => 'John', | |
'lastname' => 'Doe', |