Skip to content
Permalink
Browse files

External forms tweaks

@philwareham please merge it into 4.7.3
  • Loading branch information...
bloatware authored and philwareham committed Feb 13, 2019
1 parent 8d7d6d4 commit 60628f6357ca05979157f90fa0abf3d58d8da7f0
Showing with 8 additions and 6 deletions.
  1. +8 −6 textpattern/publish/taghandlers.php
@@ -544,14 +544,16 @@ function output_form($atts, $thing = null)
$to_yield = isset($atts['yield']) ? $atts['yield'] : false;
unset($atts['form'], $atts['yield'], $txp_atts['form'], $txp_atts['yield']);
if (isset($atts['format']) && empty($to_yield)) {// component
return component($atts + array('form' => $form));
if (!empty($to_yield)) {
$to_yield = $to_yield === true ? $atts : array_fill_keys(do_list_unique($to_yield), null);
empty($txp_atts) or $txp_atts = array_diff_key($txp_atts, $to_yield);
}
if (!is_bool($to_yield)) {
$to_yield = $to_yield ?
array_fill_keys(do_list_unique($to_yield), null) :
array();
if (isset($atts['format'])) {// component
empty($txp_atts) or $atts = array_diff_key($atts, $txp_atts);
return component($atts + array('form' => $form));
} elseif (is_array($to_yield)) {
$atts = lAtts($to_yield, $atts) or $atts = array();
}

1 comment on commit 60628f6

@philwareham

This comment has been minimized.

Copy link
Member

philwareham commented on 60628f6 Feb 15, 2019

I've merged this with 4.7.3 - thanks!

Please sign in to comment.
You can’t perform that action at this time.