Set custom values

wpscont/shortcodes/set_custom_values

Description:
You may want to save custom attributes to your shortcodes to access them later on easily for custom actions. With this hook, you can apply custom values to our shortcode settings array. (There are more advanced ways available too if you want to create a logic to save your shortcodes programatically from somewhere else)

Parameter Type Description
(array) array An array containing the type of the shortcode, as well as the settings.
$tag string The shortcode tag itself
        /**
         * Filter the data that should be saved bades on your needs.
         */
        $custom_values = apply_filters('wpscont/shortcodes/set_custom_values', array(
                        'type' => 'dynamic',
                        'settings' => array(),
                ), $tag);

Source:
wp-content/plugins/wp-shortcode-control/core/includes/classes/run.php

Was this article helpful?

Related Articles