This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var width = window.innerWidth; | |
$(document).ready(function() { | |
$(".fancybox").fancybox({ | |
beforeShow : function() { | |
var alt = "Watch more <a href='mypage.html'>videos</a>"; | |
this.title = alt; | |
}, | |
helpers : { | |
title: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** The name of the database for WordPress */ | |
define('DB_NAME', 'mydb_wp1'); | |
define('DB_USER', 'mydb_usr1'); | |
define('DB_PASSWORD', 'lalalalala'); | |
define('DB_HOST', 'localhost'); | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
# alias ls='ls --color' | |
# Aliases | |
# alias ls='ls -al' | |
# alias pl='pwd; ls' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
usage > centerPop('http://mypage.com/','mypage','575','440');" | |
*/ | |
function centerPop(url, title, w, h) { | |
var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left; | |
var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top; | |
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; | |
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********** ADD IMAGES TO RSS FEED | |
you can set the position of the image changing the order like this | |
$content = $content . get_the_post_thumbnail( $post->ID, 'thumbnail' ); | |
*/ | |
function featured_images_rss($content) { | |
global $post; | |
if ( has_post_thumbnail( $post->ID ) ){ | |
$content = get_the_post_thumbnail( $post->ID, 'thumbnail' ) . $content; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************** | |
Sass Processor */ | |
@mixin processor($function, $params) { | |
-webkit-#{$function}: $params; | |
-moz-#{$function}: $params; | |
-ms-#{$function}: $params; | |
-o-#{$function}: $params; | |
#{$function}: $params; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="content"> | |
<h3>MEDIUM POSTS</h3> | |
<div class="row"> | |
<?php | |
$xml = simplexml_load_file('https://medium.com/feed/@leowebdev', null, LIBXML_NOCDATA); | |
function get_image($handler) { //get image from post body | |
preg_match('/src="([^"]*)"/', $handler, $matches); | |
return str_replace('/600/200/','/300/150/',$matches[1]); //change image size from 600x200 into 300x150 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('pre_get_posts','search_filter', 99); //use 99 to override/priorize this filter | |
function search_filter( $query ) | |
{ | |
if ( $query->is_search ) | |
{ | |
//use this for more than one post type; | |
$query->set( 'post_type', array('post','page','jobpost') ); | |
//use this (uncomment) for only one post type | |
//$query->set( 'post_type', 'post' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$('#submit').click(function (e) { | |
var isValid = true; | |
$('#firstname,#lastname,#email,#password').each(function () { | |
if ($.trim($(this).val()) == '') | |
{ | |
isValid = false; | |
$(this).css({ | |
"border": "1px solid red", | |
"background": "#FFCECE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_core_updates(){ | |
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,); | |
} | |
add_filter('pre_site_transient_update_core','remove_core_updates'); | |
add_filter('pre_site_transient_update_plugins','remove_core_updates'); | |
add_filter('pre_site_transient_update_themes','remove_core_updates'); |