Recursos del Curso Desarrollo Frontend con Developer Tools en Escuela IT
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 new tab called "mytab" */ | |
| add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 ); | |
| function my_custom_tab_in_um( $tabs ) { | |
| $tabs[800]['mytab']['icon'] = 'um-faicon-pencil'; | |
| $tabs[800]['mytab']['title'] = 'My Custom Tab'; | |
| $tabs[800]['mytab']['custom'] = true; | |
| return $tabs; | |
| } | |
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( 'agentpress_featured_listings_widget_loop', 'agentpress_featured_listings_widget_loop_filter' ); | |
| /** | |
| * Filter the loop output of the AgentPress Featured Listings Widget. | |
| * | |
| */ | |
| function agentpress_featured_listings_widget_loop_filter( $loop ) { | |
| $loop = ''; /** initialze the $loop variable */ | |
| $loop .= sprintf( '<a href="%s">%s</a>', get_permalink(), genesis_get_image( array( 'size' => 'feature-community' ) ) ); |
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 // only copy if needed! | |
| /** | |
| * Register new status | |
| * Tutorial: http://www.sellwithwp.com/woocommerce-custom-order-status-2/ | |
| **/ | |
| function register_awaiting_shipment_order_status() { | |
| register_post_status( 'wc-awaiting-shipment', array( | |
| 'label' => 'Awaiting shipment', | |
| 'public' => true, |
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( 'genesis_comment_form_args', 'url_filtered' ); | |
| add_filter( 'comment_form_default_fields', 'url_filtered' ); | |
| function url_filtered( $fields ) { | |
| if ( isset( $fields['url'] ) ) | |
| unset( $fields['url'] ); | |
| if ( isset( $fields['fields']['url'] ) ) | |
| unset( $fields['fields']['url'] ); | |
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
| #!/usr/bin/env bash | |
| # author: Thomas Aylott SubtleGradient.com | |
| # author: Nathan Nobbe quickshiftin.com | |
| # Find out where HEAD is pointing | |
| head_ref=$(git show-ref --head -s | head -n 1) | |
| # Check to see if transmit tag exists, and get transmit tag hash | |
| _transmit_ref=$(git show-ref --verify -s refs/tags/transmit) | |
| # If there's not transmit tag, create it for the first time. |
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
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
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 | |
| /** | |
| * Display how many spots are left in the choice label when using the GP Limit Choices perk | |
| * http://gravitywiz.com/gravity-perks/ | |
| */ | |
| add_filter( 'gplc_remove_choices', '__return_false' ); | |
| add_filter( 'gplc_pre_render_choice', 'my_add_how_many_left_message', 10, 5 ); |
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
| /** | |
| * Optimize WooCommerce Scripts | |
| * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
| function child_manage_woocommerce_styles() { | |
| //remove generator meta tag | |
| remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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 | |
| /** | |
| * Change text strings | |
| * | |
| * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function my_text_strings( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Sale!' : | |
| $translated_text = __( 'Clearance!', 'woocommerce' ); |
