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
| add_filter( 'intermediate_image_sizes', function($sizes){ | |
| $type = get_post_type($_REQUEST['post_id']); | |
| foreach($sizes as $key => $value){ | |
| if($type=='post_type' && $value != 'img_size_name'){ | |
| unset($sizes[$key]); | |
| } | |
| } | |
| return $sizes; | |
| }); |
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
| function parseTwitterContent($string) { | |
| $links = make_clickable($string); | |
| $patterns = array("/@([a-zA-Z0-9_]+)/", "/#([a-zA-Z0-9_]+)/"); | |
| $replace = array( | |
| "<a href='http://twitter.com/$1' target='_blank'>@$1</a>", | |
| "<a href='http://twitter.com/#$1' target='_blank'>#$1</a>" | |
| ); | |
| return preg_replace($patterns, $replace, $links); | |
| } |
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 | |
| # Author: Jorge González (@scrubmx) | |
| # https://github.com/scrubmx/Shell-Scripts/edit/master/mkwp.sh | |
| # | |
| function _remove_wp_folders(){ | |
| mv wordpress/* ./ | |
| rmdir wordpress | |
| rm *.tar.gz | |
| } |
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
| add_action('admin_init', function(){ | |
| $args = array( 'public' => true, '_builtin' => false ); | |
| $taxonomies = get_taxonomies( $args,'object','and' ); | |
| foreach ( $taxonomies as $taxonomy ) { | |
| add_action( $taxonomy->name.'_add_form', 'qtrans_modifyTermFormFor'); | |
| add_action( $taxonomy->name.'_edit_form', 'qtrans_modifyTermFormFor'); | |
| } |
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 | |
| # Author: @scrubmx | |
| # https://github.com/scrubmx/ | |
| # | |
| # WordPress installation name | |
| if [[ $# -eq 0 ]] ; then | |
| printf '\n\033[0;33m%s\033[0m' 'usage: ' | |
| printf '\033[0;32m%s\033[0m\n' 'mkwp name' | |
| exit 0 |
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 ( ! Modernizr.inputtypes.date ) { | |
| $('input[type="date"]').datepicker({ | |
| dateFormat: 'yy-mm-dd' | |
| }); | |
| } |
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
| /** | |
| * Muestra el link a la ultima pagina del archive o page (con paginación) | |
| * @return string HTML link with the proper link. | |
| */ | |
| function last_page_link() | |
| { | |
| global $wp_query; | |
| $pagename = ($wp_query->query['pagename']) ? $wp_query->query['pagename'] : ''; |
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
| window.Lightbox = {}; | |
| /** | |
| * Contenedor donde se pone la imagen | |
| * @type jQuery Wrapped DOM Element | |
| */ | |
| Lightbox.$container =$('#evento-uploads-lightbox'); | |
| /** | |
| * Contador que indica el indice de la imagen que estamos viendo |
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
| body { | |
| -moz-transform: rotate(-180deg); | |
| -ms-transform: rotate(-180deg); | |
| -o-transform: rotate(-180deg); | |
| -webkit-transform: rotate(-180deg); | |
| transform: rotate(-180deg); | |
| } |
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
| Array.prototype.remove = function (itemToRemove) | |
| { | |
| return this.filter(function (element) { | |
| return element !== itemToRemove; | |
| }); | |
| } |
OlderNewer