This file contains hidden or 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
FileETag none # Turn off eTags | |
<IfModule mod_expires.c> # Check that the expires module has been installed | |
ExpiresActive On | |
ExpiresDefault "access plus 10 years" | |
ExpiresByType image/gif "access plus 10 years" | |
ExpiresByType image/jpeg "access plus 10 years" | |
ExpiresByType image/png "access plus 10 years" | |
ExpiresByType text/css "access plus 10 years" | |
ExpiresByType text/html "access plus 1 seconds" | |
ExpiresByType text/javascript "access plus 10 years" |
This file contains hidden or 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
// GET FEATURED IMAGE | |
function ST4_get_featured_image($post_ID) { | |
$post_thumbnail_id = get_post_thumbnail_id($post_ID); | |
if ($post_thumbnail_id) { | |
$post_thumbnail_img = wp_get_attachment_image_src($post_thumbnail_id, 'featured_preview'); | |
return $post_thumbnail_img[0]; | |
} | |
} | |
// ADD NEW COLUMN |
This file contains hidden or 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 wp_gear_manager_admin_scripts() { | |
wp_enqueue_script('media-upload'); | |
wp_enqueue_script('thickbox'); | |
wp_enqueue_script('jquery'); | |
} | |
function wp_gear_manager_admin_styles() { | |
wp_enqueue_style('thickbox'); | |
} |
This file contains hidden or 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
<video src="video.ogv"> | |
video not supported | |
</video> | |
then you can use: | |
<script> | |
var video = document.getElementsByTagName('video')[0]; | |
video.onended = function(e) { | |
/*Do things here!*/ |
This file contains hidden or 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
/*! jQuery Mobile v1.3.2 | Copyright 2010, 2013 jQuery Foundation, Inc. | jquery.org/license */ | |
(function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function x(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function T(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=x(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function N(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function C(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function k(){g=!1}function L(){g=!0}f |
This file contains hidden or 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
/Obtener IP: | |
$_SERVER["HTTP_CLIENT_IP"]!=""?$ip=$_SERVER["HTTP_CLIENT_IP"]: | |
$ip=$_SERVER["REMOTE_ADDR"]; | |
//Función de obtención de IP (basado en la web de webhosting.info) | |
function getCountry($ip_address){ | |
//By Marc Palau (http://www.nbsp.es) | |
$url = "http://ip-to-country.webhosting.info/node/view/36"; | |
$inici = "src=/flag/?type=2&cc2="; | |
This file contains hidden or 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 | |
// Define the 'class' class | |
$class = Obj() | |
->fn('new', function ($class) { | |
$newClass = Obj($class->methods) | |
->fn('new', function($class) { | |
$obj = Obj($class->imethods); | |
$args = func_get_args(); | |
array_shift($args); |
This file contains hidden or 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
<? $númeroDeDias = intval(date("t",$mes)); ?> |
This file contains hidden or 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 | |
/** | |
* Translates a number to a short alhanumeric version | |
* | |
* Translated any number up to 9007199254740992 | |
* to a shorter version in letters e.g.: | |
* 9007199254740989 --> PpQXn7COf | |
* | |
* specifiying the second argument true, it will | |
* translate back e.g.: |