PageSourceSearch

https://fulltextsearch.org/docs/_next/static/chunks/pages/en/exten…_admin_notices_in_serie-6625e9e2123254e4.js

js fulltextsearch.org collected 2026-09-25 21:08:14 UTC 9,745 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2206],{3098:function(i,s,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/en/extending/filters/wpfts_admin_notices_in_serie",function(){return e(53630)}])},53630:function(i,s,e){"use strict";e.r(s),e.d(s,{useTOC:function(){return useTOC}});var n=e(85893),t=e(37812),l=e(80390),h=e(38925);function useTOC(i){return[{value:"When Used",id:"when-used",depth:2},{value:"Arguments",id:"arguments",depth:2},{value:"Return Value",id:"return-value",depth:2},{value:"Filter Logic",id:"filter-logic",depth:2},{value:"Example",id:"example",depth:2},{value:"Important Notes",id:"important-notes",depth:2}]}s.default=(0,t.c)(function(i){let{toc:s=useTOC(i)}=i,e={code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",span:"span",ul:"ul",...(0,h.a)(),...i.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:"wpfts_admin_notices_in_serie (Filter)"}),"\n",(0,n.jsxs)(e.p,{children:["The ",(0,n.jsx)(e.code,{children:"wpfts_admin_notices_in_serie"})," filter in WP Fast Total Search controls the display of admin notices in the WordPress admin panel. It acts as a “fuse,” preventing less important notices from being displayed if there are more important ones requiring the user’s attention."]}),"\n",(0,n.jsx)(e.h2,{id:s[0].id,children:s[0].value}),"\n",(0,n.jsxs)(e.p,{children:["This filter is called in the ",(0,n.jsx)(e.code,{children:"admin_notices()"})," method of the ",(0,n.jsx)(e.code,{children:"WPFTS_Core"})," class and is used to determine whether to display plugin-related notices."]}),"\n",(0,n.jsx)(e.h2,{id:s[1].id,children:s[1].value}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:"$is_all_great"})," (bool): A flag indicating whether everything is fine with the plugin. ",(0,n.jsx)(e.code,{children:"true"})," if there are no critical errors or important notices, ",(0,n.jsx)(e.code,{children:"false"})," otherwise."]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:s[2].id,children:s[2].value}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:"$is_all_great"})," (bool): The modified flag. If ",(0,n.jsx)(e.code,{children:"false"})," is returned, less important notices will not be displayed. If ",(0,n.jsx)(e.code,{children:"true"})," is returned, less important notices will be displayed if they exist."]}),"\n"]}),"\n",(0,n.jsx)(e.h2,{id:s[3].id,children:s[3].value}),"\n",(0,n.jsxs)(e.p,{children:["The WPFTS plugin displays notices in a specific order.  First, the most important notices are displayed, such as error messages or database update requirements. If such notices exist, the plugin sets the ",(0,n.jsx)(e.code,{children:"$is_all_great"})," flag to ",(0,n.jsx)(e.code,{children:"false"}),". Then, the ",(0,n.jsx)(e.code,{children:"wpfts_admin_notices_in_serie"})," filter is called. If the filter handler returns ",(0,n.jsx)(e.code,{children:"false"}),", less important notices, such as reminders about plugin settings or information about new versions, will not be displayed. This avoids overwhelming the user with notifications and focuses their attention on the most important messages. In other words, this filter allows suppressing standard notifications if the add-on needs to display more important notifications."]}),"\n",(0,n.jsx)(e.h2,{id:s[4].id,children:s[4].value}),"\n",(0,n.jsx)(e.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"","data-copy":"",children:(0,n.jsxs)(e.code,{children:[(0,n.jsx)(e.span,{children:(0,n.jsx)(e.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"/**"})}),"\n",(0,n.jsx)(e.span,{children:(0,n.jsx)(e.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" * Suppresses default notifications if there are custom ones."})}),"\n",(0,n.jsx)(e.span,{children:(0,n.jsx)(e.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" */"})}),"\n",(0,n.jsx)(e.span,{children:" "}),"\n",(0,n.jsxs)(e.span,{children:[(0,n.jsx)(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"add_filter"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"'wpfts_admin_notices_in_serie'"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:", "}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"'suppress_default_notices'"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{children:[(0,n.jsx)(e.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"function"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" suppress_default_notices"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"($is_all_great) {"})]}),"\n",(0,n.jsx)(e.span,{children:(0,n.jsx)(e.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"	// Checks if there are custom notices to display."})}),"\n",(0,n.jsxs)(e.span,{children:[(0,n.jsx)(e.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"	if"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" ("}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"get_option"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"'my_plugin_has_notices'"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:") "}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"=="}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" 1"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:") {"})]}),"\n",(0,n.jsxs)(e.span,{children:[(0,n.jsx)(e.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"		return"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" false"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"; "}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// Suppresses default notifications."})]}),"\n",(0,n.jsx)(e.span,{children:(0,n.jsx)(e.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"		// Displays custom notices"})}),"\n",(0,n.jsxs)(e.span,{children:[(0,n.jsx)(e.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"		echo"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" '<div class=\"notice notice-warning\"><p>'"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"."}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"esc_html__"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"'My plugin notice'"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:", "}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"'my-plugin'"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"."}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"'</p></div>'"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsx)(e.span,{children:(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"	}"})}),"\n",(0,n.jsx)(e.span,{children:(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  "})}),"\n",(0,n.jsxs)(e.span,{children:[(0,n.jsx)(e.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"	return"}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $is_all_great; "}),(0,n.jsx)(e.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// In other cases, does not change the default behavior."})]}),"\n",(0,n.jsx)(e.span,{children:(0,n.jsx)(e.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  }"})}),"\n",(0,n.jsx)(e.span,{children:" "})]})}),"\n",(0,n.jsx)(e.h2,{id:s[5].id,children:s[5].value}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["The ",(0,n.jsx)(e.code,{children:"wpfts_admin_notices_in_serie"}
1)," filter is called in the ",(0,n.jsx)(e.code,{children:"admin_notices()"})," method of the ",(0,n.jsx)(e.code,{children:"WPFTS_Core"})," class."]}),"\n",(0,n.jsxs)(e.li,{children:["The return value must be a boolean (",(0,n.jsx)(e.code,{children:"true"})," or ",(0,n.jsx)(e.code,{children:"false"}),")."]}),"\n"]}),"\n",(0,n.jsx)(e.p,{children:"This filter provides developers with additional control over the display of WPFTS notifications in the WordPress admin panel."})]})},"/en/extending/filters/wpfts_admin_notices_in_serie",{filePath:"pages/en/extending/filters/wpfts_admin_notices_in_serie.md",timestamp:1733329702e3,pageMap:l.v,frontMatter:{},title:"wpfts_admin_notices_in_serie (Filter)"},"undefined"==typeof RemoteContent?useTOC:RemoteContent.useTOC)}},function(i){i.O(0,[9993,9774,2888,179],function(){return i(i.s=3098)}),_N_E=i.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.