PHP code example of pessek / hypeshortcode

1. Go to this page and download the library: Download pessek/hypeshortcode 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/ */

    

pessek / hypeshortcode example snippets


elgg()->shortcodes->register('mycode');

// then add a view in shortcodes/mycode
// view vars will contain attributes of the shortcode

elgg()->shortcodes->generate('mycode', [
	'foo' => 'bar',
]);

elgg()->shortcodes->expand($text);

elgg()->shortcodes->strip($text);