/** * Wrap markup inner content. * * This function calls {@see beans_open_markup()} after the opening markup and * {@see beans_close_markup()} before the closing markup. * * @since 1.0.0 * * @param string $id The markup ID. * @param string $new_id A unique string used as a reference. The $id argument may contain sub-hook(s). * @param string $tag The HTML wrap tag. * @param string|array $attributes Optional. Query string or array of attributes. The array key defines the * attribute name and the array value define the attribute value. Setting * the array value to '' will display the attribute value as empty * (e.g. class=""). Setting it to 'false' will only display * the attribute name (e.g. data-example). Setting it to 'null' will not * display anything. * @param mixed $var Additional variables passed to the functions hooked to <tt>$id</tt>. * * @return bool Will always return true. */ function beans_wrap_inner_markup($id, $new_id, $tag, $attributes = array()) { $args = func_get_args(); unset($args[0]); _beans_add_anonymous_action($id . '_prepend_markup', array('beans_open_markup', $args), 1); unset($args[3]); _beans_add_anonymous_action($id . '_append_markup', array('beans_close_markup', $args), 9999); return true; }
/** * Echo comment fields closing wraps. * * This function must be attached to the WordPress 'comment_form_after_fields' action which is only called if * the user is not logged in. * * @since 1.0.0 */ function beans_comment_form_after_fields() { echo beans_close_markup('beans_comment_fields_inner_wrap', 'div'); echo beans_close_markup('beans_comment_fields_wrap', 'div'); // Add the all field closing wrap after textarea. echo _beans_add_anonymous_action('comment_form_field_comment', array('beans_close_markup', array('beans_comment_all_fields_wrap', 'div'))); }