'meta-link-notices-wrap' ], // $attributes - Additional attributes for the link tag. [ $this , 'print_notice_manager_panel' ] // $panel callback - cb echoes its output ); wp_enqueue_script( 'notice_manager_panel', plugin_dir_url( __FILE__ ) . 'js/notice_manager_panel.js' , null, false , true ); } /* not JSON-safe - unescaped quotes */ function print_notice_manager_panel(){ // NOTE: // button is a copy of is-dismissible button - for styling purposes only // js functionality and listener - js/notice_manager_meta_panel.js echo '
'; echo '' ; } /** * A plugin 'notice-manager' exists now on @link https://wordpress.org/plugins/ * Disable update notifications completely for our plugin. * * @todo - use update_checker to only upload our plugin from github */ function remove_update_notifications($value) { if ( isset( $value ) && is_object( $value ) ) { unset( $value->response[ plugin_basename(__FILE__) ] ); } return $value; } } global $notice_manager; $notice_manager = new NoticeManager(); add_filter( 'wds_required_plugins', function($required){ $req_array = [ 'screen-meta-links/screen-meta-links.php', ]; return array_merge( $required, $req_array ); });