{"id":18821,"date":"2017-07-18T06:17:17","date_gmt":"2017-07-18T06:17:17","guid":{"rendered":"https:\/\/pt.wordpress.org\/support\/topic\/remover-filtro-da-listagem-de-posts-na-dashboard\/"},"modified":"2017-07-18T07:37:35","modified_gmt":"2017-07-18T07:37:35","slug":"remover-filtro-da-listagem-de-posts-na-dashboard","status":"publish","type":"topic","link":"https:\/\/pt.wordpress.org\/support\/topic\/remover-filtro-da-listagem-de-posts-na-dashboard\/","title":{"rendered":"Remover filtro da listagem de posts na dashboard"},"content":{"rendered":"<p>Viva.<\/p>\n<p>Tenho um plugin instalado, o liveblog, que adiciona um fitro na listagem de posts na dashboard. Podem ver um screenshot aqui:<br \/>\n<img decoding=\"async\" src=\"https:\/\/i.imgur.com\/BzGNmQA.png\" alt=\"filtro\" \/><\/p>\n<p>Este filtro n\u00e3o \u00e9 necess\u00e1rio e preferia, ao inv\u00e9s, ter um para os autores &#8211; que j\u00e1 criei. O problema \u00e9 que o filtro dos autores n\u00e3o aparece e julgo ser por ser necess\u00e1rio remover outro filtro. Tentei remover o do liveblog, mas n\u00e3o estou a ter sucesso.<\/p>\n<p>Dei uma vista de olhos no plugin e encontrei o seguinte:<\/p>\n<pre><code>private static function add_admin_actions() {\n\n\t\t\/\/ Bail if not in admin area\n\t\tif ( ! is_admin() )\n\t\t\treturn;\n\n\t\tadd_action( &#039;add_meta_boxes&#039;,        array( __CLASS__, &#039;add_meta_box&#039;  ) );\n\t\tadd_action( &#039;restrict_manage_posts&#039;, array( __CLASS__, &#039;add_post_filtering_dropdown_to_manage_posts&#039; ) );\n\t\tadd_action( &#039;pre_get_posts&#039;,         array( __CLASS__, &#039;handle_query_vars_for_post_filtering&#039; ) );\n\t}\n\n-----------------------------\n\npublic static function add_post_filtering_dropdown_to_manage_posts() {\n\t\t$current_screen = get_current_screen();\n\t\tif ( ! post_type_supports( $current_screen-&gt;post_type, self::key ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$options = array(\n\t\t\t&#039;&#039; =&gt; __( &#039;Filter liveblogs&#039;, &#039;liveblog&#039; ),\n\t\t\t&#039;any&#039; =&gt; __( &#039;Any liveblogs&#039;, &#039;liveblog&#039; ),\n\t\t\t&#039;enable&#039; =&gt; __( &#039;Enabled liveblogs&#039;, &#039;liveblog&#039; ),\n\t\t\t&#039;archive&#039; =&gt; __( &#039;Archived liveblogs&#039;, &#039;liveblog&#039; ),\n\t\t\t&#039;none&#039; =&gt; __( &#039;No liveblogs&#039;, &#039;liveblog&#039; ),\n\t\t);\n\t\techo self::get_template_part( &#039;restrict-manage-posts.php&#039;, compact( &#039;options&#039; ) );\n\t}\n\n----------------------------<\/code><\/pre>\n<p>Do que entendi, \u00e9 a add_post_filtering_dropdown_to_manage_posts que invoca os filtros. Tentei criar uma remove_action, mas sem sucesso. Podem dar-me uma ajuda para remover este filtro, por favor? Obrigado.<\/p>\n","protected":false},"template":"","class_list":["post-18821","topic","type-topic","status-publish","hentry","topic-tag-remover-filtros"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18821\/revisions"}],"predecessor-version":[{"id":18823,"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18821\/revisions\/18823"}],"wp:attachment":[{"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}