| @@ -731,10 +731,8 @@ | ||
| 731 | 731 | $post_type = FrmAppHelper::simple_get( 'post_type', 'sanitize_title' ); |
| 732 | 732 | |
| 733 | 733 | global $pagenow; |
| 734 | 734 | if ( strpos( $page, 'formidable' ) === 0 || ( $pagenow === 'edit.php' && $post_type === 'frm_display' ) ) { |
| 735 | - self::enqueue_global_settings_scripts( $page ); | |
| 736 | - | |
| 737 | 735 | wp_enqueue_script( 'admin-widgets' ); |
| 738 | 736 | wp_enqueue_style( 'widgets' ); |
| 739 | 737 | self::maybe_deregister_popper2(); |
| 740 | 738 | wp_enqueue_script( 'formidable_admin' ); |
| @@ -811,20 +809,8 @@ | ||
| 811 | 809 | wp_enqueue_script( 'formidable-settings-components' ); |
| 812 | 810 | } |
| 813 | 811 | |
| 814 | 812 | /** |
| 815 | - * Enqueues global settings scripts. | |
| 816 | - * | |
| 817 | - * @param string $page The `page` param in URL. | |
| 818 | - */ | |
| 819 | - private static function enqueue_global_settings_scripts( $page ) { | |
| 820 | - if ( 'formidable-settings' === $page ) { | |
| 821 | - wp_enqueue_style( 'wp-color-picker' ); | |
| 822 | - wp_enqueue_script( 'formidable_settings' ); | |
| 823 | - } | |
| 824 | - } | |
| 825 | - | |
| 826 | - /** | |
| 827 | 813 | * Avoid loading dropzone CSS on the form list page. It isn't required there. |
| 828 | 814 | * |
| 829 | 815 | * @since 6.11 |
| 830 | 816 | * |
| @@ -1044,9 +1030,9 @@ | ||
| 1044 | 1030 | public static function create_rest_routes() { |
| 1045 | 1031 | $args = array( |
| 1046 | 1032 | 'methods' => 'GET', |
| 1047 | 1033 | 'callback' => 'FrmAppController::api_install', |
| 1048 | - 'permission_callback' => self::class . '::can_update_db', | |
| 1034 | + 'permission_callback' => __CLASS__ . '::can_update_db', | |
| 1049 | 1035 | ); |
| 1050 | 1036 | |
| 1051 | 1037 | register_rest_route( 'frm-admin/v1', '/install', $args ); |
| 1052 | 1038 | |