Remove shortcode, add button & dialog by hooking into actions

This commit is contained in:
Kelly Dwan 2019-11-20 16:58:18 -05:00
parent a67ef04505
commit 04d1a12296
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
6 changed files with 88 additions and 94 deletions

View file

@ -14,7 +14,6 @@ defined( 'WPINC' ) || die();
// Todo make this into simple optionless blocks instead?
add_shortcode( '5ftf_pledge_form_new', __NAMESPACE__ . '\render_form_new' );
add_shortcode( '5ftf_pledge_form_manage', __NAMESPACE__ . '\render_form_manage' );
add_shortcode( '5ftf_pledge_form_manage_link', __NAMESPACE__ . '\render_manage_link_request' );
/**
* Render the form(s) for creating new pledges.
@ -175,19 +174,6 @@ function render_form_manage() {
return ob_get_clean();
}
/**
* Render the `render_manage_link_request` shortcode.
*/
function render_manage_link_request() {
// @todo enable when https://github.com/WordPress/five-for-the-future/issues/6 is done
if ( ! defined( 'WPORG_SANDBOXED' ) || ! WPORG_SANDBOXED ) {
return;
}
require_once FiveForTheFuture\get_views_path() . 'form-pledge-request-manage-link.php';
}
/**
* Process a submission from the Manage Existing Pledge form.
*