MC4WP_Dynamic_Content_Tags::all PHP Method

all() public method

Return all registered tags
public all ( ) : array
return array
    public function all()
    {
        $context = $this->context;
        $tags = $this->tags;
        /**
         * Filters the registered dynamic content tags for all contexts.
         *
         * @since 3.0
         * @param array $tags
         * @ignore
         */
        $this->tags = (array) apply_filters('mc4wp_dynamic_content_tags', $tags);
        /**
         * Filters the registered dynamic content tags for a specific context.
         *
         * The dynamic part of the hook, `$context`, refers to the context (forms / integrations)
         *
         * @since 3.0
         * @param array $tags
         * @ignore
         */
        $this->tags = (array) apply_filters('mc4wp_dynamic_content_tags_' . $context, $tags);
        return $this->tags;
    }

Usage Example

Example #1
0
 /**
  * @return array
  */
 public function get()
 {
     return $this->tags->all();
 }