Skip to content

Instantly share code, notes, and snippets.

@wischli
Last active January 24, 2019 09:38
Show Gist options
  • Save wischli/7d63f6772ac9b57e238679633c46e9d4 to your computer and use it in GitHub Desktop.
Save wischli/7d63f6772ac9b57e238679633c46e9d4 to your computer and use it in GitHub Desktop.
WP Easy Affiliate Plugin hack enabling editing for non-admins
// site/web/app/plugins/easy-affiliate-links/includes/admin/menu/class-eafl-admin-menu.php
public static function add_menu_page() {
add_menu_page( 'Easy Affiliate Links', 'Affiliate Links', 'edit_posts', 'easyaffiliatelinks', array( 'EAFL_Manage', 'page_template' ), 'dashicons-admin-links', 20 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment