feat: Allow shortcodes in attribute values #11

Merged
glen merged 2 commits from feat/shortcode_in_att into main 2022-03-28 23:08:13 +00:00
Showing only changes of commit 89b68891b0 - Show all commits

View File

@ -3,7 +3,7 @@
Plugin Name: TablePress Extension: Pods tables Plugin Name: TablePress Extension: Pods tables
Plugin URI: https://code.studioinfinity.org/glen/tablepress-pods Plugin URI: https://code.studioinfinity.org/glen/tablepress-pods
Description: Custom Extension for TablePress to incorporate Pods information in tables Description: Custom Extension for TablePress to incorporate Pods information in tables
Version: 0.4.0 Version: 0.4.1
Author: Glen Whitney Author: Glen Whitney
Author URI: http://studioinfinity.org/ Author URI: http://studioinfinity.org/
*/ */
@ -114,7 +114,7 @@ function tbp_pods_exportpods_data( $data, $act ) {
} }
function tbp_pods_maybe_shortcodes($value) { function tbp_pods_maybe_shortcodes($value) {
$bracketed = str_replace(array('((', '))'), array('[', ']')); $bracketed = str_replace(array('((', '))'), array('[', ']'), $value);
return do_shortcode($bracketed); return do_shortcode($bracketed);
} }