Skip to content

Instantly share code, notes, and snippets.

Andres Gonzalez RyuuZaky

Block or report user

Report or block RyuuZaky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RyuuZaky
RyuuZaky / wordpress-query-args.php
Last active Nov 12, 2016 — forked from billerickson/gist:3698476
Wordpress Query Arguments ($args)
View wordpress-query-args.php
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@RyuuZaky
RyuuZaky / hide-editor.php
Created Nov 12, 2016 — forked from ramseyp/hide-editor.php
Hide the content editor for certain pages in WordPress
View hide-editor.php
<?php
/**
* Hide editor on specific pages.
*
*/
add_action( 'admin_init', 'hide_editor' );
function hide_editor() {
// Get the Post ID.
@RyuuZaky
RyuuZaky / gist:fe9ad6d2282721f53e98246df33f1ec8
Created Oct 24, 2016 — forked from ymirpl/gist:1052094
Python unicode e-mail sending
View gist:fe9ad6d2282721f53e98246df33f1ec8
#coding: utf-8
from cStringIO import StringIO
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from email import Charset
from email.generator import Generator
import smtplib
# Example address data
@RyuuZaky
RyuuZaky / gist:3feac27fd1fc54675ea9d46226c20164
Created Oct 21, 2016 — forked from thomasgriffin/gist:4159035
Add custom post types to search results in WordPress.
View gist:3feac27fd1fc54675ea9d46226c20164
<?php
add_filter( 'pre_get_posts', 'tgm_io_cpt_search' );
/**
* This function modifies the main WordPress query to include an array of
* post types instead of the default 'post' post type.
*
* @param object $query The original query.
* @return object $query The amended query.
*/
function tgm_io_cpt_search( $query ) {
You can’t perform that action at this time.