PHPackages                             mentormate/template-part-args - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mentormate/template-part-args

ActiveLibrary

mentormate/template-part-args
=============================

A handy WordPress library to get image src with crop options.

1.0(8y ago)014GPL-2.0+PHP

Since Nov 21Pushed 8y agoCompare

[ Source](https://github.com/wordpressmentormate/mentor-template-part)[ Packagist](https://packagist.org/packages/mentormate/template-part-args)[ RSS](/packages/mentormate-template-part-args/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Template Part Arguments
=======================

[](#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
----------

[](#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:

```
// Anywhere in your theme templates
get_template_part_args( 'template', 'part', [ 'example_argument' => true ] );
```

```
// 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 );
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3092d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1403f10915b703342a2252a75624d6bcb12966c923e1f54f6c8fb07d6f70d63e?d=identicon)[yuki](/maintainers/yuki)

---

Top Contributors

[![yukimentormate](https://avatars.githubusercontent.com/u/33830705?v=4)](https://github.com/yukimentormate "yukimentormate (3 commits)")

---

Tags

wordpressimage src

### Embed Badge

![Health badge](/badges/mentormate-template-part-args/health.svg)

```
[![Health](https://phpackages.com/badges/mentormate-template-part-args/health.svg)](https://phpackages.com/packages/mentormate-template-part-args)
```

###  Alternatives

[roots/wordpress

WordPress is open source software you can use to create a beautiful website, blog, or app.

19116.9M257](/packages/roots-wordpress)[aristath/kirki

Extending the WordPress customizer

1.3k73.0k4](/packages/aristath-kirki)[wpreadme2markdown/wpreadme2markdown

Convert WordPress Plugin readme.txt to Markdown

9564.6k4](/packages/wpreadme2markdown-wpreadme2markdown)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1810.1k4](/packages/wpstarter-framework)[tacowordpress/tacowordpress

WordPress custom post types that feel like CRUD models

232.2k](/packages/tacowordpress-tacowordpress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
