# AdminAction

{% hint style="info" %}
Code is executed only when the Wordpress admin is loaded. Action is instantiated by a Wordpress mu-plugins.
{% endhint %}

```php
<?php

// src/Action/AdminAction.php

namespace App\Action;

use Metabolism\WordpressBundle\Action\AdminAction as BaseAdminAction;

class AdminAction extends BaseAdminAction
{
	/**
	 * Equivalent to if( is_admin() ) add_action('admin_init', function(){ })
	 */
	public function init()
	{
		//add_action
	}
}

```
