Fruitfulcode / Fruitful

Free WordPress theme
https://fruitful.fruitfulcode.com
111 stars 68 forks source link

Tabs shortcode #10

Closed n8carrier closed 10 years ago

n8carrier commented 10 years ago

The syntax required for the tabs shortcode is very confusing (and not documented). From what I could tell, the tabs shortcode is used like this: [tabs unique_id_1="unused_text=Tab 1 Title" unique_id_2="unused_text=Tab 2 Title" unique_id_3="unused_text=Tab 3 Title"]

The unused text isn't looked at in the code—there is an explode at the equals and only the right half is used ($_inarray[0] holds "unused_text", but is never called): $in_array = explode('=', $tab); $output .= esc_attr($in_array[1]);

Why not pass $tab directly, like this?: $output .= esc_attr($tab);

Removing the explode would make the shortcode simpler: [tabs tab1="Tab 1 Title" tab2="Tab 2 Title" tab3="Tab 3 Title"]

ilyapavlov commented 10 years ago

natecarrier,

We are moving all shortcodes on plugin territory http://wordpress.org/plugins/fruitful-shortcodes/

New theme version will be integrated with this plugin and all current shortcodes will be removed. At the moment in developers version we don't have shortcodes.