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
/** Fixes Issue with CMB on Windows Local */ | |
add_filter( 'cmb_meta_box_url', 'we_windows_cmb_meta_box_url' ); | |
function we_windows_cmb_meta_box_url( $url ){ | |
return trailingslashit( str_replace( '\\', '/', str_replace( str_replace( '/', '\\', WP_CONTENT_DIR ), WP_CONTENT_URL, $url ) ) ); | |
} |
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( 'admin_bar_menu', 'we_add_admin_bar_links', 100 ); | |
/** | |
* Add Admin Toolbar Menu Items | |
* | |
*/ | |
function we_add_admin_bar_links($admin_bar) { | |
$admin_bar->add_menu( array( | |
'id' => 'google-analytics', | |
'title' => 'Google Analytics', | |
'href' => 'http://www.google.com/analytics/', |
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_before_admin_bar_render', 'we_remove_admin_bar_links' ); | |
/** | |
* Remove Admin Toolbar Menu Items | |
* | |
*/ | |
function we_remove_admin_bar_links() { | |
global $wp_admin_bar; | |
// $wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo | |
$wp_admin_bar->remove_menu('about'); // Remove the about WordPress link | |
$wp_admin_bar->remove_menu('wporg'); // Remove the WordPress.org link |
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( 'admin_bar_menu', 'we_admin_bar_custom_account_menu', 11 ); | |
/** | |
* Change Admin Toolbar Howdy Text and Modify My Account Menu | |
* | |
*/ | |
function we_admin_bar_custom_account_menu( $wp_admin_bar ) { | |
$user_id = get_current_user_id(); | |
$current_user = wp_get_current_user(); | |
$profile_url = get_edit_profile_url( $user_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
add_action( 'admin_head', 'we_admin_favicon' ); | |
/** | |
* Change Admin Favicon | |
* | |
*/ | |
function we_admin_favicon() { | |
if ( file_exists( CHILD_DIR . '/images/favicon.ico' ) ) | |
$favicon = CHILD_URL . '/images/favicon.ico'; | |
elseif ( file_exists( CHILD_DIR . '/images/favicon.gif' ) ) | |
$favicon = CHILD_URL . '/images/favicon.gif'; |
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( 'admin_footer_text', 'we_admin_footer' ); | |
/** | |
* Modify Admin Footer Text | |
* | |
*/ | |
function we_admin_footer() { | |
echo "<a href='" . CHILD_THEME_URL . "'>" . CHILD_THEME_NAME . "</a> designed by <a href='" . CHILD_THEME_URL . "'>" . CHILD_THEME_DEVELOPER . "</a>"; | |
} |
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( 'user_contactmethods' , 'webendev_change_contactmethods' , 11 , 1 ); | |
/** | |
* Change Contact Methods in User Profile | |
* | |
*/ | |
function webendev_change_contactmethods( $contactmethods ) { | |
// Add Contact Methods | |
$contactmethods['twitter'] = 'Twitter ID'; | |
$contactmethods['facebook'] = 'Facebook 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
/** 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_action( 'genesis_after_post_content', 'we_category_ad' ); | |
/** | |
* Ad after third post's content | |
* | |
*/ | |
function we_category_ad() { | |
global $wp_query; | |
if( 2 == $wp_query->current_post ) | |
echo '<div class="ad">Ad Goes Here</div>'; | |
} |
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( 'woocommerce_order_number', 'webendev_woocommerce_order_number', 1, 2 ); | |
/** | |
* Add Prefix to WooCommerce Order Number | |
* | |
*/ | |
function webendev_woocommerce_order_number( $oldnumber, $order ) { | |
return 'WE' . $order->id; | |
} |