This file contains 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 cool_function_name_paypal_icon( $url ) { | |
$url = get_bloginfo( 'template_url' ) . "/put-any-url-here.png"; | |
return $url; | |
} | |
add_filter( 'woocommerce_paypal_icon', 'cool_function_name_paypal_icon' ); |
This file contains 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 show_image_sizes( $sizes ) { | |
$new_sizes = array(); | |
$added_sizes = get_intermediate_image_sizes(); | |
// $added_sizes is an indexed array, therefore need to convert it | |
// to associative array, using $value for $key and $value | |
foreach( $added_sizes as $key => $value ) { | |
$new_sizes[$value] = $value; |
This file contains 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 execute_php_text_widget( $html ) { | |
if ( strpos( $html,"<"."?php")!==false ) { | |
ob_start(); | |
eval( "?".">".$html ); | |
$html=ob_get_contents(); | |
ob_end_clean(); | |
} | |
return $html; | |
} | |
add_filter( 'widget_text','execute_php_text_widget', 100 ); |
This file contains 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
// Get The Page ID You Need | |
get_option( 'woocommerce_shop_page_id' ); | |
get_option( 'woocommerce_cart_page_id' ); | |
get_option( 'woocommerce_checkout_page_id' ); | |
get_option( 'woocommerce_pay_page_id' ); | |
get_option( 'woocommerce_thanks_page_id' ); | |
get_option( 'woocommerce_myaccount_page_id' ); | |
get_option( 'woocommerce_edit_address_page_id' ); | |
get_option( 'woocommerce_view_order_page_id' ); | |
get_option( 'woocommerce_terms_page_id' ); |
This file contains 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
// Custom Dashboard widgets | |
function custom_dashboard_widgets() { | |
global $wp_meta_boxes; | |
unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] ); | |
unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); |
NewerOlder