Download the PHP package danlapteacru/facetwp-builder without Composer

On this page you can find all versions of the php package danlapteacru/facetwp-builder. 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 facetwp-builder

FacetWP Builder

Create, register, and reuse FacetWP plugin facets/templates using PHP, and keep them in your source code repository. To read more about registering FacetWP facets and templates via PHP, go here: facets documentation and templates documentation.

Packagist Version PHP from Packagist Packagist Downloads GitHub License

Minimum Requirements

Installation

If your project isn't using composer, you can require the autoload.php file.

Adding/Removing FacetWP Facets and Templates with the Builder

Table of Contents

Facets Templates
Autocomplete Add a template
Checkbox
Date Range
Dropdown
fSelect
Hierarchy
Number Range
Pager
Proximity
Radio
Reset
Search
Slider
Sort
Star Rating
User Selections

Facet Types

You can find a full reference of available facets on the official FacetWP documentation.

Autocomplete

Official Documentation

Checkboxes

Official Documentation

Date Range

Official Documentation

Dropdown

Official Documentation

fSelect

Official Documentation

Hierarchy

Official Documentation

Number Range

Official Documentation

Pager

Official Documentation

Proximity

Official Documentation

Radio

Official Documentation

Reset

Official Documentation

Search

Official Documentation

Slider

Official Documentation

Sort

Official Documentation

Star Rating

Official Documentation

User Selections

TODO: Add available options.

Official Documentation

Shortcut functions

If you don't want to use the second parameter of the add method, you can use the following shortcut functions:

Templates

You can find a full reference of how to add a template with PHP on the official FacetWP documentation.

Add a template

You can add a template by using the addTemplate method.

Example:

Attention! The query key should contain a PHP code string. If you prefer to use a PHP array, utilize the setQuery helper function instead.

Here are some available declarative shortcut functions for the addTemplate method:

If you dont want to specify the query or query_obj keys, you can use the setPostType and setPostsPerPage methods to define the post_type and posts_per_page arguments.

Example:

Default Label

If setLabel is not set, or the addTemplate arguments do not contain the label key, then the label will be generated from the template name/key.

Default Modes

If setModes is not set, or the addTemplate arguments do not contain the modes key, then the default modes will be used:

Composing Custom/3rd Party Addon Facets

You can use the addFacet method to add a custom/3rd party addon facet.

addFacet(string $name, string $type, array $args = [])

Example:

If you want to use a facet type which is not defined in the ALLOWED_FACET_TYPES constant, you can use the addAllowedFacetType method or danlapteacru/facetwp-builder/allowed_facet_types hook to add it.

Hooks

You can use the following hooks to modify the FacetWP Builder:

danlapteacru/facetwp-builder/allowed_facet_types

You can use this hook to add custom facet types to the FacetWP Builder.

danlapteacru/facetwp-builder/facets

You can use this hook to modify the facets array before it is returned.

danlapteacru/facetwp-builder/facet_key

You can use this hook to modify the facet key before it is used to check if facet type exists.

danlapteacru/facetwp-builder/templates

You can use this hook to modify the templates array before it is returned.

Examples

Table of Contents

Examples
Add Facets
Add a custom facet
Add Template

Add Facets

Add a custom facet

Add Template

Credits

FacetWP Builder is created by Dan Lapteacru.

Full list of contributors can be found here.

License

FacetWP Builder is released under the MIT License.


All versions of facetwp-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
itinerisltd/itineris-wp-coding-standards Version ^1.0
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 danlapteacru/facetwp-builder contains the following files

Loading the files please wait ....