$post_type, 'template' => $template ) + $args ); } /** * Print the grid data attributes. */ function acb_print_grid_data( $args ) { if ( empty( $args ) ) { return; } $output = ''; foreach( $args as $key => $value ) { if ( is_array( $value ) ) { $output .= ' data-' . esc_attr( $key ) . '="' . implode( '::', acb_clean( $value ) ) . '"'; } else { $output .= ' data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"'; } } echo $output; } /** * Display a SVG icon from the sprite. */ function acb_svg( $icon = '' ) { $html = ''; // can be used for custom icon output. return apply_filters( 'acb_svg_html', $html, $icon ); } /** * Get the state of a toggle in custom filters. */ function acb_toggle_state( $args, $specific = null ) { extract( $args ); if ( isset( $toggle_all ) && $toggle_all === 'yes' ) { return 'minimized'; } if ( isset( $args[ 'toggle_' . $specific ] ) && $args[ 'toggle_' . $specific ] === 'yes' ) { return 'minimized'; } return 'expanded'; }