Skip to content

Instantly share code, notes, and snippets.

View stickhandle's full-sized avatar

Werner Siemens stickhandle

View GitHub Profile
<?php
/* Register custom post types on the 'init' hook. */
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 0.1.0
* @access public
(function($) {
$(function() {
$(".print").live('click', function(e) {
e.preventDefault();
// remove old printframe
$("#printframe").remove();
// create new printframe
Test
Test
Test
<?php
function qw_delete_spam_comments() {
$in_progress = (bool) get_site_option( 'qw_delete_in_progress' );
if ( ! $in_progress ) {
global $wpdb;
update_site_option( 'qw_delete_in_progress', '1' );
<?php
//** Redirect if not logged in
add_action( 'template_redirect', function() {
if ( ! is_user_logged_in() ) {
wp_redirect( wp_login_url() );
exit;
}
} );
<?php
//** Redirect if not logged in
add_action( 'template_redirect', function() {
if ( ! is_user_logged_in() ) {
wp_redirect( wp_login_url() );
exit;
}
} );
<?php
//** Redirect if not logged in
add_action( 'template_redirect', function() {
if ( ! is_user_logged_in() ) {
wp_redirect( wp_login_url() );
exit;
}
} );
<?php
//** Redirect if not logged in
add_action( 'template_redirect', function() {
if ( ! is_user_logged_in() ) {
wp_redirect( wp_login_url() );
exit;
}
} );