Remove “Get Shortlink” button in admin of custom post type

If you filter pre_get_shortlink and return anything but false WordPress will not create a shortlink with its own logic. If your return value is empty, the shortlink UI will not be printed. Combining both leads us to: add_filter( ‘pre_get_shortlink’, ‘__return_empty_string’ ); If you want to restrict the filter to a specific post type, check the … Read more

How to increase password requirements for registration [closed]

Use a hook that fires later and add the $bp global to the function. Try this: function bp_password_beefing() { global $bp; if ( !empty( $_POST[‘signup_password’] ) ) if ( strlen( $_POST[‘signup_password’] ) < 6 ) $bp->signup->errors[‘signup_password’] = __( ‘Your password needs to be at least 6 characters’, ‘buddypress’ ); } add_action( ‘bp_signup_validate’, ‘bp_password_beefing’);

WordPress Plugin Boilerplate – add_action hook in static “activate” function

The problem is the initialization in WordPress via register_activation_hook( __FILE__, ‘activate_IWCollege_Courses’ ); The function was fired on the Activation of a plugin, not more. You must switch to the hook init. For Custom Post types, the init hook is recommended in the codex. Custom post types must be registered during every WordPress initialization. But the … Read more