API to create Edit with Elementor button in ESI
-
Hello, Elementor support/dev team,
Could you please advise that, if I want to add the “Edit with Elementor” button to wp admin bar for an ESI block, how could I implement it? Could you please provide an API for this purpose?
I checked the current code, and saw that we need to apply the filter “the_content” to generate the document content, but the enqueue_scripts() was hooked to wp_footer, which is out of this ESI block generation logic.
For test purpose, I added this line in to the __construct() of /elementor/modules/admin-bar/module.php :
add_action( 'admin_bar_menu', [ $this, 'enqueue_scripts' ], 101 );
So the enqueue-scripts() is executed after theapply_filters( 'the_content', '' );
within the function wp_admin_bar_render();This way both document content and button config are generated but the button still missing. Could you please advise how I could make it work so that the button is generated?
Best regards,
Abe
- The topic ‘API to create Edit with Elementor button in ESI’ is closed to new replies.