├── .gitignore ├── README.md ├── assets ├── css │ ├── main.css │ └── prism.css ├── images │ ├── donate-banner.jpg │ ├── github-banner.jpg │ ├── github-icon.png │ ├── rate-us-banner.jpg │ ├── share-ideas-banner.jpg │ ├── working-hard.jpg │ └── wp-icon.png └── js │ ├── prism.min.js │ └── scripts.js ├── gutenberg-manager.php ├── inc ├── core.php ├── default-blocks.php ├── hooks.php └── options.php ├── index.php ├── languages └── readme.txt └── uninstall.php /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gutenberg Manager 2 | 3 | A simple and easy way to manage Gutenberg editor. You can disable/enable the editor and the elements for every post types. 4 | 5 | Gutenberg is a great editor but sometime you could want to disable it for Pages, Posts or other post types. Gutenberg Manager allow you to enable/disable the editor where you want. Why would you want to disable the editor on pages? Maybe you would like to use a page builder like Visual Composer or Elementor instead! 6 | 7 | Gutenberg Editor will be probably included in the next great release of WordPress (5.0) so Gutenberg Manager will be really useful. With the Manager you can also decide to disable specific blocks in the editor if you don't need them. 8 | 9 | If you are developing or editing a theme/plugin all features are also available via Hooks so you can include Gutenberg Manager plugin inside your theme and use it without the Option Panel. 10 | 11 | ## Installation (WordPress Backend) 12 | 13 | 1. Login to your WordPress website. When you're logged in, you will be in your "Dashboard". On the left-hand side, you will see a menu. In that menu, click on "Plugins". 14 | 2. Click on "Add New" near the top of the screen. Type "Gutenberg Manager" in the search bar. 15 | 3. This will give you a page of search results. Our plugin should be visible now. Click the "Install Now" link to start installing our plugin. 16 | 4. Click the "Activate" button that appeared where the "Install Now" button was previously located. 17 | 18 | ## Installation (FTP) 19 | 20 | 1. Download Gutenberg Manager zip file from Github (Releases) or WordPress.org repository. 21 | 2. "Unzip" the file you just downloaded and you will see a folder called "manager-for-gutenberg". 22 | 3. Login to your hosting using your FTP account. 23 | 4. Go to the folder /wp-content/plugins/ on your WP installation and upload the "manager-for-gutenberg" folder. 24 | 5. Now login your WP backend and in Plugins page "Activate" Gutenberg Manager 25 | 26 | ## How to use 27 | 28 | Under "Gutenberg" menu in your dashboard you'll find a new button "Gutenberg Manager". This is the Option Panel of our plugin. For now it includes 4 options areas: 29 | 30 | 1. Settings 31 | 2. Default Blocks 32 | 3. Additional Blocks 33 | 4. API/Hooks 34 | 35 | ## Settings 36 | 37 | Here you can globally disable Gutenberg Editor or manage the visibility of editor in the different post types. 38 | 39 |  40 | 41 | ## Default Blocks 42 | 43 | Here you can disable the default blocks in the Editor. 44 | 45 |  46 | 47 | ## Additional Blocks 48 | 49 | Here you can enable our additional blocks in the Editor. 50 | 51 | > This section is under construction 52 | 53 | ## API/Hooks 54 | 55 | Here you find a list of Hooks to use in your custom Theme/Plugin! 56 | > Note: there is an action to disable the Option Panel of Gutenberg Manager so our plugin will be hidden for the final user but the theme/plugin developer can use all the plugin's features. 57 | 58 |  59 | 60 | ## How You Can Contribute 61 | 62 | Anyone is welcome to contribute to Gutenberg Manager. 63 | 64 | There are various ways you can contribute: 65 | 66 | * [Raise an issue](https://github.com/unCommonsTeam/gutenberg-manager/issues) on GitHub. 67 | * [Send us a Pull Request](https://github.com/unCommonsTeam/gutenberg-manager/pulls) with your bug fixes and/or new features. 68 | * Provide feedbacks and [suggestions on enhancements](https://github.com/unCommonsTeam/gutenberg-manager/labels/enhancement). -------------------------------------------------------------------------------- /assets/css/main.css: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Gutenberg Manager Main Style. 4 | * @since 1.0 5 | */ 6 | 7 | /* GLOBALS */ 8 | .gm-clearfix { 9 | clear: both; 10 | } 11 | 12 | /* CONTENT/SIDEBAR SYSTEM */ 13 | 14 | .gm-content-sidebar-wrap { 15 | display: table; 16 | width: 100%; 17 | table-layout: fixed; 18 | } 19 | 20 | .gm-content { 21 | width: 100%; 22 | display: table-cell; 23 | margin: 0; 24 | padding: 0; 25 | vertical-align: top; 26 | } 27 | 28 | .gm-sidebar { 29 | width: 260px; 30 | padding-left: 20px; 31 | display: table-cell; 32 | margin: 0; 33 | vertical-align: top; 34 | } 35 | 36 | .gm-sidebar-spot { 37 | margin-bottom: 40px; 38 | } 39 | 40 | .gm-sidebar-spot h2 { 41 | color: #019875; 42 | padding-bottom: 9px; 43 | border-bottom: solid 1px #ccc; 44 | } 45 | 46 | .gm-sidebar-spot p { 47 | font-size: 16px; 48 | font-weight: 300; 49 | } 50 | 51 | .gm-sidebar-spot img { 52 | display: block; 53 | width: 100%; 54 | margin-bottom: 10px; 55 | } 56 | 57 | 58 | /* OPTIONS */ 59 | 60 | .gm-content .dashicons, 61 | .gm-content .dashicons-before::before { 62 | line-height: 1.3; 63 | } 64 | 65 | .gm-container { 66 | position: relative; 67 | max-width: 100%; 68 | margin: 20px 0 1px; 69 | padding: 20px 20px 0; 70 | border: 1px solid #e5e5e5; 71 | background-color: #fdfdfd; 72 | box-shadow: 0 1px 1px rgba(0,0,0,.04); 73 | } 74 | 75 | .gm-container h3 { 76 | margin: -20px -20px 0; 77 | padding: 1em; 78 | border-bottom: 1px solid #ccc; 79 | background-color: #fdfdfd; 80 | } 81 | 82 | .gm-container .dashicons, 83 | .gm-container .dashicons-before::before { 84 | line-height: 1; 85 | } 86 | 87 | .gm-image { 88 | max-width: 100%; 89 | margin: 10px 0; 90 | } 91 | 92 | .gm-more-image { 93 | width: 400px; 94 | float: left; 95 | margin: 0 20px 0 0; 96 | } 97 | 98 | .gm-more-title { 99 | font-size: 30px; 100 | margin-top: 40px; 101 | font-weight: 200; 102 | line-height: normal; 103 | } 104 | 105 | .gm-more-text .button-secondary img { 106 | margin-top: 4px; 107 | } 108 | 109 | .gm-container pre { 110 | overflow: hidden; 111 | } 112 | 113 | 114 | /* GRID SYSTEM */ 115 | 116 | .gm-row { 117 | display: -webkit-box; 118 | display: -ms-flexbox; 119 | display: flex; 120 | -ms-flex-wrap: wrap; 121 | flex-wrap: wrap; 122 | } 123 | 124 | .gm-col-1, .gm-col-2, .gm-col-3, .gm-col-4, .gm-col-5, .gm-col-6, .gm-col-7, .gm-col-8, .gm-col-9, .gm-col-10, .gm-col-11, .gm-col-12 { 125 | position: relative; 126 | width: 100%; 127 | min-height: 1px; 128 | } 129 | 130 | .gm-col-1 { 131 | -webkit-box-flex: 0; 132 | -ms-flex: 0 0 8.333333%; 133 | flex: 0 0 8.333333%; 134 | max-width: 8.333333%; 135 | } 136 | 137 | .gm-col-2 { 138 | -webkit-box-flex: 0; 139 | -ms-flex: 0 0 16.666667%; 140 | flex: 0 0 16.666667%; 141 | max-width: 16.666667%; 142 | } 143 | 144 | .gm-col-3 { 145 | -webkit-box-flex: 0; 146 | -ms-flex: 0 0 25%; 147 | flex: 0 0 25%; 148 | max-width: 25%; 149 | } 150 | 151 | .gm-col-4 { 152 | -webkit-box-flex: 0; 153 | -ms-flex: 0 0 33.333333%; 154 | flex: 0 0 33.333333%; 155 | max-width: 33.333333%; 156 | } 157 | 158 | .gm-col-5 { 159 | -webkit-box-flex: 0; 160 | -ms-flex: 0 0 41.666667%; 161 | flex: 0 0 41.666667%; 162 | max-width: 41.666667%; 163 | } 164 | 165 | .gm-col-6 { 166 | -webkit-box-flex: 0; 167 | -ms-flex: 0 0 50%; 168 | flex: 0 0 50%; 169 | max-width: 50%; 170 | } 171 | 172 | .gm-col-7 { 173 | -webkit-box-flex: 0; 174 | -ms-flex: 0 0 58.333333%; 175 | flex: 0 0 58.333333%; 176 | max-width: 58.333333%; 177 | } 178 | 179 | .gm-col-8 { 180 | -webkit-box-flex: 0; 181 | -ms-flex: 0 0 66.666667%; 182 | flex: 0 0 66.666667%; 183 | max-width: 66.666667%; 184 | } 185 | 186 | .gm-col-9 { 187 | -webkit-box-flex: 0; 188 | -ms-flex: 0 0 75%; 189 | flex: 0 0 75%; 190 | max-width: 75%; 191 | } 192 | 193 | .gm-col-10 { 194 | -webkit-box-flex: 0; 195 | -ms-flex: 0 0 83.333333%; 196 | flex: 0 0 83.333333%; 197 | max-width: 83.333333%; 198 | } 199 | 200 | .gm-col-11 { 201 | -webkit-box-flex: 0; 202 | -ms-flex: 0 0 91.666667%; 203 | flex: 0 0 91.666667%; 204 | max-width: 91.666667%; 205 | } 206 | 207 | .gm-col-12 { 208 | -webkit-box-flex: 0; 209 | -ms-flex: 0 0 100%; 210 | flex: 0 0 100%; 211 | max-width: 100%; 212 | } 213 | 214 | 215 | /* RESPONSIVE */ 216 | 217 | @media screen and (max-width: 1400px) { 218 | 219 | .gm-more-title { 220 | font-size: 24px; 221 | } 222 | 223 | } 224 | 225 | @media screen and (max-width: 1200px) { 226 | 227 | .gm-more-title { 228 | font-size: 20px; 229 | } 230 | 231 | } 232 | 233 | @media screen and (max-width: 1100px) { 234 | 235 | .gm-more-image { 236 | width: 100%; 237 | margin-bottom: 20px; 238 | } 239 | 240 | .gm-more-title { 241 | font-size: 24px; 242 | } 243 | 244 | } 245 | 246 | @media screen and (max-width: 960px) { 247 | 248 | .gm-col-1, .gm-col-2, .gm-col-3, .gm-col-4, .gm-col-5, .gm-col-6, .gm-col-7, .gm-col-8, .gm-col-9, .gm-col-10, .gm-col-11, .gm-col-12 { 249 | max-width: 100%; 250 | flex: 0 0 100%; 251 | } 252 | 253 | .gm-content-sidebar-wrap, 254 | .gm-content, 255 | .gm-sidebar { 256 | display: inherit; 257 | width: 100%; 258 | padding: 0; 259 | } 260 | 261 | } 262 | 263 | 264 | @media screen and (max-width: 400px) { 265 | 266 | .gm-more-title { 267 | font-size: 20px; 268 | } 269 | 270 | } 271 | 272 | -------------------------------------------------------------------------------- /assets/css/prism.css: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.9.0 2 | http://prismjs.com/download.html?themes=prism-coy&languages=markup+css+clike+javascript+php */ 3 | /** 4 | * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML 5 | * Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics); 6 | * @author Tim Shedor 7 | */ 8 | 9 | code[class*="language-"], 10 | pre[class*="language-"] { 11 | color: black; 12 | background: none; 13 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 14 | text-align: left; 15 | white-space: pre; 16 | word-spacing: normal; 17 | word-break: normal; 18 | word-wrap: normal; 19 | line-height: 1.5; 20 | 21 | -moz-tab-size: 4; 22 | -o-tab-size: 4; 23 | tab-size: 4; 24 | 25 | -webkit-hyphens: none; 26 | -moz-hyphens: none; 27 | -ms-hyphens: none; 28 | hyphens: none; 29 | } 30 | 31 | /* Code blocks */ 32 | pre[class*="language-"] { 33 | position: relative; 34 | margin: .5em 0; 35 | overflow: visible; 36 | padding: 0; 37 | } 38 | pre[class*="language-"]>code { 39 | position: relative; 40 | border-left: 10px solid #019875; 41 | box-shadow: -1px 0px 0px 0px #019875, 0px 0px 0px 1px #dfdfdf; 42 | background-color: #fdfdfd; 43 | background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%); 44 | background-size: 3em 3em; 45 | background-origin: content-box; 46 | background-attachment: local; 47 | } 48 | 49 | code[class*="language"] { 50 | max-height: inherit; 51 | padding: 0 1em; 52 | display: block; 53 | overflow: auto; 54 | } 55 | 56 | /* Margin bottom to accomodate shadow */ 57 | :not(pre) > code[class*="language-"], 58 | pre[class*="language-"] { 59 | background-color: #fdfdfd; 60 | -webkit-box-sizing: border-box; 61 | -moz-box-sizing: border-box; 62 | box-sizing: border-box; 63 | margin-bottom: 1em; 64 | } 65 | 66 | /* Inline code */ 67 | :not(pre) > code[class*="language-"] { 68 | position: relative; 69 | padding: .2em; 70 | border-radius: 0.3em; 71 | color: #c92c2c; 72 | border: 1px solid rgba(0, 0, 0, 0.1); 73 | display: inline; 74 | white-space: normal; 75 | } 76 | 77 | pre[class*="language-"]:before, 78 | pre[class*="language-"]:after { 79 | content: ''; 80 | z-index: -2; 81 | display: block; 82 | position: absolute; 83 | bottom: 0.75em; 84 | left: 0.18em; 85 | width: 40%; 86 | height: 20%; 87 | max-height: 13em; 88 | box-shadow: 0px 13px 8px #979797; 89 | -webkit-transform: rotate(-2deg); 90 | -moz-transform: rotate(-2deg); 91 | -ms-transform: rotate(-2deg); 92 | -o-transform: rotate(-2deg); 93 | transform: rotate(-2deg); 94 | } 95 | 96 | :not(pre) > code[class*="language-"]:after, 97 | pre[class*="language-"]:after { 98 | right: 0.75em; 99 | left: auto; 100 | -webkit-transform: rotate(2deg); 101 | -moz-transform: rotate(2deg); 102 | -ms-transform: rotate(2deg); 103 | -o-transform: rotate(2deg); 104 | transform: rotate(2deg); 105 | } 106 | 107 | .token.comment, 108 | .token.block-comment, 109 | .token.prolog, 110 | .token.doctype, 111 | .token.cdata { 112 | color: #7D8B99; 113 | } 114 | 115 | .token.punctuation { 116 | color: #5F6364; 117 | } 118 | 119 | .token.property, 120 | .token.tag, 121 | .token.boolean, 122 | .token.number, 123 | .token.function-name, 124 | .token.constant, 125 | .token.symbol, 126 | .token.deleted { 127 | color: #c92c2c; 128 | } 129 | 130 | .token.selector, 131 | .token.attr-name, 132 | .token.string, 133 | .token.char, 134 | .token.function, 135 | .token.builtin, 136 | .token.inserted { 137 | color: #2f9c0a; 138 | } 139 | 140 | .token.operator, 141 | .token.entity, 142 | .token.url, 143 | .token.variable { 144 | color: #a67f59; 145 | background: rgba(255, 255, 255, 0.5); 146 | } 147 | 148 | .token.atrule, 149 | .token.attr-value, 150 | .token.keyword, 151 | .token.class-name { 152 | color: #1990b8; 153 | } 154 | 155 | .token.regex, 156 | .token.important { 157 | color: #e90; 158 | } 159 | 160 | .language-css .token.string, 161 | .style .token.string { 162 | color: #a67f59; 163 | background: rgba(255, 255, 255, 0.5); 164 | } 165 | 166 | .token.important { 167 | font-weight: normal; 168 | } 169 | 170 | .token.bold { 171 | font-weight: bold; 172 | } 173 | .token.italic { 174 | font-style: italic; 175 | } 176 | 177 | .token.entity { 178 | cursor: help; 179 | } 180 | 181 | .namespace { 182 | opacity: .7; 183 | } 184 | 185 | @media screen and (max-width: 767px) { 186 | pre[class*="language-"]:before, 187 | pre[class*="language-"]:after { 188 | bottom: 14px; 189 | box-shadow: none; 190 | } 191 | 192 | } 193 | 194 | /* Plugin styles */ 195 | .token.tab:not(:empty):before, 196 | .token.cr:before, 197 | .token.lf:before { 198 | color: #e0d7d1; 199 | } 200 | 201 | /* Plugin styles: Line Numbers */ 202 | pre[class*="language-"].line-numbers { 203 | padding-left: 0; 204 | } 205 | 206 | pre[class*="language-"].line-numbers code { 207 | padding-left: 3.8em; 208 | } 209 | 210 | pre[class*="language-"].line-numbers .line-numbers-rows { 211 | left: 0; 212 | } 213 | 214 | /* Plugin styles: Line Highlight */ 215 | pre[class*="language-"][data-line] { 216 | padding-top: 0; 217 | padding-bottom: 0; 218 | padding-left: 0; 219 | } 220 | pre[data-line] code { 221 | position: relative; 222 | padding-left: 4em; 223 | } 224 | pre .line-highlight { 225 | margin-top: 0; 226 | } 227 | 228 | -------------------------------------------------------------------------------- /assets/images/donate-banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unCommonsTeam/gutenberg-manager/1a91d756f3d8c8423c27668885881fa7a27b8261/assets/images/donate-banner.jpg -------------------------------------------------------------------------------- /assets/images/github-banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unCommonsTeam/gutenberg-manager/1a91d756f3d8c8423c27668885881fa7a27b8261/assets/images/github-banner.jpg -------------------------------------------------------------------------------- /assets/images/github-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unCommonsTeam/gutenberg-manager/1a91d756f3d8c8423c27668885881fa7a27b8261/assets/images/github-icon.png -------------------------------------------------------------------------------- /assets/images/rate-us-banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unCommonsTeam/gutenberg-manager/1a91d756f3d8c8423c27668885881fa7a27b8261/assets/images/rate-us-banner.jpg -------------------------------------------------------------------------------- /assets/images/share-ideas-banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unCommonsTeam/gutenberg-manager/1a91d756f3d8c8423c27668885881fa7a27b8261/assets/images/share-ideas-banner.jpg -------------------------------------------------------------------------------- /assets/images/working-hard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unCommonsTeam/gutenberg-manager/1a91d756f3d8c8423c27668885881fa7a27b8261/assets/images/working-hard.jpg -------------------------------------------------------------------------------- /assets/images/wp-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unCommonsTeam/gutenberg-manager/1a91d756f3d8c8423c27668885881fa7a27b8261/assets/images/wp-icon.png -------------------------------------------------------------------------------- /assets/js/prism.min.js: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.9.0 2 | http://prismjs.com/download.html?themes=prism-coy&languages=markup+css+clike+javascript+php */ 3 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){h.lastIndex=0;var _=h.exec(w),P=1;if(!_&&m&&b!=t.length-1){if(h.lastIndex=k,_=h.exec(e),!_)break;for(var A=_.index+(d?_[1].length:0),j=_.index+_[0].length,x=b,O=k,N=t.length;N>x&&(j>O||!t[x].type&&!t[x-1].greedy);++x)O+=t[x].length,A>=O&&(++b,k=O);if(t[b]instanceof s||t[x-1].greedy)continue;P=x-b,w=e.slice(k,O),_.index-=k}if(_){d&&(p=_[1].length);var A=_.index+p,_=_[0].slice(p),j=A+_.length,S=w.slice(0,A),C=w.slice(j),M=[b,P];S&&(++b,k+=S.length,M.push(S));var E=new s(g,f?n.tokenize(_,f):_,y,_,m);if(M.push(E),C&&M.push(C),Array.prototype.splice.apply(t,M),1!=P&&n.matchGrammar(e,t,r,b,k,!0,g),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""+l.tag+">"},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); 4 | Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; 5 | Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/( 409 | 410 | 411 | 412 | 413 | 414 | 415 |
gm_global
434 | add_action ( 'gm_global', 'your_global_features' );
435 |
436 | function your_global_features(){
437 |
438 | // This is the function to enable the hidden mode
439 | gm_set_hidden(true);
440 |
441 | }
442 |
443 |
444 |
445 |
446 |
447 |
448 |
455 | add_action ( 'gm_global', 'your_global_features' );
456 |
457 | function your_global_features(){
458 |
459 | // This is the function to completely disable Gutenberg Editor
460 | gm_global_disable(true);
461 |
462 | }
463 |
464 |
465 |
466 |
467 |
468 |
gm_post_types
489 | add_action ( 'gm_post_types', 'your_posttypes_managing' );
490 |
491 | function your_posttypes_managing(){
492 |
493 | // This function will disable Gutenberg Editor on Posts, Pages, Custom post type and it accepts an array of values
494 | gm_disable_post_type(
495 | array(
496 | 'post',
497 | 'page',
498 | 'custom_post_type'
499 | )
500 | );
501 |
502 | }
503 |
504 |
505 |
506 |
507 |
508 |
509 |
gm_default_blocks
530 | add_action ( 'gm_default_blocks', 'your_default_blocks_managing' );
531 |
532 | function your_default_blocks_managing(){
533 |
534 | // This function will disable Image, Facebook and Twitter blocks on Gutenberg Editor and it accepts an array of values
535 | gm_disable_block(
536 | array(
537 | 'image',
538 | 'facebook',
539 | 'twitter'
540 | )
541 | );
542 |
543 | }
544 |
545 |
546 |
547 |
548 |
549 |
556 | array(
557 | //Common Blocks
558 | 'image', // Image
559 | 'gallery', // Gallery
560 | 'heading', // Heading
561 | 'quote', // Quote
562 | 'list', // List
563 | 'cover', // Cover
564 | 'video', // Video
565 | 'audio', // Audio
566 | 'paragraph', // Paragraph
567 | 'file', // File
568 |
569 | // Formatting
570 | 'pullquote', // Pullquote
571 | 'table', // Table
572 | 'preformatted', // Preformatted
573 | 'code', // Code
574 | 'custom_html', // Custom HTML
575 | 'classic_text', // Classic
576 | 'verse', // Verse
577 |
578 | // Layouts Elements
579 | 'media_text', // Media & Text
580 | 'separator', // Separator
581 | 'more', // More
582 | 'button', // Button
583 | 'columns', // Columns
584 | 'nextpage', // Page Break
585 | 'spacer', // Spacer
586 |
587 | // Widgets
588 | 'shortcode', // Shortcode
589 | 'latest_posts', // Latest Posts
590 | 'latest_comments', // Latest Comments
591 | 'categories', // Categories
592 | 'archives', // Archives
593 |
594 | // Embeds
595 | 'embed', // Embed
596 | 'twitter', // Twitter
597 | 'youtube', // YouTube
598 | 'facebook', // Facebook
599 | 'instagram', // Instagram
600 | 'wordpress', // WordPress
601 | 'soundcloud', // SoundCloud
602 | 'spotify', // Spotify
603 | 'flickr', // Flickr
604 | 'vimeo', // Vimeo
605 | 'animoto', // Animoto
606 | 'cloudup', // Cloudup
607 | 'collegehumor', // CollegeHumor
608 | 'dailymotion', // Dailymotion
609 | 'funny_or_die', // Funny or Die
610 | 'hulu', // Hulu
611 | 'imgur', // Imgur
612 | 'issuu', // Issuu
613 | 'kickstarter', // Kickstarter
614 | 'meetup', // Meetup.com
615 | 'mixcloud', // Mixcloud
616 | 'photobucket', // Photobucket
617 | 'polldaddy', // Polldaddy
618 | 'reddit', // Reddit
619 | 'reverbnation', // ReverbNation
620 | 'screencast', // Screencast
621 | 'scribd', // Scribd
622 | 'slideshare', // Slideshare
623 | 'smugmug', // SmugMug
624 | 'speaker_deck', // Speaker Deck
625 | 'ted', // TED
626 | 'tumblr', // Tumblr
627 | 'videopress', // VideoPress
628 | 'wordpress_tv', // WordPress.tv
629 | )
630 |
631 |
632 |
633 |
634 |
635 |