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
public function cleanup_shortcode_fix($content) { | |
$array = array('<p>[' => '[', ']</p>' => ']', ']<br />' => ']', ']<br>' => ']'); | |
$content = strtr($content, $array); | |
return $content; | |
} | |
add_filter('the_content', 'cleanup_shortcode_fix'); |
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 under_construcction() { | |
if ( ! is_page('login') ) { | |
if ( ! is_user_logged_in() ) { | |
wp_redirect( '/en-construccion/', 301 ); // o puedes redireccionar a una página dentro de WordPress, utilizando get_permalink(); | |
exit; | |
} | |
} | |
} | |
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 /** | |
* Template Name: Pre Home | |
*/?> | |
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>PATAGONIA BLUE</title> | |
</head> |
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_action( 'hook', 'funcion', $prioridad, $argumentos ); ?> |
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 wpxp_load_styles() { | |
// Carga los estilos de este tema hijo | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
// Carga la tipografia Exo de Google | |
wp_enqueue_style( 'google-exo', 'https://fonts.googleapis.com/css?family=Exo' ); | |
} |
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 installation and activation for WordPress themes. | |
* | |
* @package TGM-Plugin-Activation | |
* @version 2.4.0 | |
* @author Thomas Griffin <thomasgriffinmedia.com> | |
* @author Gary Jones <gamajo.com> | |
* @copyright Copyright (c) 2012, Thomas Griffin | |
* @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later |
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
#Put this file in wp-content/uploads and modify remote domain. | |
#Copia este arhivo en wp-content/uploads and modifica el dominio remoto. | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /wp-content/uploads/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*) http://remotedomain.tld/wp-content/uploads/$1 [L,P] | |
</IfModule> |
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 | |
/** | |
* Agrega un RSS de noticias al Dashboard de WordPress | |
*/ | |
function wpe_add_dashboard_widgets() { | |
wp_add_dashboard_widget( 'dashboard_custom_feed', 'Noticias de WP Expertos', 'wpe_rss_widget' ); | |
} |
OlderNewer