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
/** | |
* BetaBeers React Native App with WP REST API v 1.0 | |
*/ | |
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
StyleSheet, | |
Text, |
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
# IPs whitelist - block | |
# deny all Ips | |
# allow only certain IPs or IP range | |
ErrorDocument 403 /error403.html | |
order deny,allow | |
deny from all | |
allow from xx.xx.xx.xx | |
allow from 55.99.66.111 | |
allow from 55.99.66.0/23 | |
allow from 55.99.66.0/24 |
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
// Dequeue CSS Styles and JavaScript Scripts in child theme | |
// Dequeue Styles | |
function dequeue_unnecessary_styles() { | |
wp_dequeue_style( 'bootstrap-map' ); | |
wp_deregister_style( 'bootstrap-map' ); | |
} | |
add_action( 'wp_print_styles', 'dequeue_unnecessary_styles' ); | |
// Dequeue JavaScripts |
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 | |
$uri = 'http://www.dominio.com/wp-json/wp/v2/posts/?page=1&per_page=3'; | |
$json = file_get_contents($uri); | |
$posts= json_decode($json); | |
echo "<h1>Listado de entradas</h1><ul>"; | |
foreach ($posts as $post) { | |
echo "<h2><a href='" . $post->link . "'>" . $post->title->rendered . "</a></h2>\n"; | |
echo "<p>" . $post->excerpt->rendered . "</p>"; | |
echo "<p><a href='" . $post->link . "'>Enlace directo</a></p>\n"; |
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
# WP Super Cache + Leverage Browser Caching WordPress .htaccess | |
# http://notlaura.com/wp-super-cache-and-browser-caching/ | |
# BEGIN WPSuperCache | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible | |
AddDefaultCharset UTF-8 | |
RewriteCond %{REQUEST_URI} !^.*[^/]$ |
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 | |
/** | |
* | |
* Customizing WordPress Admin Panel Plugin | |
* | |
* @link https://www.fernan.com.es/ | |
* @since 1.0.0 | |
* | |
* Plugin Name: Customizing WordPress Admin Panel Plugin | |
* Plugin URI: https://www.betabeers.com/blog/ |
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 | |
// Create menu section under Tools in WordPress admin | |
add_action( 'admin_menu', 'docs_admin_menu' ); | |
// New section under Tools | |
function docs_admin_menu() { | |
add_management_page( 'Docs', 'Docs', 'manage_categories', 'docs', 'content_docs_admin_menu' ); | |
} |
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
// Añadir Shortcode | |
function dummyimage_shortcode_function( $atts ) { | |
// Atributos | |
$atts = shortcode_atts( | |
array( | |
'width' => '600', | |
'height' => '300', | |
'background' => 'eeeeee', | |
'text' => 'ffffff', |
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
User-agent: Bingbot | |
Disallow: / |
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
# Redirect from old domain to new domain | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR] | |
RewriteCond %{HTTP_HOST} ^www.olddomain.com$ | |
RewriteRule (.*)$ https://www.newdomain.com/$1 [R=301,L] |
NewerOlder