Download the PHP package inpsyde/cpt-archives without Composer

On this page you can find all versions of the php package inpsyde/cpt-archives. 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 cpt-archives

CPT Archives

A Composer package that provides a post-like editing experience for post type archives.


UNMAINTAINED

Note: This version of the plugin is not maintained anymore.


Features


Usage

"CPT Archives" is not a plugin, but a Composer package. It can be required by themes, plugins or at website level for sites entirely managed by Composer.

After it is installed via Composer, and composer autoload is required, CPT Archives needs to be bootstrapped, like this:

After this single line of code is in place, all "CPT Archives" are fully working and its API is available for use.


API

There are 2 API, one OOP and one procedural that wraps it.

OOP API is provided by method of the object CptArchives\Archive which has no public constructor and can be instantiated using one of its two named constructors:

-CptArchives\Archive::for_type() which takes as only argument the post type to build the object for (as slug, so string, or as post type object). -CptArchives\Archive::for_current_type() which takes no arguments and only works in post type archive pages (when is_post_type_archive() is true).

Once an instance of the object is obtained, there are following methods available:

The signature is similar to post functions, and the naming should be self-explanatory.

The procedural API wraps the OOP API with functions in the CptArchives namespace. API functions are named exactly like CptArchives\Archive object methods.

The signature is identical, but a parameter is always prepended: the post type to get information from, that can be provided as string (post type slug) or as post type object.

For example:

and so on...

Note that is also possible to pass null as first argument to API function, and the current post type will be used, this only work when viewing post type archive in frontend (that is when is_post_type_archive() is true).


Relevant Hooks


Requirements


Installation

Via Composer, package name is inpsyde/cpt-archives.


License and Copyright

Copyright (c) since 2017 Inpsyde GmbH.

"CPT Archives" code is licensed under GPLv2+ license.

The team at Inpsyde is engineering the Web since 2006.


All versions of cpt-archives with dependencies

PHP Build Version
Package Version
Requires php Version >=7
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 inpsyde/cpt-archives contains the following files

Loading the files please wait ....