Skip to content

Instantly share code, notes, and snippets.

@jonasvogel
jonasvogel / new-dashboard-action.php
Created March 16, 2018 15:13
WP Job Manager: Test new filter for job dashboard actions which allows success message
<?php
namespace JobManager;
add_filter( 'job_manager_my_job_actions', __NAMESPACE__ . '\\add_expire_action', 10, 2 );
function add_expire_action( $actions, $job_id ) {
if ( ! function_exists( __NAMESPACE__ . '\\handle_expire_action' ) ) {
return $actions;
@jonasvogel
jonasvogel / wsl-redirect-after-registration.php
Created July 28, 2015 13:25
Redirect users who registered through WSL to different site
// Fired after registration of new user though the WSL plugin
add_action( 'wsl_hook_process_login_after_wp_insert_user', 'jvo_wsl_after_registration', 10, 3 );
function jvo_wsl_after_registration( $user_id, $provider, $hybridauth_user_profile ) {
// Only fired if user registered using the WSL Plugin
// Add filter for redirect hook
add_filter( 'wsl_hook_process_login_alter_redirect_to', 'jvo_wsl_redirect_to', 10, 1 );
}