post_type
= edd_payment
_edd_sl_is_renewal
= Flag to indicate an renewal.
_edd_sl_renewal_key
= The renewal key.
<?php | |
function prefix_init() { | |
register_post_type( 'project', array( | |
'public' => true, | |
'label' => __( 'Projects', 'text_domain' ), | |
'has_archive' => true, | |
'rewrite' => array( 'slug' => _x( 'projects', 'slug', 'text_domain' ) ), | |
) ); | |
} |
<?php | |
if ( is_post_type_archive() ) { | |
$object = get_queried_object(); | |
if ( isset( $object->rewrite ) && is_array( $object->rewrite ) && isset( $object->rewrite['slug'] ) ) { | |
$slug = $object->rewrite['slug']; | |
$page = get_page_by_path( $slug ); |
<?php | |
class PronamicSponsorsPlugin { | |
/** | |
* Constructs and initalizes an sponsor plugin | |
* | |
* @param string $file | |
*/ | |
public function __construct( $file ) { | |
$this->file = $file; |
jQuery( document ).ready( function( $ ) { | |
// Image | |
// @see https://github.com/WordPress/WordPress/blob/4.1/wp-includes/js/media-editor.js#L721-L739 | |
$( '.pronamic-image-control' ).on( 'click', '.set-post-image', function( event ) { | |
event.preventDefault(); | |
var $imageControl = $( event.delegateTarget ); | |
var config = $imageControl.data( 'image-control' ); |
# jQuery UI Droppable in iframe element | |
* http://jqueryui.com/draggable/ | |
* http://jqueryui.com/droppable/ | |
* http://stackoverflow.com/a/12171319 |
Google Mails has somehting like this in the select labels dropdown.
server { | |
listen 80; | |
server_name *.dev; | |
root /Users/remco/Websites/$host/; | |
access_log /usr/local/etc/nginx/logs/default.access.log main; | |
location / { | |
include /Users/remco/Websites/php-fpm.conf; |
<?php | |
class AseTheme { | |
public function __construct() { | |
add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ) ); | |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); | |
// ... | |
} |