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 | |
function short_url($longUrl) { | |
$apiKey = 'MyAPIKey'; | |
$postData = array('longUrl' => $longUrl, 'key' => $apiKey); | |
$jsonData = json_encode($postData); | |
$curlObj = curl_init(); |
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
$(window).load(function() { | |
var head = $("iframe.twitter-timeline").contents().find("head"); | |
head.append($("<link/>", {rel: "stylesheet", href: "path/absolute/to/css", type: "text/css"})); | |
}); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.webServer> | |
<directoryBrowse enabled="false" /> | |
<rewrite> | |
<rules> | |
<rule name="TimThumb" stopProcessing="true"> | |
<match url="\.(jpg|jpeg|gif|png)$" /> | |
<conditions> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="false" /> |
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
@media (max-width: 767px) { | |
.text-left-xs { | |
text-align: left; | |
} | |
.text-center-xs { | |
text-align: center; | |
} | |
.text-right-xs { | |
text-align: right; | |
} |
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 | |
// Colocar en el functions.php | |
function metabox_callback() | |
{ | |
?> | |
<p>Aquí va el contenido...</p> | |
<?php | |
} |
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 | |
add_filter('rwmb_meta_boxes', function ($meta_boxes) { | |
$meta_boxes[] = array( | |
'id' => 'gallery', | |
'title' => 'Galería', | |
'pages' => array('page'), | |
'context' => 'normal', | |
'priority' => 'high', | |
'fields' => array( |
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
<form id="registerform" method="post" action="<?php home_url() ?>" name="loginform"> | |
<div class="form-group"> | |
<label for="user_login">Email</label> | |
<input type="text" class="form-control" name="user_login" id="user_login" placeholder="Tu email"> | |
</div> | |
<div class="form-group"> | |
<label for="user_password">Contraseña</label> | |
<input type="password" class="form-control" id="user_password" name="user_password" placeholder="Contraseña"> | |
</div> | |
<div class="form-group"> |
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 ($) { | |
$.fn.ajaxFormSubmit = function (options) { | |
var settings = $.extend({ | |
alertContainer: '', | |
callback: null | |
}, options); | |
if (typeof admin_url === 'undefined') | |
return this; | |
var fields = $(this).find('input, select, textarea').not(':disabled'); |
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 () { | |
jQuery('#formID').validationEngine('attach', { | |
showPrompts: false, | |
showArrow: false | |
}).bind("jqv.field.result", function (event, field, errorFound, prompText) { | |
var formGroup = field.parents(".form-group"); | |
formGroup.removeClass("has-feedback has-error has-success"); | |
if (errorFound) { | |
formGroup.addClass("has-feedback has-error"); | |
jQuery(formGroup).find("span.help-block, span.form-control-feedback").remove(); |