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
To disable: | |
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false | |
defaults write -g NSScrollAnimationEnabled -bool false | |
defaults write -g NSWindowResizeTime -float 0.001 | |
defaults write -g QLPanelAnimationDuration -float 0 | |
defaults write -g NSScrollViewRubberbanding -bool false | |
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false | |
defaults write -g NSToolbarFullScreenAnimationDuration -float 0 | |
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0 | |
defaults write com.apple.dock autohide-time-modifier -float 0 |
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('wp_head', 'show_template'); | |
function show_template() { | |
global $template; | |
echo basename($template); | |
} |
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
{ | |
"data": { | |
"reviewer": [ | |
{ | |
"id": 1, | |
"name": "susan smith", | |
"job": "web developer", | |
"text": "I'm baby meggings twee health goth +1. Bicycle rights tumeric chartreuse before they sold out chambray pop-up. Shaman humblebrag pickled coloring book salvia hoodie, cold-pressed four dollar toast everyday carry" | |
}, | |
{ |
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 custom editor font sizes. | |
add_theme_support( | |
'editor-font-sizes', | |
array( | |
array( | |
'name' => __( 'Smallest', 'dariobf' ), | |
'shortName' => __( 'XXS', 'dariobf' ), | |
'size' => '.625rem', | |
'slug' => 'smallest', | |
), |
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
// Lo enganchamos en la acción init y llamamos a la función create_book_taxonomies() cuando arranque | |
add_action( 'init', 'create_book_taxonomies', 0 ); | |
// Creamos dos taxonomías, género y autor para el custom post type "libro" | |
function create_book_taxonomies() { | |
/* Configuramos las etiquetas que mostraremos en el escritorio de WordPress */ | |
$labels = array( | |
'name' => _x( 'Géneros', 'taxonomy general name' ), | |
'singular_name' => _x( 'Género', 'taxonomy singular name' ), | |
'search_items' => __( 'Buscar por Género' ), |
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
/** * Completely Remove jQuery From WordPress */ | |
function my_init() { | |
if ( ! is_admin() ) { | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', false ); | |
} | |
} | |
add_action( 'init', 'my_init' ); | |
/** * Completely Remove jQuery From WordPress Admin Dashboard */ | |
add_action( 'wp_enqueue_scripts', 'no_more_jquery' ); |
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( 'init', 'bf_register_custom_post_type' ); | |
/** | |
* Registro un custom post type 'libro'. | |
* | |
* @link http://codex.wordpress.org/Function_Reference/register_post_type | |
*/ | |
function bf_register_custom_post_type() { | |
/* Añado las etiquetas que aparecerán en el escritorio de WordPress */ | |
$labels = array( | |
'name' => _x( 'Libros', 'post type general name', 'text-domain' ), |
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
/** | |
* Adds comments just before content, nothing between them | |
*/ | |
add_filter( 'the_content', 'bf_comments_content', 10); | |
function bf_comments_content( $content) { | |
if( is_single() && comments_open() ) { | |
ob_start(); | |
comments_template(); | |
$comments = ob_get_contents(); | |
ob_end_clean(); |
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 convuls_customquery(){ | |
// Set the arguments based on our get parameters | |
$today = date('Ymd',strtotime('today')); | |
$args = array ( | |
'post_type' => 'evento', | |
'posts_per_page' => -1, | |
'meta_key' => 'fecha', | |
'meta_query' => array( | |
'event_selected' =>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
<?php | |
// Registramos una ruta nueva para la rest api | |
add_action( 'rest_api_init', function () { | |
register_rest_route( 'convulsio/v2', '/convulsio-events/', | |
array( | |
'methods' => 'GET', | |
'callback' => 'convuls_customquery' | |
) | |
); | |
}); |
NewerOlder