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( 'wp_login_errors', 'login_form_lockdown', 90, 2 ); | |
| /** | |
| * This code locks down the WordPress login form by hijacking the page via the 'wp_login_errors' hook and only executing the | |
| * login header, footer, and necessary closing tags unless a URL parameter (defined in the function) is included in the request. | |
| * If the parameter exists, the full login form is returned in the error object. | |
| * | |
| * Without the "secret" key-value pair passed as a URL parameter, all login pages will be blank except for any HTML/CSS loaded | |
| * prior to wp_login_errors, such as the default wordpress.org-linked WordPress logo above the (absent) login form. | |
| * |
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 nlm_unregister_taxonomies() | |
| { | |
| register_taxonomy('category', array(), array('show_in_nav_menus' => false) ); | |
| register_taxonomy('post_tag', array(), array('show_in_nav_menus' => false) ); | |
| } | |
| add_action('init', 'nlm_unregister_taxonomies'); |
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
| /** | |
| * Auto Complete all WooCommerce orders. | |
| */ | |
| add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' ); | |
| function custom_woocommerce_auto_complete_order( $order_id ) { | |
| if ( ! $order_id ) { | |
| return; | |
| } | |
| $order = wc_get_order( $order_id ); |
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
| /** | |
| * Code goes in functions.php or a custom plugin. Replace XX with the country code your changing. | |
| */ | |
| add_filter( 'woocommerce_states', 'custom_woocommerce_states' ); | |
| function custom_woocommerce_states( $states ) { | |
| $states['XX'] = array( | |
| 'XX1' => 'State 1', | |
| 'XX2' => 'State 2' |
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 a 1% surcharge to your cart / checkout | |
| * change the $percentage to set the surcharge to a value to suit | |
| * Uses the WooCommerce fees API | |
| * | |
| * Add to theme functions.php | |
| */ | |
| add_action( 'woocommerce_cart_calculate_fees','woocommerce_custom_surcharge' ); | |
| function woocommerce_custom_surcharge() { | |
| global $woocommerce; |
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
| /** | |
| * Adds the pick a pic icon to the media bar. | |
| * | |
| * @param it editor_id. | |
| * @return noting. | |
| **/ | |
| function pac_pickapic_media_buttons($editor_id = '') { | |
| echo '<a href="#TB_inline?width=1200&height=800%&inlineId=popup_container" | |
| class="button thickbox unsplash" title="Flickr - Click photos to upload directly to your media library" | |
| // id="' . esc_attr( $editor_id ) . '-add_media" title="' . esc_attr__( 'Flickr', 'pickapic' ) . '" onclick="return false;"> |
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
| @font-face { | |
| font-family: 'EntypoRegular'; | |
| src: url('font/entypo.eot'); | |
| src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
| url('font/entypo.woff') format('woff'), | |
| url('font/entypo.ttf') format('truetype'), | |
| url('font/entypo.svg#EntypoRegular') format('svg'); | |
| font-weight: normal; | |
| font-style: normal; | |
| } |
NewerOlder