You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.0 KiB
JavaScript

(()=>{"use strict";const e=wp.hooks,o=wp.i18n,n=wp.element,t=wp.compose,a=wp.data,r=wp.components;const l=(0,t.compose)((0,a.withSelect)((function(e){return{robots:e("rank-math-pro").getNewsRobots()}})),(0,a.withDispatch)((function(e){return{updateNewsRobots:function(o){e("rank-math-pro").updateNewsRobots(o)}}})))((function(e){return wp.element.createElement(n.Fragment,null,wp.element.createElement(r.PanelBody,{initialOpen:!0},wp.element.createElement(r.RadioControl,{label:(0,o.__)("Googlebot-News index","rank-math-pro"),help:(0,o.__)('Using an "Index" or "NoIndex" option allows you to control what Google News Bot (not to be confused with Google Search Bot) can include or not include in the Google News Index.',"rank-math-pro"),selected:e.robots,options:[{value:"index",label:(0,o.__)("Index","rank-math-pro")},{value:"noindex",label:(0,o.__)("No Index","rank-math-pro")}],onChange:e.updateNewsRobots})))}));(0,e.addAction)("rank_math_loaded","rank-math-pro",(function(){(0,e.addFilter)("rankMath.advanced.newsSitemap","rank-math-pro",(function(){return l}))}))})();