{"id":1099,"date":"2018-09-11T14:36:46","date_gmt":"2018-09-11T12:36:46","guid":{"rendered":"https:\/\/www.knowboard.de\/?p=1099"},"modified":"2019-03-01T15:47:18","modified_gmt":"2019-03-01T14:47:18","slug":"wordpress-run-once-to-automatically-dismiss-the-privacy-notice-pointer-in-wp-4-9-6-for-all-users","status":"publish","type":"post","link":"https:\/\/www.knowboard.de\/wordpress-run-once-to-automatically-dismiss-the-privacy-notice-pointer-in-wp-4-9-6-for-all-users\/","title":{"rendered":"WordPress – Run once to automatically dismiss the Privacy Notice pointer in WP 4.9.6 for all users."},"content":{"rendered":"
add_action( 'admin_init', 'typewheel_remove_privacy_notice_pointer_wp496' );\r\nfunction typewheel_remove_privacy_notice_pointer_wp496() {\r\n\r\n\t$users = get_users();\r\n\r\n\tforeach ( $users as $user ) {\r\n\r\n\t\t$dismissed = array_filter( explode( ',', (string) get_user_meta( $user->ID, 'dismissed_wp_pointers', true ) ) );\r\n\r\n\t\t$pointer = 'wp496_privacy';\r\n\r\n\t\tif ( ! in_array( $pointer, $dismissed ) ) {\r\n\r\n\t\t\t$dismissed[] = $pointer;\r\n\t\t\t$dismissed = implode( ',', $dismissed );\r\n\t\t\r\n\t\t\tupdate_user_meta( $user->ID, 'dismissed_wp_pointers', $dismissed );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}<\/pre>\n

Read More:\u00a0https:\/\/gist.github.com\/uamv\/b4f74afb91c0b9155f18e1766644d20d<\/p>\n","protected":false},"excerpt":{"rendered":"

add_action( ‚admin_init‘, ‚typewheel_remove_privacy_notice_pointer_wp496‘ ); function typewheel_remove_privacy_notice_pointer_wp496() { $users = get_users(); foreach ( $users as $user ) { $dismissed = array_filter( explode( ‚,‘, (string) get_user_meta( $user->ID, ‚dismissed_wp_pointers‘, true ) ) ); $pointer = ‚wp496_privacy‘; if ( ! in_array( $pointer, $dismissed ) ) { $dismissed[] = $pointer; $dismissed = implode( ‚,‘, $dismissed ); update_user_meta( $user->ID, ‚dismissed_wp_pointers‘, $dismissed…<\/p>\n","protected":false},"author":1,"featured_media":506,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"categories":[60,6],"tags":[],"class_list":["post-1099","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gdpr","category-wordpress","entry","has-media"],"_links":{"self":[{"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/posts\/1099"}],"collection":[{"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/comments?post=1099"}],"version-history":[{"count":0,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/posts\/1099\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/media\/506"}],"wp:attachment":[{"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/media?parent=1099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/categories?post=1099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/tags?post=1099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}