PHP code example of cnp / wp-queried-object-parser

1. Go to this page and download the library: Download cnp/wp-queried-object-parser 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/ */

    

cnp / wp-queried-object-parser example snippets


add_filter( 'cnp_queried_object_filter', 'function_to_filter_output' );

$object = cnp_parse_queried_object();

(stdClass) [
    type      -> '',
    wp_object -> '',
    title     -> '',
    slug      -> '',
    ID        -> 0,
    view      -> ''
]