Skip to content

Instantly share code, notes, and snippets.

View joseluis's full-sized avatar
💭
dreamin' n workin'

José Luis Cruz joseluis

💭
dreamin' n workin'
View GitHub Profile
@joseluis
joseluis / style.scss
Last active August 29, 2015 14:01 — forked from luetkemj/style.css
/* =============================================================================
WordPress WYSIWYG Editor Styles
========================================================================== */
.entry-content img {
margin: 0 0 1.5em 0;
max-width: 100%;
height: auto;
}
.alignleft, img.alignleft {
<?php
/**
* Debugging WordPress things.
*
* All of this belongs in your wp-config.php file.
*
* This will make sure that the code you release is, at a minimum,
* relatively free of PHP notices and warnings.
*
* - WP_DEBUG: This turns on debugging mode.
<wpcf-fields-select-option-australia>
<title>Australia</title>
<value>1</value>
</wpcf-fields-select-option-australia>
<wpcf-fields-select-option-canada>
<title>Canada</title>
<value>2</value>
</wpcf-fields-select-option-canada>
<wpcf-fields-select-option-france>
<title>France</title>
// --------------------------------------------------------------------------------------
// A More Modern Scale for Web Typography
// Based on this article: http://typecast.com/blog/a-more-modern-scale-for-web-typography
// --------------------------------------------------------------------------------------
$body-font-size: 1em !default;
// Adjusts body typography to be default
// for each browser.
@mixin reset-body-font-size($font-size: 100%, $size-adjustment: 0.5) {
@joseluis
joseluis / _typography.scss
Created November 8, 2015 12:20 — forked from mikedidthis/_typography.scss
A More Modern Scale for Web Typography - With REMS
// Modern Scale for Web Typography
// Ref: http://typecast.com/blog/a-more-modern-scale-for-web-typography
// -----------------------------------------------------------------------------
// Mobile
// -----------------------------------------------------------------------------
// Elem | Font | Line
// -----------------------------------------------------------------------------
// Body | 16px | 20px
// h1 | 32px | 40px
// h2 | 26px | 30px
<?php
add_action( 'admin_init', function() {
// remove the color scheme picker
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
// force all users to use the "Ectoplasm" color scheme
add_filter( 'get_user_option_admin_color', function() {
return 'ectoplasm';
<?php
add_action( 'template_redirect', function() {
global $wp_query;
if ( is_home() || $wp_query->is_singular( 'post' ) || $wp_query->is_post_type_archive( 'post' ) ) {
header( $_SERVER[ 'SERVER_PROTOCOL' ] . ' 404 Not Found' );
$wp_query->set_404();
}
<?php
if ( ! is_admin() ) {
add_action( 'parse_query', function( $query ) {
if ( $query->is_search ) {
unset( $_GET['s'], $_POST['s'], $_REQUEST['s'] );
$query->set( 's', '' );
$query->is_search = false;
$query->set_404();
header( $_SERVER[ 'SERVER_PROTOCOL' ] . ' 404 Not Found' );
<?php
add_action( 'do_feed_rdf', function() { wp_redirect( home_url(), 301 ); exit; }, 1);
add_action( 'do_feed_rss', function() { wp_redirect( home_url(), 301 ); exit; }, 1);
add_action( 'do_feed_rss2', function() { wp_redirect( home_url(), 301 ); exit; }, 1);
add_action( 'do_feed_atom', function() { wp_redirect( home_url(), 301 ); exit; }, 1);
add_action( 'init', function() {
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
});