/** * Renders all custom fields in one partial. * * The rendered widget can be customised via the 'article_ui > custom_fields' * pluggable UI callback event. * * @param array $rs Article data * @return string HTML */ function article_partial_custom_fields($rs) { global $cfs; $cf = ''; foreach ($cfs as $k => $v) { $cf .= article_partial_custom_field($rs, "custom_field_{$k}"); } return wrapRegion('txp-custom-field-group', pluggable_ui('article_ui', 'custom_fields', $cf, $rs), 'txp-custom-field-group-content', 'custom', 'article_custom_field', $cfs ? '' : 'empty'); }
function article_partial_custom_fields($rs) { global $cfs; $cf = ''; $out = '<div id="custom_field_group"' . ($cfs ? '' : ' class="empty"') . '><h3 class="lever' . (get_pref('pane_article_custom_field_visible') ? ' expanded' : '') . '"><a href="#custom_field">' . gTxt('custom') . '</a></h3>' . '<div id="custom_field" class="toggle" style="display:' . (get_pref('pane_article_custom_field_visible') ? 'block' : 'none') . '">'; foreach ($cfs as $k => $v) { $cf .= article_partial_custom_field($rs, "custom_field_{$k}"); } $out .= pluggable_ui('article_ui', 'custom_fields', $cf, $rs); return $out . '</div></div>' . n; }