Skip to content

Commit 54cfa40

Browse files
committed
Revert "Before and after form hooks order"
This reverts commit bcb882c.
1 parent 751cf7d commit 54cfa40

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

includes/CMB2.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,18 @@ public function render_form_close( $object_id = 0, $object_type = '' ) {
321321

322322
$this->render_hidden_fields();
323323

324+
/**
325+
* Hook after form form has been rendered
326+
*
327+
* @param array $cmb_id The current box ID.
328+
* @param int $object_id The ID of the current object.
329+
* @param string $object_type The type of object you are working with.
330+
* Usually `post` (this applies to all post-types).
331+
* Could also be `comment`, `user` or `options-page`.
332+
* @param array $cmb This CMB2 object.
333+
*/
334+
do_action( 'cmb2_after_form', $this->cmb_id, $object_id, $object_type, $this );
335+
324336
/**
325337
* Hook after form form has been rendered
326338
*
@@ -335,18 +347,6 @@ public function render_form_close( $object_id = 0, $object_type = '' ) {
335347
*/
336348
do_action( "cmb2_after_{$object_type}_form_{$this->cmb_id}", $object_id, $this );
337349

338-
/**
339-
* Hook after form form has been rendered
340-
*
341-
* @param array $cmb_id The current box ID.
342-
* @param int $object_id The ID of the current object.
343-
* @param string $object_type The type of object you are working with.
344-
* Usually `post` (this applies to all post-types).
345-
* Could also be `comment`, `user` or `options-page`.
346-
* @param array $cmb This CMB2 object.
347-
*/
348-
do_action( 'cmb2_after_form', $this->cmb_id, $object_id, $object_type, $this );
349-
350350
echo "\n<!-- End CMB2 Fields -->\n";
351351

352352
}

0 commit comments

Comments
 (0)