public function loadSiteScripts()
    {
        if (is_singular() && comments_open() && get_option('thread_comments')) {
            wp_enqueue_script('comment-reply');
        }

        $mainHandle = 'site';
        $this->loadMainScriptByHandle($mainHandle);

        $viewHandle = $this->getViewHandle();

        if (file_exists(sprintf('%s/js/views/%s.js', $this->paths->getThemeAssetsDir(), $viewHandle))) {
            $viewSrc = sprintf('%s/js/views/%s.js', $this->paths->getThemeAssetsUri(), $viewHandle);
            $this->loadScript($viewHandle, $viewSrc, [$mainHandle], true);
        }
    }
public function loadSiteScripts()
    {
        if (is_singular() && comments_open() && get_option('thread_comments')) {
            wp_enqueue_script('comment-reply');
        }

        $mainHandle = 'site';
        $this->loadMainScriptByHandle($mainHandle);

        $viewHandle = $this->getViewHandle();

        if (file_exists(sprintf('%s/js/views/%s.js', $this->paths->getThemeAssetsDir(), $viewHandle))) {
            $viewSrc = sprintf('%s/js/views/%s.js', $this->paths->getThemeAssetsUri(), $viewHandle);
            $this->loadScript($viewHandle, $viewSrc, [$mainHandle], true);
        }
    }
public function loadSiteScripts ( ) { if ( is_singular ( ) && comments_open ( ) && get_option ( 'thread_comments' ) ) { wp_enqueue_script ( 'comment-reply' ) ; } $ mainHandle = 'site' ; $ this -> loadMainScriptByHandle ( $ mainHandle ) ; $ viewHandle = $ this -> getViewHandle ( ) ; if ( file_exists ( sprintf ( '%s/js/views/%s.js' , $ this -> paths -> getThemeAssetsDir ( ) , $ viewHandle ) ) ) { $ viewSrc = sprintf ( '%s/js/views/%s.js' , $ this -> paths -> getThemeAssetsUri ( ) , $ viewHandle ) ; $ this -> loadScript ( $ viewHandle , $ viewSrc , [ $ mainHandle ] , true ) ; } }
Loads frontend scripts
Loads frontend scripts