• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
    • Help
      • Online help
      • Learn Git
      • Welcome to Bitbucket
      • Keyboard shortcuts
    • Log In
    Blackrock
    1. Blackrock

    main

    Public
    Actions
    • Clone

    Learn more about cloning repositories

    You have read-only access

    Navigation
    • Source
    • Commits
    • Branches
    • All Branches Graph
    • Graphs
    • Forks
    1. Blackrock
    2. main

    Source

    main/wp-content/plugins/wpml-string-translation/classes/menus/class-wpml-st-db-troubleshooting.php
    Артем ШиряевАртем Ширяев committed 554847ddcb906 Apr 2021
    Raw file
    Source viewDiff to previous
     
    1
    <?php
    2
    ​
    3
    class WPML_ST_DB_Troubleshooting extends WPML_Templates_Factory {
    4
    ​
    5
        public function add_hooks() {
    6
            add_action( 'after_setup_complete_troubleshooting_functions', array( $this, 'show' ), 10, 0 );
    7
            add_action( 'admin_enqueue_scripts', array( $this, 'add_required_js' ) );
    8
        }
    9
    ​
    10
        public function add_required_js() {
    11
            wp_register_script(
    12
                'wpml-st-db-troubleshooting',
    13
                WPML_ST_URL . '/res/js/troubleshooting.js',
    14
                array( 'jquery', 'wp-util', 'jquery-ui-sortable', 'jquery-ui-dialog' )
    15
            );
    16
            wp_enqueue_script( 'wpml-st-db-troubleshooting' );
    17
        }
    18
    ​
    19
        public function get_template() {
    20
            return 'st-db-cache-tables.twig';
    21
        }
    22
    ​
    23
        protected function init_template_base_dir() {
    24
            $this->template_paths = array(
    25
                WPML_ST_PATH . '/templates/troubleshooting/',
    26
            );
    27
        }
    28
    ​
    29
        public function get_model() {
    30
            return array(
    31
                'buttonLabel' => __( 'Recreate ST DB cache tables', 'wpml-string-translation' ),
    32
                'description' => __( 'Recreate String Translation cache tables when they are missing or are invalid.', 'wpml-string-translation' ),
    33
                'successMsg'  => esc_js( __( 'Done', 'wpml-string-translation' ) ),
    34
                'nonce'       => wp_create_nonce( 'wpml-st-upgrade-db-cache-command-nonce' ),
    35
            );
    36
        }
    37
    }
    • Git repository management for enterprise teams powered by Atlassian Bitbucket
    • Atlassian Bitbucket v5.10.1
    • Documentation
    • Contact Support
    • Request a feature
    • About
    • Contact Atlassian
    Atlassian

    Everything looks good. Well let you know here if theres anything you should know about.