PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wpml-string-translation
/
classes
/
strings-scanning
<?php class WPML_ST_Strings_Stats { /** * @var SitePress */ private $sitepress; /** * @var wpdb */ private $wpdb; /** * @var array */ private $stats; public function __construct( wpdb $wpdb, SitePress $sitepress ) { $this->wpdb = $wpdb; $this->sitepress = $sitepress; } /** * @param string $component_name * @param string $type * @param string $domain */ public function update( $component_name, $type, $domain ) { $count = $this->get_count( $domain ); $string_settings = $this->sitepress->get_setting( 'st' ); $string_settings[ $type . '_localization_domains' ][ $component_name ][ $domain ] = $count; $this->sitepress->set_setting( 'st', $string_settings, true ); $this->sitepress->save_settings(); } /** * @param string $domain * * @return int */ private function get_count( $domain ) { if ( ! $this->stats ) { $this->set_stats(); } return isset( $this->stats[ $domain ] ) ? (int) $this->stats[ $domain ]->count : 0; } private function set_stats() { $count_query = 'SELECT context, COUNT(id) count FROM ' . $this->wpdb->prefix . 'icl_strings GROUP BY context'; $this->stats = $this->wpdb->get_results( $count_query, OBJECT_K ); } }
[-] class-wpml-st-theme-plugin-hooks.php
[edit]
[-] class-wpml-st-theme-plugin-scan-files-ajax.php
[edit]
[-] class-wpml-st-strings-stats.php
[edit]
[-] class-wpml-file-name-converter.php
[edit]
[-] class-wpml-themes-and-plugins-updates.php
[edit]
[-] class-wpml-st-file-hashing.php
[edit]
[+]
factory
[-] class-wpml-themes-and-plugins-settings.php
[edit]
[-] iwpml-st-string-scanner.php
[edit]
[+]
..
[-] class-wpml-st-update-file-hash-ajax.php
[edit]
[-] wpml-st-theme-plugin-scan-dir-ajax.php
[edit]