This file contains hidden or 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 ignacio_import_hack( $value ) { | |
| if ( ! post_type_exists( 'et_pb_layout' ) ) { | |
| register_post_type( 'et_pb_layout' ); | |
| } | |
| if ( ! taxonomy_exists( 'layout_type' ) ) { | |
| register_taxonomy( 'layout_type', 'et_pb_layout' ); | |
| } |
This file contains hidden or 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_filter( 'psts_setting_checkout_url', 'katarzyna_nbt_pro_sites_checkout_url' ); | |
| function katarzyna_nbt_pro_sites_checkout_url( $value ) { | |
| global $pagenow, $psts; | |
| if ( ! is_object( $psts ) ) | |
| return $value; | |
| $show_signup = $psts->get_setting( 'show_signup' ); |
This file contains hidden or 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( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); | |
| function theme_enqueue_styles() { | |
| wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
| } |
This file contains hidden or 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( 'customize_register', 'kirki_hooks_customize_register' ); | |
| function kirki_hooks_customize_register( $wp_customize ) { | |
| class Kirki_Customize_Control_Repeater_Setting extends WP_Customize_Setting { | |
| /** | |
| * In Repeater, one setting is one row full of settings | |
| * fields save all the fields and their types |
This file contains hidden or 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
| if ( ! function_exists('generate_concerts_post_type') ) { | |
| // Register Custom Post Type | |
| function generate_concerts_post_type() { | |
| $labels = array( | |
| 'name' => _x( 'Concerts', 'Post Type General Name', 'ale' ), | |
| 'singular_name' => _x( 'Concert', 'Post Type Singular Name', 'ale' ), | |
| 'menu_name' => __( 'Concerts', 'ale' ), |
This file contains hidden or 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 | |
| BROWSER_PATH='open /Applications/Google\ Chrome.app' | |
| if [[ $# -eq 0 ]] ; then | |
| echo "Please enter a version number:" | |
| read VERSION | |
| else | |
| VERSION=$1 | |
| fi |
This file contains hidden or 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_shortcode( 'posts-list', 'ignacio_posts_list_shortcode' ); | |
| function ignacio_posts_list_shortcode( $atts ) { | |
| $defaults = array( | |
| 'items' => 3 | |
| ); | |
| $atts = wp_parse_args( $atts, $defaults ); |
This file contains hidden or 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 | |
| /** | |
| * En lugar de usaar the_category( ' | ' ), usa alex_the_category( ' | ' ) | |
| * Añadee una clase CSS a cada link en la lista. Si tu categoría se llama "Mi Categoría", | |
| * la clase será "cat-mi-categoria" | |
| * | |
| * Si no le metes el parámetro separator, va a salir feo. | |
| */ | |
| function alex_the_category( $separator = '' ) { | |
| global $wp_rewrite; |
This file contains hidden or 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
| // Esto es lo que crea wp_localize_script ( no lo tienes que poner en tu fichero): | |
| media_files_i18n = { | |
| conti: 'John Conti', // O su versión traducida, si la hay | |
| my_string: 'My String' // O su versión traducida, si la hay | |
| }; | |
| // Y ahora, dentrode uploader.js, simplemente puedes usar: | |
| var my_name = media_files_i18n.conti |
This file contains hidden or 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 media_files_tools_load_js(){ | |
| wp_enqueue_media(); | |
| wp_enqueue_script('media_files_tools_load_js' , "/" . PLUGINDIR . '/media-files-tools/js/uploader.js' , array('jquery'),'2.0'); | |
| $object = array( | |
| 'conti' => __( 'John Conti', 'conti' ), | |
| 'my_string' => __( 'My String', 'conti' ) | |
| ); |