Skip to content

Instantly share code, notes, and snippets.

@webonaut
webonaut / wp_custom_action_hook.php
Last active August 29, 2015 14:17
Wordpress - Eigenen Action-Hook erstellen
// Beschreibung: Erzeugt einen eigenen Action-Hook
// Speicherort: functions.php
// Quelle: http://relearningtheweb.blogspot.de/2012/12/wordpress-create-custom-action-hook-in.html
/*
* 1. Create your own custom action hook named 'the_action_hook'
* with just a line of code. Yes, it's that simple.
*
* The first argument to add_action() is your action hook name
@webonaut
webonaut / wc_renaming_tabs.php
Last active August 29, 2015 14:16
WooCommerce - Produkt-Tabs umbenennen
// Beschreibung: Ändert die Bezeichnung der WooCommerce-Produkt-Tabs
// Speicherort: functions.php
// Quelle: http://docs.woothemes.com/document/editing-product-data-tabs
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
$tabs['description']['title'] = __( 'Neuer Name 1' ); // Rename the description tab
$tabs['reviews']['title'] = __( 'Neuer Name 2' ); // Rename the reviews tab
@webonaut
webonaut / wc_removing_tabs.php
Last active August 29, 2015 14:16
WooCommerce - Produkt-Tabs entfernen
// Beschreibung: Entfernt die WooCommerce-Produkt-Tabs; nicht zu entfernende Tabs einfach auskommentieren;
// Speicherort: functions.php
// Quelle: http://docs.woothemes.com/document/editing-product-data-tabs
add_filter( 'woocommerce_product_tabs', 'woo_remove_reviews_tab', 98 );
function woo_remove_reviews_tab( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
unset( $tabs['reviews'] ); // Remove the reviews tab