Download the PHP package wrd/wp-blocks without Composer

On this page you can find all versions of the php package wrd/wp-blocks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-blocks

wrd\wp-blocks

Automatically creates blocks from the theme's blocks directory.


Usage

Use register_all_theme_blocks to register all blocks in the the themes' block directory. This defaults to blocks/.

You can use the wrd\wp-blocks\get_theme_blocks_dir filter to change the location of the theme's blocks dir.


Commands

You can use the following command to quickly generate a block, with optional ACF, CSS and JS files.


Registration

register_all_theme_blocks

Registers all blocks in the theme's block directory.

register_theme_block

Registers an individual block. Blocks are defined as a directory with a block.json file. Will also import an Advanced Custom Fields JSON file with the name acf.json if it exists.

register_block_category

Register a new block category.

set_include_theme_block_styles_before_render

Force WordPress to include block styles individually, with the block when it is rendered.

set_allowed_block_types

Whitelists the allowed blocks. Optionally whitelists a post type which is given a higher precedence.

set_use_block_editor

Enables or disables the block editor. Optionally takes a post type which is given a higher precedence.

set_use_inner_blocks_wrapper

Enable to disable the wrapper around inner blocks. Only works on the front-end.

set_use_core_styles

Used to dequeue the core block styles & global styles.


Templating Functions

block_atts

Output the block's attributes. You can pass attributes of your own to be merged in.

block_is_editor

Checks if the block is currently being rendered for preview in the block editor.

block_has_style

Check if the block has a style selected.

get_block_directory

Get the absolute filepath for the block's directory, with an optional append.

get_block_directory_uri

Get the URL for the block's directory, with an optional append.

get_prose_blocks

Prose blocks are a set of blocks that are typically allowed as text content.

the_inner_blocks

Display a slot for the user to add child blocks.

the_bg_image

Display a style attribute for a background image.

the_link

Easily display an ACF link field.


All versions of wp-blocks with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
composer-runtime-api Version ^2.2
adhocore/cli Version v1.9.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wrd/wp-blocks contains the following files

Loading the files please wait ...