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 | |
/** | |
* instalar CURL | |
* BASH | |
* sudo apt-get install curl libcurl3 libcurl3-dev php5-curl | |
* | |
* public function parse_request() | |
*/ | |
} else if ($wp->query_vars['action_to'] == '-make') { |
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 | |
/** | |
* Plugin Name: Anibal XZ | |
* Plugin URI: http://acopitan.blogspot.com | |
* Description: Test register and unregister data:options. | |
* Version: 1.0.0 | |
* Author: Anibal C | |
* Author URI: http://acopitan.blogspot.com | |
* License: GPL2 | |
*/ |
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 | |
$str = "<p>texto p1</p>" . | |
"<p>texto p2</p>" . | |
"<ul>" . | |
"<li>lista 1</li>" . | |
"<li>lista 2</li>" . | |
"</ul>"; | |
if (preg_match('%(<p[^>]*>.*?</p>)%i', $str, $regs)) { | |
$r = $regs[1]; |
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
# ! /bin/bash | |
# create backup | |
# comprimir: | |
# tar -zcvf /home/Escritorio compress.tar.gz | |
# descomprimir: | |
# tar -zxvf merge.esika.tar.gz -C /home/anb/Documentos/ | |
BASE="$HOME/Escritorio" | |
ME_DATE=`date +%Y-%m-%d:%H:%M:%S` |
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
$search_array = array( | |
'role' => '', | |
'region' => '', | |
'parent' => '', | |
'title' => '', | |
'id' => '' | |
); | |
if (array_key_exists($key, $search_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
/* | |
* button share *meencantaloqueveo* | |
*/ | |
popup = function(t, e) { | |
if (e.preventDefault) e.preventDefault(); | |
else e.returnValue = false; | |
var $t = t, _href = ""; | |
if ($t.getAttribute('data-href')) _href = $t.getAttribute('data-href'); | |
else _href = $t.getAttribute('href'); |
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 (min-width: 320px) and (max-width:768px){ | |
} | |
@media (min-width: 360px) and (max-width:768px){ | |
} | |
@media (min-width: 375px) and (max-width:768px){ | |
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.php | |
add_action('wpcf7_posted_data','saveExtraFieldForContantForm7'); | |
/** | |
* Save new input *origin-device* for Contact Form 7 | |
*/ | |
function saveExtraFieldForContantForm7($posted_data) | |
{ | |
require_once dirname(__FILE__).'/includes/class/Mobile_Detect.php'; | |
$detect = new Mobile_Detect(); |
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_action("wpcf7_before_send_mail", "wpcf7_do_something"); | |
function wpcf7_do_something($WPCF7_ContactForm) | |
{ | |
if (/*224 == $WPCF7_ContactForm->id()*/ $WPCF7_ContactForm->id() > 0) { | |
//Get current form | |
$wpcf7 = WPCF7_ContactForm::get_current(); | |
// get current SUBMISSION instance |
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
// relacionar evento click | |
$('.lista-preguntas').delegate('p', 'click',function(e) { | |
var $ver = $(this).parent().find('a.ver-mas'); | |
$ver[0].click(); | |
}); |