Download the PHP package amostajo/wordpress-add-on-post-picker without Composer

On this page you can find all versions of the php package amostajo/wordpress-add-on-post-picker. 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 wordpress-add-on-post-picker

Wordpress Post Picker ADD-ON

Latest Stable Version Total Downloads License

Wordpress Post Picker add-on

Add-on package for Wordpress MVC exclusively.

Post Picker is a built-in modal that can be used within Wordpress' admin dashboard to pick / select posts.

** THIS WILL CREATE CONFLICT WITH VueJS.

Installation

This package requires Composer.

Add it in your composer.json file located on your template's root folder:

Then run

or

to download package and dependencies.

Configure in Template

Add the following string line in your addons array option located at your template's config file.

This should be added to:

Usage

Enqueue on Main

Before you do any custom code, you need to load or enqueue the Post Picker to Wordpress.

Call addon_post_picker() function within your template's Main class, like this:

HTML and JS

Create a clickable element, who will call the Post Picker:

Init Post Picker, ala jQuery, with the options wanted:

Rendering

Post Picker has a built-in rendering system that will lets you display the results easily.

To do this, you need two things in your HTML.

Example using the previous sample:

The javascript section should look like this:

Post Picker renders the results by default.

Templates

There are 3 ways to set your template.

These are the available Post properties for display:

Property Description
{{ ID }} Post ID.
{{ title }} Post title.
{{ slug }} Post name / slug.
{{ permalink }} Post permalink.
{{ image_id }} Featured image ID.
{{ image_url }} Featured image url.
{{ thumb_image_url }} Featured image thumb url (120x120 px).
{{ post_type }} Post type.
{{ post_date }} Post date.
{{ excerpt }} Excerpt of 15 words.

Options

Option Data type Description
allowMultiple bool Flag that indicates multiple post can be selected or just 1. Default: true
render bool Flag that indicates if plugin should render results. Default: true
clearTemplate bool Flag that indicates if template should be cleared once plugin starts. Default: true
clearTarget bool Flag that indicates if target should be cleared on every selection. Default: true
target string Element that will hold results.
template string HTML template.
templateElement string Element containing the template.
success function Callback function with the selected posts.

Coding Guidelines

The coding is a mix between PSR-2 and Wordpress PHP guidelines.

License

Post Picker is free software distributed under the terms of the MIT license.


All versions of wordpress-add-on-post-picker with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
10quality/wpmvc-core Version ^3.1
10quality/wpmvc-addon 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 amostajo/wordpress-add-on-post-picker contains the following files

Loading the files please wait ....