Download the PHP package ideasonpurpose/wp-theme-addons without Composer

On this page you can find all versions of the php package ideasonpurpose/wp-theme-addons. 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-theme-addons

WordPress Theme Addons

Version 0.3.1

NPM Version Packagist

This repository contains JavaScript and PHP add-ons for the WordPress Block Editor and Hybrid themes. The project is used in production, but is under active development and implementations are likely to change.

What's in here

Block Variations

Linked Group Block

A variation on the Group block which adds standard Link controls. The link implementation uses ideas from Accessible cards and Inclusive Components: Cards.

Related Posts Query

A variation on the Query Loop block which replaces the query with ranked related posts. Ranking lives in lib/RelatedPosts (IdeasOnPurpose\WP\RelatedPosts) — weighted shared taxonomies, post type, and recency, with optional REST at GET /wp-json/ideasonpurpose/v1/related_posts/{id}.

CSS Local Props

Injects block color attributes as CSS custom properties (--local-text-color, --local-bg-color, --local-border-color) so theme styles can use them.

This feature include a pair of front-end and block editor files:

File Runtime Role
CssLocalProps/CssLocalProps.php PHP (frontend + editor bootstrap) On render_block, writes the local props onto the outer wrapper tag. On enqueue_block_editor_assets, localizes the allowed-block list to window.iopLocalProps.
CssLocalProps/css-local-props.js Block editor Higher-order component on editor.BlockListBlock that injects the same vars into wrapperProps.style for live editor preview.

Named colors from theme.json are converted to var(--wp--preset--color--*); custom hex/rgb values pass through as-is.

By default only core/button is targeted. Change the list from PHP:

Both sides must stay in sync: enable PHP for frontend output and call initCssLocalProps() in the editor bundle so the canvas matches the saved markup.

Utilities

A few utility classes are exported. usePublicPostTypes and usePublicTaxonomies are direct lifts from the WordPress Gutenberg source code. These functions are useful for pre-populating a WordPress data-store with all PostType and Taxonomy data for use in interfaces or block rendering.

Installation

Prerequisites

npm

Or in package.json:

Composer

Add the VCS repository and require the package in your project's composer.json:

Usage

JavaScript

Import one of the included packages into editor.js or whatever script loads in your editor:

Also add the matching Sass frontend styles:

PHP

Coexistence

npm and Composer operate independently in the same repository:

npm Composer
Config package.json composer.json
Package name @ideasonpurpose/wp-theme-addons ideasonpurpose/wp-theme-addons
Installs to node_modules/ vendor/
Serves JS + SCSS PHP
Imports resolve via npm package name PSR-4 autoloading

No conflicts: separate config files, separate dependency directories, separate language ecosystems.

 

Brought to you by IOP

IOP Logo
     
This project is actively developed and used in production at Ideas On Purpose.
 

All versions of wp-theme-addons with dependencies

PHP Build Version
Package Version
No informations.
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 ideasonpurpose/wp-theme-addons contains the following files

Loading the files please wait ...