Skip to content

bobbingwide/sb-parent-block

Repository files navigation

SB Parent block

banner

  • Contributors: bobbingwide
  • Tags: block, parent, link
  • Requires at least: 5.4.2
  • Tested up to: 6.4.2
  • Stable tag: 0.5.3
  • Requires PHP: 7.2.0
  • License: GPL-2.0-or-later
  • License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show parent of the current content as a link.

Description

Use the Parent block ( sb/parent-block ) to display a link to the parent of the current content. Works for any hierarchical post type such as pages, where the post type supports page-attributes.

Installation

  1. Upload the plugin files to the /wp-content/plugins/sb-parent-block directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress

Frequently Asked Questions

Is this a Single Block plugin?

A. I hope so.

What post types does it support?

Any which are hierarchical. The post type must support 'page-attributes' in order to create a post hieraarchy.

What if there is no parent?

The result will be "No parent". You can change this text using block settings.

Screenshots

  1. Parent block

Upgrade Notice

0.5.3

Update for support for PHP 8.3

0.5.2

Once again delivered as a production build.

0.5.1

Allows user defined value for 'No parent', when the content does not have a parent.

  • Note: The plugin is delivered with the Development build.

0.5.0

Now internationalized?

0.4.0

Use the Parent block (sb/parent-block) from the SB Parent block plugin to replace the Parent block previously delivered by Children block ( oik/parent-block ).

0.3.2

Upgrade for some improved usage notes.

0.3.1

Upgrade for some usage notes.

0.3.0

Use the Parent block in child pages to link back to the parent page.

0.2.0

Now implements the child list using server side rendering and supports the depth parameter

0.1.0

Initial version generated by npm wp-create-block

Changelog

0.5.3

  • Changed: Update build files #5
  • Changed: Update wp-scripts to 26.18.0. Remove out of date webpack.config.js #5
  • Changed: Add PHPUnit tests for PHP 8.3 #5
  • Tested: With WordPress 6.4.2
  • Tested: With PHP 8.1, PHP 8.2 and PHP 8.3
  • Tested: With PHPUnit 9.6

0.5.2

  • Changed: Enable peaceful coexistence with other single block plugins,#3
  • Tested: With WordPress 5.5-RC1

0.5.1

  • Changed: Allow user to set text to display when there's 'No parent'

0.5.0

  • Changed: Add internationalisation and localisation logic

0.4.0

  • Changed: Relevant code copied and cobbled from sb-children-block in preparation for delivery from wordpress.org as a Single Block ( SB ) plugin.
  • Rename block from oik/parent-block to sb/parent-block #1

Build process

Only necessary if you want to build the block yourself.

  • To build the block during development.

npm start or npm run dev

Press Ctrl-C to stop the process.

  • To build the block for runtime.

npm run build

The routine should terminate when the build is complete.

  • To build the main file for translation

npm run makepot

  • To create the block editor language files after translation

npm run makejson

Pre-requisite:

You need to have npm - Node Package Manager - installed.

For some basic instructions see the oik-blocks summary of blocks README

Most people run the npm command from the command line.

About

Parent block - WordPress single block plugin

Resources

Stars

Watchers

Forks

Packages

No packages published