Download the PHP package mentormate/template-part-args without Composer
On this page you can find all versions of the php package mentormate/template-part-args. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mentormate/template-part-args
More information about mentormate/template-part-args
Files in mentormate/template-part-args
Download mentormate/template-part-args
More information about mentormate/template-part-args
Files in mentormate/template-part-args
Vendor mentormate
Package template-part-args
Short Description A handy WordPress library to get image src with crop options.
License GPL-2.0+
Package template-part-args
Short Description A handy WordPress library to get image src with crop options.
License GPL-2.0+
Please rate this library. Is it a good library?
Informations about the package template-part-args
Template Part Arguments
An alternative to native Wordpress function get_template_part
that allows passing of arbitrary arguments to the template partial.
How to use
There are two template functions exposed by the plugin - get_template_part_args
and get_template_part_vars
. The former is used in place of get_template_part
, i.e. to pass the arguments and the latter is used to retrieve them in the template partial.
Here's an example:
// in template-part.php
// define defaults
$defaults = [
'example_argument' => false,
];
// combine defaults with passed args
$args = wp_parse_args( get_template_part_vars( $this ), $defaults );
All versions of template-part-args with dependencies
PHP Build Version
Package Version
No informations.
The package mentormate/template-part-args contains the following files
Loading the files please wait ....