Replace Menu Icon

// remove the CSS for EDD’s custom menu icon remove_action( ‘admin_head’, ‘edd_admin_downloads_icon’ ); // filter EDD’s post type args to use an icon from dashicons (http://melchoyce.github.io/dashicons/) function sumobi_edd_replace_menu_icon( $download_args ) { // enter the menu icon here $download_args[‘menu_icon’] = ‘dashicons-cart’;…Continue reading

User Switching

add_filter( ‘edd_report_customer_columns’, ‘gv_edd_report_customer_columns_add_user_switching’ ); /** * Add “Switch To” column to the list of columns in the EDD Customers table * * @param array $columns * * @return array */ function gv_edd_report_customer_columns_add_user_switching( $columns ) { if ( ! class_exists( ‘user_switching’…Continue reading

Download Archive Menu Item

function cor_edd_nav_menu_items_page( $posts ) { array_unshift( $posts, (object) array( ‘ID’ => 0, ‘object_id’ => – 1, ‘post_content’ => ”, ‘post_excerpt’ => ”, ‘post_parent’ => ”, ‘post_title’ => get_post_type_object( ‘download’ )->labels->menu_name, ‘post_type’ => ‘nav_menu_item’, ‘type’ => ‘custom’, ‘url’ => get_post_type_archive_link( ‘download’…Continue reading

User Switching

add_filter( ‘edd_report_customer_columns’, ‘gv_edd_report_customer_columns_add_user_switching’ ); /** * Add “Switch To” column to the list of columns in the EDD Customers table * * @param array $columns * * @return array */ function gv_edd_report_customer_columns_add_user_switching( $columns ) { if ( ! class_exists( ‘user_switching’…Continue reading

Download Archive Menu Item

function cor_edd_nav_menu_items_page( $posts ) { array_unshift( $posts, (object) array( ‘ID’ => 0, ‘object_id’ => – 1, ‘post_content’ => ”, ‘post_excerpt’ => ”, ‘post_parent’ => ”, ‘post_title’ => get_post_type_object( ‘download’ )->labels->menu_name, ‘post_type’ => ‘nav_menu_item’, ‘type’ => ‘custom’, ‘url’ => get_post_type_archive_link( ‘download’…Continue reading

Download Archive Menu Item

function cor_edd_nav_menu_items_page( $posts ) { array_unshift( $posts, (object) array( ‘ID’ => 0, ‘object_id’ => – 1, ‘post_content’ => ”, ‘post_excerpt’ => ”, ‘post_parent’ => ”, ‘post_title’ => get_post_type_object( ‘download’ )->labels->menu_name, ‘post_type’ => ‘nav_menu_item’, ‘type’ => ‘custom’, ‘url’ => get_post_type_archive_link( ‘download’…Continue reading

Restrict Dashboard Summary Widget

// remove sales summary widget remove_action( ‘wp_dashboard_setup’, ‘edd_register_dashboard_widgets’, 10 ); // add sales summary widget with new conditions function custom_edd_register_dashboard_widgets() { $user_id = get_current_user_id(); // comma separated list of user IDs to restrict – adjust as needed $no_access = array(…Continue reading

Duplicate Post/Page Link

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Duplicate Post/Page Link (copy)

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading