Skip to content

Instantly share code, notes, and snippets.

View richtabor's full-sized avatar

Rich Tabor richtabor

View GitHub Profile
@richtabor
richtabor / function.php
Last active January 4, 2019 17:01 — forked from deeman/function.php
WooCommerce. Single product. Remove Additional Information
/**
* Modify 'More Information' tab.
*/
function ava_child_product_additional_information_heading() {
return __( 'More Stuff', 'ava' );
}
add_filter('woocommerce_product_additional_information_heading', 'ava_child_product_additional_information_heading');
<?php //* do not include php tag
add_filter( 'schema_wp_types', 'schema_wp_new_add_schema_type_7623456' );
/**
* Add New type to Schema Types options
*
* @since 1.0
*/
function schema_wp_new_add_schema_type_7623456( $options ) {
<?php
// These are incorrect:
__( 'Some String', 'text-domain' ); _e( 'Some string', 'text-domain' );
// Instead, use:
esc_html__( 'Some String', 'text-domain' ); esc_html_e( 'Some String', 'text-domain' );
/**
* For strings with necessary HTML, use the following:
* Note that I'm only including the actual allowed HTML for this specific string.
<?php
// Include a plugin from the WordPress Repository:
array(
'name' => esc_html__( 'WooCommerce', 'text-domain' ),
'slug' => 'woocommerce',
'required' => false,
),
// Include a plugin bundled within a WordPress theme:
array(