source/php/Editor/Thickbox.php
public function addJsVariables()
    {
        global $current_screen;
        global $post;
        global $archive;

        $id = isset($post->ID) ? $post->ID : "'" . $archive . "'";

        if (substr($current_screen->post_type, 0, 4) == 'mod-' && ($current_screen->action == 'add' || $current_screen->action == '')) {
            echo "
                <script>
                    var modularity_post_id = ". $id . ";
                    var modularity_post_action = '" . $current_screen->action . "';
                </script>
            ";
        }
    }
public function addJsVariables()
    {
        global $current_screen;
        global $post;
        global $archive;

        $id = isset($post->ID) ? $post->ID : "'" . $archive . "'";

        if (substr($current_screen->post_type, 0, 4) == 'mod-' && ($current_screen->action == 'add' || $current_screen->action == '')) {
            echo "
                <script>
                    var modularity_post_id = ". $id . ";
                    var modularity_post_action = '" . $current_screen->action . "';
                </script>
            ";
        }
    }
public function addJsVariables ( ) { global $ current_screen ; global $ post ; global $ archive ; $ id = isset ( $ post -> ID ) ? $ post -> ID : "'" . $ archive . "'" ; if ( substr ( $ current_screen -> post_type , 0 , 4 ) == 'mod-' && ( $ current_screen -> action == 'add' || $ current_screen -> action == '' ) ) { echo "
                <script>
                    var modularity_post_id = " . $ id . ";
                    var modularity_post_action = '" . $ current_screen -> action . "';
                </script>
            " ; } }
Adds required javascript variables to the thickbox page
@return void
Adds required javascript variables to the thickbox page