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
add_action('wp_loaded','webendev_register_nav_menu_class'); | |
/** | |
* New walker class to extend Walker_Nav_Menu | |
* Dynamically adds child categories to menu | |
* | |
*/ | |
function webendev_register_nav_menu_class(){ | |
class Submenu_Walker_Nav_Menu extends Walker_Nav_Menu { |
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
<input type="submit" class="button" name="clear-cart" value="<?php _e('Empty Cart', 'woocommerce'); ?>" /> |
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
/* 4 column Gravity Forms custom ready class ------------------------------------------------------*/ | |
.gform_wrapper .top_label li.gfield.gf_first_quarter, | |
.gform_wrapper .top_label li.gfield.gf_second_quarter, | |
.gform_wrapper .top_label li.gfield.gf_third_quarter, | |
.gform_wrapper .top_label li.gfield.gf_fourth_quarter { | |
margin:0 0 8px 0; | |
width:24%; | |
} |
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
/** Procedure for Site Transfer from WPE to Other Host */ | |
(1) Download ZIP from WPE (Backup Points) | |
(2) Upload WPE ZIP to new server | |
(3) Create new wp-config.php file with new DB_NAME, DB_USER, DB_PASSWORD, Keys and Salts, and $table_prefix. | |
(3a) Add | |
define( 'WP_POST_REVISIONS', FALSE ) | |
(3b) Add |
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
add_filter( 'manage_edit-category_columns', 'we_categoriesColumnsHeader' ); | |
add_filter( 'manage_category_custom_column', 'we_categoriesColumnsRow', 10, 3 ); | |
/** | |
* Add Category ID column in admin | |
* | |
*/ | |
function we_categoriesColumnsHeader($columns) { | |
$columns['catID'] = __('ID'); | |
return $columns; | |
} |
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
/** Remove the edit link */ | |
add_filter ( 'genesis_edit_post_link' , '__return_false' ); |
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
add_filter( 'wp_nav_menu_items', 'we_add_loginout_link', 10, 2 ); | |
/** | |
* Add login/logout and registration links to header menu | |
* | |
* @author Bruce Munson, WebEndev | |
* | |
*/ | |
function we_add_loginout_link( $items, $args ) { | |
if (is_user_logged_in() && $args->theme_location == 'header') { | |
$items .= '<li class="menu-item"><a href="'. wp_logout_url() .'">Log Out</a></li>'; |
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
add_filter( 'image_send_to_editor', 'we_insert_img_rel_attrib', 10, 6 ); | |
/** | |
* Add rel="prettyPhoto" attribute automatically as image is inserted into post | |
* Requires PrettyPhoto JS enqueue | |
*/ | |
function we_insert_img_rel_attrib( $html, $id, $caption, $title, $align, $url ) { | |
$rel = "<a rel=prettyPhoto"; | |
if ($url) {$html = str_replace("<a",$rel,$html);} | |
return $html; | |
} |
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
add_filter( 'wpmu_signup_user_notification_subject', 'we_modify_register_user_notification_subject', 10, 4 ); | |
/** | |
* Modify the user registration email activation subject | |
*/ | |
function we_modify_register_user_notification_subject( $text ) { | |
return 'Welcome to the Best Books on Writing site! (Activation Required)'; | |
} | |
add_filter('wpmu_signup_user_notification_email', 'we_modify_register_user_notification_message', 10, 4); | |
/** |
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
add_action( 'gsfc_before_post_content', 'we_before_gsfc_quote_content' ); | |
/** | |
* Add lead-in content to GSFC widget (by instance) | |
*/ | |
function we_before_gsfc_quote_content( $instance ) { | |
if ( $instance['custom_field'] == 'writing-quotes' ) { | |
echo 'boo'; | |
} | |
} |