Skip to content

Instantly share code, notes, and snippets.

View artikus11's full-sized avatar
🥕
Create plugins

Artem Abramovich artikus11

🥕
Create plugins
View GitHub Profile
<?php
/**
* Error-handler to be used as a mu-plugin.
*
* @package kagg/compatibility
*/
// phpcs:disable Generic.Commenting.DocComment.MissingShort
/** @noinspection PhpIllegalPsrClassPathInspection */
/** @noinspection AutoloadingIssuesInspection */
@mihdan
mihdan / passing-variables-to-get_template_part-in-wordpress.php
Last active October 22, 2019 18:46
Передача переменных для get_template_part()
<?php
/**
* Load a template part into a template
*
* @param string $slug The slug name for the generic template.
* @param string $name The name of the specialised template.
* @param array $params Any extra params to be passed to the template part.
*/
function get_template_part_extended( $slug, $name = null, $params = array() ) {
if ( ! empty( $params ) ) {