public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new WPDD_LayoutsListing();
     }
     return self::$instance;
 }
 public function init_listing_page()
 {
     $this->listing_page = WPDD_LayoutsListing::getInstance();
 }
 function preload_scripts()
 {
     global $wpddlayout;
     //speed up ajax calls sensibly
     wp_deregister_script('heartbeat');
     wp_register_script('heartbeat', false);
     $wpddlayout->enqueue_scripts(array('jquery-ui-cell-sortable', 'jquery-ui-custom-sortable', 'jquery-ui-resizable', 'jquery-ui-tabs', 'wp-pointer', 'backbone', 'select2', 'toolset-utils', 'wp-pointer', 'wp-mediaelement', 'ddl-sanitize-html', 'ddl-sanitize-helper', 'ddl-post-types', 'ddl-editor-main', 'media_uploader_js', 'icl_media-manager-js'));
     $wpddlayout->localize_script('ddl-editor-main', 'icl_media_manager', array('only_img_allowed_here' => __("You can only use an image file here", 'ddl-layouts')));
     $wpddlayout->localize_script('ddl-editor-main', 'DDLayout_settings', array('DDL_JS' => array('available_cell_types' => $wpddlayout->get_cell_types(), 'res_path' => WPDDL_RES_RELPATH, 'lib_path' => WPDDL_RES_RELPATH . '/js/external_libraries/', 'editor_lib_path' => WPDDL_GUI_RELPATH . "editor/js/", 'common_rel_path' => WPDDL_TOOLSET_COMMON_RELPATH, 'dialogs_lib_path' => WPDDL_GUI_RELPATH . "dialogs/js/", 'layout_id' => $this->layout_id, 'create_layout_nonce' => wp_create_nonce('create_layout_nonce'), 'save_layout_nonce' => wp_create_nonce('save_layout_nonce'), 'ddl-view-layout-nonce' => wp_create_nonce('ddl-view-layout-nonce'), 'ddl_show_all_posts_nonce' => wp_create_nonce('ddl_show_all_posts_nonce'), 'edit_layout_slug_nonce' => wp_create_nonce('edit_layout_slug_nonce'), 'compact_display_nonce' => wp_create_nonce('compact_display_nonce'), 'compact_display_mode' => $wpddlayout->get_option('compact_display'), 'DEBUG' => WPDDL_DEBUG, 'strings' => $this->get_editor_js_strings(), 'has_theme_sections' => $wpddlayout->has_theme_sections(), 'AMOUNT_OF_POSTS_TO_SHOW' => self::AMOUNT_OF_POSTS_TO_SHOW, 'is_css_enabled' => $wpddlayout->css_manager->is_css_possible(), 'current_framework' => $wpddlayout->frameworks_options_manager->get_current_framework(), 'cred_layout_css_text' => __('Layouts cell styling', 'ddl-layouts'), 'removed_cells' => $this->removed_cells, 'user_can_delete' => user_can_delete_layouts(), 'user_can_assign' => user_can_assign_layouts(), 'user_can_edit' => user_can_edit_layouts(), 'user_can_create' => user_can_create_layouts()), 'DDL_OPN' => WPDD_LayoutsListing::change_layout_dialog_options_name()));
     $wpddlayout->enqueue_cell_scripts();
 }