PHP code example of inc2734 / wp-contents-outline
1. Go to this page and download the library: Download inc2734/wp-contents-outline library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
inc2734 / wp-contents-outline example snippets
/**
* Customize args.
*
* @param array $attributes
* @return array
*/
add_filter(
'inc2734_wp_contents_outline_args',
function( $attributes ) {
return $attributes;
}
);
/**
* @param array $args
* @var string $slug
* @var string $name
* @var array $vars
* @param array
*/
add_filter(
'inc2734_wp_contents_outline_view_args',
function( $args ) {
return $args;
}
);
/**
* @param string $html
* @param string $slug
* @param string $name
* @param array $vars
* @return string
*/
add_filter(
'inc2734_wp_contents_outline_view_render',
function( $html, $slug, $name, $vars ) {
return $html;
},
10,
4
);
/**
* Add HTML before .wpco
*
* @param array $attributes
* @return array
*/
add_action(
'inc2734_wp_contents_outline_before',
function( $attributes ) {
/**
* @param array $args
* @var string $slug
* @var string $name
* @var array $vars
*/
add_action(
'inc2734_wp_contents_outline_view_pre_render',
function( $args ) {
}
);
/**
* @param array $args
* @var string $slug
* @var string $name
* @var array $vars
*/
add_action(
'inc2734_wp_contents_outline_view_post_render',
function( $args ) {
}
);
/**
* @param string $name
* @param array $vars
*/
add_action(
'inc2734_wp_contents_outline_view_<slug>',
function( $name, $vars ) {
/**
* @param array $vars
*/
add_action(
'inc2734_wp_contents_outline_view_<slug>-<name>',
function( $vars ) {