Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion classes/controllers/FrmHooksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ public static function trigger_load_form_hooks() {
* @return void
*/
public static function load_hooks() {
// Use 0 so this gets triggered before FrmFormActionsController::register_post_types.
add_action( 'init', 'FrmAppController::load_lang', 0 );

add_action( 'rest_api_init', 'FrmAppController::create_rest_routes', 0 );
add_action( 'plugins_loaded', 'FrmAppController::load_lang' );
add_filter( 'widget_text', 'do_shortcode' );

// Entries controller.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/misc/test_FrmMisc.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function test_load_formidable_forms() {
$this->assertTrue( isset( $frm_vars['load_css'] ) );
$this->assertTrue( isset( $frm_vars['pro_is_authorized'] ) );

$this->assertNotEmpty( has_action( 'plugins_loaded', 'FrmAppController::load_lang' ) );
$this->assertSame( 0, has_action( 'init', 'FrmAppController::load_lang' ) );
}

/**
Expand Down