Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Custom General Settings
* .
* Crear variables modificables para ReCaptcha-keysite
* - KeySite : cgs_keysite
* - KeySecret: cgs_keysecret
*/
@enlacee
enlacee / discover-one.php
Created August 27, 2016 07:08
Crear un super usuario y enviar un mensaje con todos los users administradores en wordpress
<?php
/**
* Plugin Name: Discover one
* Plugin URI: http://www.pprios.com
* Description: Utilidad .
* Version: 1.0.0
* Author: Pepe Rios
* Author URI: http://www.pprios.com
*/
app/wp-content/themes/lbel2/headerCountrySelect.php:7
echo getCurrentURL()
function getCurrentURL()
{
$currentURL = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://";
$currentURL .= $_SERVER["SERVER_NAME"];
if ($_SERVER["SERVER_PORT"] != "80" && $_SERVER["SERVER_PORT"] != "443") {
$currentURL .= ":".$_SERVER["SERVER_PORT"];
UPDATE your_table
SET your_field = REPLACE(your_field, 'articles/updates/', 'articles/news/')
WHERE your_field LIKE '%articles/updates/%'
<div class="fake_background">
<!-- Editable Dropdown -->
<div id="kind">
<div id="current_selection" class="kind_selection">:nth-child</div>
<div id="kind_arrow" class="selection_arrows">
<span class="bottom_arrow">▼</span>
</div>
<ul id="kind_options" class="selection_options">
<li data-value=":nth-child" class="selected">:nth-child</li>
<li data-value=":nth-of-type">:nth-of-type</li>
<?php
$args = array(
'post_type' => 'post',
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'post_tag',
'field' => 'slug',
'terms' => 'tag-1'
),
<?php
// create two taxonomies, genres and writers for the post type "book"
function create_book_taxonomies() {
// Add new taxonomy, make it hierarchical (like categories)
$labels = array(
'name' => _x( 'Genres', 'taxonomy general name' ),
'singular_name' => _x( 'Genre', 'taxonomy singular name' ),
'search_items' => __( 'Search Genres' ),
'all_items' => __( 'All Genres' ),
'parent_item' => __( 'Parent Genre' ),
<?php
/**
* primera letra en mayuscula multibyte
*/
mb_convert_case(mb_strtolower($user_info->display_name), MB_CASE_TITLE, 'UTF-8');
@enlacee
enlacee / plugin.php
Created July 12, 2016 07:27
plugin table wordpress
<?php
/**
* Custom AJAX List Table Example
*
* Custom AJAX List Table Example is a WordPress Plugin example of WP_List_Table
* AJAX implementation. It is a fork of Matt Van Andel's Custom List Table Example
* plugin.
*
* Plugin Name: Custom AJAX List Table Example
* Plugin URI: https://github.com/Askelon/Custom-AJAX-List-Table-Example
/* HTML
* <meta name="viewport" content="width=device-width">
*/
/**********************************************************
* MOBILE
***********************************************************/
@media screen and(min-width: 780px) and (max-width: 1024px){
}
@media screen and(min-width: 480px) and (max-width: 780px){
}