williamfridh / pattern_friend

WordPress plugin that extends the default Gutenberg
GNU General Public License v2.0
0 stars 0 forks source link

Review - Calling files remotely #25

Closed williamfridh closed 3 weeks ago

williamfridh commented 1 month ago

Offloading images, js, css, and other scripts to your servers or any remote service (like Google, MaxCDN, jQuery.com etc) is disallowed. When you call remote data you introduce an unnecessary dependency on another site. If the file you're calling isn't a part of WordPress Core, then you should include it -locally- in your plugin, not remotely. If the file IS included in WordPress core, please call that instead.

An exception to this rule is if your plugin is performing a service. We will permit this on a case by case basis. Since this can be confusing we have some examples of what are not permitted: Offloading jquery CSS files to Google - You should include the CSS in your plugin. Inserting an iframe with a help doc - A link, or including the docs in your plugin is preferred. Calling images from your own domain - They should be included in your plugin. Here are some examples of what we would permit: Calling font families from Google or their approved CDN (if GPL compatible) API calls back to your server to process possible spam comments (like Akismet) Offloading comments to your own servers (like Disqus) oEmbed calls to a service provider (like Twitter or YouTube) Please remove external dependencies from your plugin and, if possible, include all files within the plugin (that is not called remotely). If instead you feel you are providing a service, please re-write your readme.txt in a manner that explains the service, the servers being called, and if any account is needed to connect.

Example(s) from your plugin:

pattern_friend/src/styles/wordpress.components.css:2290 .components-placeholder.components-placeholder { pattern_friend/build/pages-rtl.css:2288 .components-placeholder.components-placeholder { pattern_friend/build/pages.css:2295 .components-placeholder.components-placeholder { pattern_friend/build/pages.css.map:1 ...\n padding-bottom: 20px;\r\n}\r\n\r\n.components-placeholder.components-placeholder {\r\n font-size: 13px;\r\n box-sizing: border-box;\r\n position: relative;\r\n padding: 24px;\r\n width: 100%;...

williamfridh commented 1 month ago

The .css.map file should not have to be enqueued, the other is however enqueued.

The files pages-rtl.css and wordpress.components.css are also enqueued now.

williamfridh commented 3 weeks ago

Hopefully done.