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 | |
const ACTION_NAME = 'shea_ajax_example'; | |
$handler = function () { | |
check_ajax_referer( ACTION_NAME ); | |
wp_send_json_success( 'it works!' ); | |
}; |
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
// Enqueue Files | |
function theme_enqueue_styles() { | |
wp_enqueue_style( 'animate-style', 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.0/animate.min.css', array() ); | |
wp_enqueue_script( 'wow-js', 'https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js', array() ); | |
} | |
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); | |
function wow_js() { ?> |
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 | |
/* | |
Configuration. | |
Note: You'll need a Google maps API key - requires both Maps JS and Places API services enabled. | |
*/ | |
$place_ID = ''; // Get from: https://developers.google.com/places/place-id | |
$business_type = ''; // Example: FinancialService (http://schema.org) | |
$business_name = ''; | |
$street_address = ''; |
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 | |
// My post: https://es.wordpress.org/support/topic/tutorial-como-deshabilitar-algunos-plugins-de-algunas-paginas-especificas/ | |
/* | |
Plugin Name: Plugin Selector | |
Plugin URI: https://ardid.com.ar | |
Description: Removes plugins in selected pages | |
Author: Anibal Ardid | |
Version: 1.0 | |
Author URI: https://ardid.com.ar | |
*/ |
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
/** | |
* Hide shipping rates when free shipping is available. | |
* Updated to support WooCommerce 2.6 Shipping Zones. | |
* | |
* @param array $rates Array of rates found for the package. | |
* @return array | |
*/ | |
function my_hide_shipping_when_free_is_available( $rates ) { | |
$free = array(); | |
foreach ( $rates as $rate_id => $rate ) { |
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
/* | |
* goes in theme functions.php or a custom plugin | |
* | |
* Subject filters: | |
* woocommerce_email_subject_new_order | |
* woocommerce_email_subject_customer_processing_order | |
* woocommerce_email_subject_customer_completed_order | |
* woocommerce_email_subject_customer_invoice | |
* woocommerce_email_subject_customer_note | |
* woocommerce_email_subject_low_stock |
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
/** | |
* Rename product data tabs | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
function woo_rename_tabs( $tabs ) { | |
$tabs['description']['title'] = __( 'More Information' ); // Rename the description tab | |
$tabs['reviews']['title'] = __( 'Ratings' ); // Rename the reviews tab | |
$tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab |
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
function remove_personal_options(){ | |
echo '<script type="text/javascript">jQuery(document).ready(function($) { | |
$(\'form#your-profile > h2:first\').remove(); // remove the "Personal Options" title | |
$(\'form#your-profile tr.user-rich-editing-wrap\').remove(); // remove the "Visual Editor" field | |
$(\'form#your-profile tr.user-admin-color-wrap\').remove(); // remove the "Admin Color Scheme" field | |
$(\'form#your-profile tr.user-comment-shortcuts-wrap\').remove(); // remove the "Keyboard Shortcuts" field |
NewerOlder