Skip to content

Instantly share code, notes, and snippets.

View teolopez's full-sized avatar
🤓

Teodoro Lopez teolopez

🤓
View GitHub Profile
@teolopez
teolopez / registration-code.php
Created January 18, 2014 20:02
// Register Error if ID code does not match. for functions.php
//----------------------------------------------
// Register Error if ID code does not match.
//----------------------------------------------
function myplugin_check_fields($errors, $sanitized_user_login, $user_email) {
$mystring = $user_email;
$findme = '.edu';
$pos = strpos($mystring, $findme);
@teolopez
teolopez / gist:8495434
Created January 18, 2014 20:02
adding meta area for user accounts table structure
<table class="form-table">
<tr>
<th scope="row">Title</th>
<td></td>
</tr>
</table>
@teolopez
teolopez / functions_wplogin.php
Created January 18, 2014 09:57
Change the WP Logo Link to your site and the text in the tooltip.
function myprefix_loginpage_custom_link() {
return get_bloginfo( 'url' );
}
add_filter('login_headerurl','myprefix_loginpage_custom_link');
function myprefix_change_title_on_logo() {
return 'My Tooltip';
}
add_filter('login_headertitle', 'myprefix_change_title_on_logo');
@teolopez
teolopez / gist:7999129
Created December 17, 2013 02:43
REPLACING THE -9999PX HACK (NEW IMAGE REPLACEMENT)
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@teolopez
teolopez / config.rb
Created December 16, 2013 01:26
compass config
# Require any additional compass plugins here.
add_import_path "bower_components/foundation/scss"
require 'fileutils'
on_stylesheet_saved do |file|
if File.exists?(file) && File.basename(file) == "style.css"
puts "Moving: #{file}"
FileUtils.mv(file, File.dirname(file) + "/../" + File.basename(file))
end
end
@teolopez
teolopez / current-user
Created December 4, 2013 20:54
WordPress Current user
<?php global $current_user;
// get_currentuserinfo();
// echo 'Username: ' . $current_user->user_login . "\n";
// echo 'User email: ' . $current_user->user_email . "\n";
// echo 'User first name: ' . $current_user->user_firstname . "\n";
// echo 'User last name: ' . $current_user->user_lastname . "\n";
// echo 'User display name: ' . $current_user->display_name . "\n";
// echo 'User ID: ' . $current_user->ID . "\n";
?>
@teolopez
teolopez / functions.php
Last active December 29, 2015 05:29
My functions.php file for WordPress Theme with some starter actions/filters. Please remember to Prefix function names, to do so simply replace the word PREFIX in this file with the themes name. Or create a custom prefix. To learn more on how to build a functions.php file head over to Justin Tadlock site and read this article: http://justintadloc…
<?php
// -------------------------------------------------
// Remember to replace the word prefix in the function name and actions/filters to the themes name, use find replace for quick change.
// -------------------------------------------------
add_action( 'after_setup_theme', 'prefix_theme_setup' );
function prefix_theme_setup() {
global $content_width;
// Opacity should be on a 100 point scale (0-100 instead of 0.0-1.0)
// This should be used to supplement a normal border definition as it
// only deals with the 'border-color' property.
@mixin border-opacity($color, $opacity) {
$opacity: $opacity / 100;
// Unsupporting browsers get this
border-color: $color;
// Browsers that support RGBA will get this instead
@teolopez
teolopez / flatuicolors.scss
Last active December 28, 2015 13:08
flatuicolors
$turquoise: #1abc9c;
$emerland: #2ecc71;
$peter-river: #3498db;
$amethyst: #9b59b6;
$wet-asphalt: #34495e;
$green-sea: #16a085;
$nephritis: #27ae60;
$belize-hole: #2980b9;
$wisteria: #8e44ad;
$midnight-blue: #2c3e50;
$lightgray : #819090;
$gray : #708284;
$mediumgray : #536870;
$darkgray : #475B62;
$darkblue : #0A2933;
$darkerblue : #042029;
$paleryellow : #FCF4DC;
$paleyellow : #EAE3CB;
$yellow : #A57706;
$orange : #BD3613;