Title: magicWord variable
Last modified: February 21, 2017

---

# magicWord variable

 *  Resolved [JustBruno](https://wordpress.org/support/users/justbruno/)
 * (@justbruno)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/magicword-variable/)
 * Hi, In the plugin description below, you say that it’s possible to use a keyboard
   combo to focus switch and switch off. Can you show me where I can read about 
   where to place the “abus_ajax_args” and magic word variable? THANKS!!
 *  The same combo can be used to focus the ‘Switch Off’ link, following a return
   to simulate a click.
 * To activate this feature and set the custom keyboard combination, aka magic word,
   you need to use the abus_ajax_args and add a ‘magicWord’ variable.
 * Note that keyboard navigation is not dependant on the custom keyboard combination,
   and can be used out of the box.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * (@wpmarkuk)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/magicword-variable/#post-8830812)
 * Take a look at this conversation:
 * [https://github.com/wpmark/admin-bar-user-switching/pull/9](https://github.com/wpmark/admin-bar-user-switching/pull/9)
 *  Thread Starter [JustBruno](https://wordpress.org/support/users/justbruno/)
 * (@justbruno)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/magicword-variable/#post-8830888)
 * Hi thanks, I read the thread but didn’t see into which file to insert the code.
 *  Thread Starter [JustBruno](https://wordpress.org/support/users/justbruno/)
 * (@justbruno)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/magicword-variable/#post-8830905)
 * Am I on the right track here?
    `add_action( 'abus_ajax_args', array( $this, '
   su' ) );`
 *  [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * (@wpmarkuk)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/magicword-variable/#post-8831646)
 * I think more like this:
 *     ```
       function wpmark_define_magic_word( $args ) {
   
       	// set our magicword
       	$args[ 'magicWord' ] ='mymagicword';
   
       	// return the modifed args including our magicword
       	return $args
   
       }
   
       add_filter( 'abus_ajax_args', wpmark_define_magic_word, 10, 1 );
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘magicWord variable’ is closed to new replies.

 * ![](https://ps.w.org/admin-bar-user-switching/assets/icon-128x128.png?rev=1419846)
 * [Admin Bar User Switching](https://wordpress.org/plugins/admin-bar-user-switching/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-bar-user-switching/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-bar-user-switching/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-bar-user-switching/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-bar-user-switching/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/magicword-variable/#post-8831646)
 * Status: resolved