{"action":"created","issue":{"url":"https://api.github.com/repos/themosis/framework/issues/168","labels_url":"https://api.github.com/repos/themosis/framework/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/themosis/framework/issues/168/comments","events_url":"https://api.github.com/repos/themosis/framework/issues/168/events","html_url":"https://github.com/themosis/framework/issues/168","id":95644625,"number":168,"title":"Action not fired in application.php","user":{"login":"aguidis","id":1856652,"avatar_url":"https://avatars.githubusercontent.com/u/1856652?v=3","gravatar_id":"","url":"https://api.github.com/users/aguidis","html_url":"https://github.com/aguidis","followers_url":"https://api.github.com/users/aguidis/followers","following_url":"https://api.github.com/users/aguidis/following{/other_user}","gists_url":"https://api.github.com/users/aguidis/gists{/gist_id}","starred_url":"https://api.github.com/users/aguidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguidis/subscriptions","organizations_url":"https://api.github.com/users/aguidis/orgs","repos_url":"https://api.github.com/users/aguidis/repos","events_url":"https://api.github.com/users/aguidis/events{/privacy}","received_events_url":"https://api.github.com/users/aguidis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-17T12:07:55Z","updated_at":"2015-07-17T12:14:57Z","closed_at":null,"body":"Hi,\r\n\r\nI tried to add an action (hook \"after_setup_theme\") in the admin/application.php file (because the doc says \"This folder is an extension of the classic functions.php\"). But it seems that I call the remove_action functions too early, it would mean that the actions I'm trying to remove don't exist because they are added later.\r\n\r\n```php\r\n/**\r\n * Remove some WP tags from the document header\r\n */\r\nfunction clean_header() {\r\n    remove_action('wp_head', 'wp_generator');\r\n    remove_action('wp_head', 'wlwmanifest_link');\r\n    remove_action('wp_head', 'rsd_link');\r\n    remove_action('wp_head', 'wp_shortlink_wp_head');\r\n\r\n    remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10);\r\n\r\n    add_filter('the_generator', '__return_false');\r\n    add_filter('show_admin_bar','__return_false');\r\n\r\n    remove_action( 'wp_head', 'print_emoji_detection_script', 7 );\r\n    remove_action( 'wp_print_styles', 'print_emoji_styles' );\r\n}\r\nadd_action('after_setup_theme', 'clean_header');\r\n```"},"comment":{"url":"https://api.github.com/repos/themosis/framework/issues/comments/122258282","html_url":"https://github.com/themosis/framework/issues/168#issuecomment-122258282","issue_url":"https://api.github.com/repos/themosis/framework/issues/168","id":122258282,"user":{"login":"jlambe","id":1917490,"avatar_url":"https://avatars.githubusercontent.com/u/1917490?v=3","gravatar_id":"","url":"https://api.github.com/users/jlambe","html_url":"https://github.com/jlambe","followers_url":"https://api.github.com/users/jlambe/followers","following_url":"https://api.github.com/users/jlambe/following{/other_user}","gists_url":"https://api.github.com/users/jlambe/gists{/gist_id}","starred_url":"https://api.github.com/users/jlambe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlambe/subscriptions","organizations_url":"https://api.github.com/users/jlambe/orgs","repos_url":"https://api.github.com/users/jlambe/repos","events_url":"https://api.github.com/users/jlambe/events{/privacy}","received_events_url":"https://api.github.com/users/jlambe/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T12:14:57Z","updated_at":"2015-07-17T12:14:57Z","body":"Probably but what you're trying to achieve is already done by the framework theme by default:\r\nhttps://github.com/themosis/theme/blob/master/bootstrap/start.php#L138\r\n\r\nYou should use the `init` hook for this habitually."}}