wc_get_text_attributes

Gets text attributes from a string.

Description

(array) wc_get_text_attributes( $raw_attributes ); 

Returns (array)

Parameters (1)

0. $raw_attributes
The raw attributes.

Usage

  1. if ( !function_exists( 'wc_get_text_attributes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-attribute-functions.php'; 
  3.  
  4. // The raw attributes. 
  5. $raw_attributes = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_get_text_attributes($raw_attributes); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-attribute-functions.php  
  1. function wc_get_text_attributes( $raw_attributes ) { 
  2. return array_filter( array_map( 'trim', explode( WC_DELIMITER, html_entity_decode( $raw_attributes, ENT_QUOTES, get_bloginfo( 'charset' ) ) ) ), 'wc_get_text_attributes_filter_callback' );