Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.lock
.distignore
.editorconfig
.eslintrc
.git
.gitattributes
.github
.gitignore
.stylelintrc.json
.wordpress-org
node_modules
package-lock.json
package.json
phpcs.xml
9 changes: 7 additions & 2 deletions .github/workflows/wordpress-plugin-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ jobs:
with:
php-version: latest
coverage: none
tools: wp-cli
tools: wp-cli:v2.12

- name: Install no-dev dependencies only
run: composer install --no-dev -o

- name: Install latest version of dist-archive-command
run: wp package install wp-cli/dist-archive-command:@stable
run: wp package install wp-cli/dist-archive-command:v3.1.0

- name: Build plugin
run: |
Expand All @@ -33,4 +36,6 @@ jobs:
- name: Run plugin check
uses: wordpress/plugin-check-action@v1
with:
ignore-codes: |
missing_direct_file_access_protection
build-dir: ./tmp-build/${{ github.event.repository.name }}
3 changes: 2 additions & 1 deletion lib/PostType/Website.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ public function register_post_type() {
'show_ui' => true,
'show_in_nav_menus' => true,
'supports' => [
'custom-fields',
'editor',
'thumbnail',
'title',
'custom-fields',
],
'has_archive' => true,
'rewrite' => true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"test:unit": "wp-scripts test-unit-js"
},
"devDependencies": {
"@wordpress/icons": "^11.7.0",
"@wordpress/scripts": "^31.4.0",
"postcss-prefix-selector": "^2.1.1"
},
Expand Down
28 changes: 28 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
=== Webring ===

Contributors: Kau-Boy
Stable tag: 1.0.0
Tested up to: 6.9
Requires at least: 6.8
Requires PHP: 7.4
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
Tags: webring, fediverse, open web, blogroll

Create and manage webrings on your WordPress site.

== Description ==

Create and manage webrings on your WordPress site with a dedicated
custom post type for member websites. You can optionally organize
entries with categories to keep your webrings structured and easy
to maintain.

The plugin also provides a block for displaying the HTML snippet
visitors can use to join or link to your webrings, plus a block
that lists all websites currently included in a webring.

== Changelog ==

= 1.0.0 =
* First stable version
2 changes: 2 additions & 0 deletions src/block/html-snippet/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* @see https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#render
*/

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound

$webring_name = $attributes['webringName'] ?? 'webring';
$show_copy_instructions = $attributes['showCopyInstructions'] ?? true;
$show_copy_button = $attributes['showCopyButton'] ?? true;
Expand Down
97 changes: 97 additions & 0 deletions src/block/website-list/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "webring/website-list",
"version": "0.1.0",
"title": "Webring Website List",
"category": "widgets",
"icon": "smiley",
"description": "Example block scaffolded with Create Block tool.",
"example": {},
"supports": {
"anchor": true,
"align": true,
"html": false,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
}
},
"attributes": {
"categories": {
"type": "array",
"items": {
"type": "object"
}
},
"postLayout": {
"type": "string",
"default": "list"
},
"columns": {
"type": "number",
"default": 3
},
"displayFeaturedImage": {
"type": "boolean",
"default": false
},
"featuredImageAlign": {
"type": "string",
"enum": [ "left", "center", "right" ]
},
"featuredImageSizeSlug": {
"type": "string",
"default": "thumbnail"
},
"featuredImageSizeWidth": {
"type": "number"
},
"featuredImageSizeHeight": {
"type": "number"
},
"addLinkToFeaturedImage": {
"type": "boolean",
"default": false
}
},
"textdomain": "webring",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"render": "file:./render.php"
}
Loading
Loading