PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
sitepress-multilingual-cms
/
classes
<?php use PhpMyAdmin\SqlParser\Parser; class WPML_DB_Chunk { /** * @var wpdb */ private $wpdb; /** * @var int */ private $chunk_size; /** * @param wpdb $wpdb * @param int $chunk_size */ public function __construct( wpdb $wpdb, $chunk_size = 1000 ) { $this->wpdb = $wpdb; $this->chunk_size = $chunk_size; } /** * @param string $query * @param array $args * @param int $elements_num * * @return array * * @throws \InvalidArgumentException */ public function retrieve( $query, $args, $elements_num ) { $this->validate_query( $query ); $result = array(); $offset = 0; while ( $offset < $elements_num ) { $new_query = $query . sprintf( ' LIMIT %d OFFSET %s', $this->chunk_size, $offset ); $new_query = $this->wpdb->prepare( $new_query, $args ); $rowset = $this->wpdb->get_results( $new_query, ARRAY_A ); if ( is_array( $rowset ) && count( $rowset ) ) { $result = array_merge( $result, $rowset ); } $offset += $this->chunk_size; } return $result; } /** * @param string $query */ private function validate_query( $query ) { $parser = new Parser( $query ); if ( isset( $parser->statements ) ) { wpml_collect( $parser->statements )->each( function( $statement ) { if ( ! empty( $statement->limit ) ) { throw new InvalidArgumentException( "Query can't contain OFFSET or LIMIT keyword" ); } } ); } } }
[+]
wpml-wp
[+]
ajax
[-] class-wpml-tm-translators-dropdown.php
[edit]
[+]
translation-priorities
[-] class-wpml-tm-promotions.php
[edit]
[+]
hooks
[+]
ICL-20-migration
[+]
templates
[+]
action-filter-loader
[-] class-wpml-translation-proxy-api.php
[edit]
[+]
wpml-st
[+]
utilities
[-] class-wpml-tm-translated-field.php
[edit]
[+]
requirements
[+]
sticky-posts
[-] class-wpml-tm-page.php
[edit]
[+]
icl
[+]
display-as-translated
[+]
custom-field-translation
[+]
language
[+]
ATE
[+]
shortcodes
[+]
translate_link_targets
[+]
core-abstract-classes
[+]
full-site-editing
[+]
settings
[-] class-wpml-file.php
[edit]
[+]
xliff
[+]
reset
[+]
REST-hooks
[+]
comments
[+]
plugins
[+]
templating
[+]
container
[+]
taxonomy
[+]
cookie
[-] class-wpml-tm-requirements.php
[edit]
[+]
translation-dashboard
[+]
helpers
[+]
translation-feedback
[+]
admin-language-switcher
[-] class-wpml-tm-troubleshooting-clear-ts.php
[edit]
[+]
jobs
[+]
compatibility
[+]
wp-core-hooks
[+]
post-edit-screen
[-] class-wpml-tm-troubleshooting-clear-ts-ui.php
[edit]
[+]
translation-jobs
[+]
logging
[+]
roles
[+]
media
[-] class-wpml-active-plugin-provider.php
[edit]
[+]
media-translation
[-] class-wpml-config-update.php
[edit]
[+]
seo
[+]
options
[+]
Installer
[-] class-wpml-tm-ajax-factory-2.php
[edit]
[+]
automatic-translation
[+]
troubleshoot
[+]
records
[-] class-wpml-translate-independently.php
[edit]
[+]
abstract
[-] class-wpml-tm-resources-factory.php
[edit]
[+]
post-types
[+]
wp-cli
[+]
translation-proxy
[-] class-wpml-tm-loader.php
[edit]
[-] class-wpml-config-update-integrator.php
[edit]
[-] class-wpml-theme-localization-type.php
[edit]
[+]
taxonomy-term-translation
[+]
setup
[+]
language-switcher
[+]
translation-mode
[+]
jobs-deadline
[+]
database-queries
[+]
utils
[+]
translation-basket
[-] ISitePress.php
[edit]
[-] class-wpml-current-screen.php
[edit]
[-] class-wpml-tm-ajax-factory.php
[edit]
[+]
admin-bar
[+]
canonicals
[+]
custom-xml-config
[-] class-wpml-db-chunk.php
[edit]
[+]
url-handling
[+]
admin-resources
[+]
theme-plugin-localization
[+]
ui-elements
[+]
languages
[+]
wizard
[-] LanguageNegotiation.php
[edit]
[-] class-wpml-browser-redirect.php
[edit]
[+]
menu
[-] class-wpml-mo-file-search.php
[edit]
[+]
query-filtering
[+]
translation-management
[+]
filters
[-] class-wpml-xmlrpc.php
[edit]
[-] class-wpml-site-id.php
[edit]
[+]
block-editor
[+]
icl-to-ate-migration
[+]
translations
[+]
user-language
[+]
..
[+]
menu-elements
[+]
translation-batch
[-] class-wpml-tm-api.php
[edit]
[-] class-wpml-translation-management.php
[edit]
[-] class-wpml-translation-job-factory.php
[edit]
[+]
xml-config
[+]
REST
[+]
editor
[+]
admin-menu
[+]
localization
[+]
tp-client
[+]
translation-roles
[-] Geolocalization.php
[edit]
[+]
wp
[+]
API
[+]
twig-extensions
[+]
troubleshooting
[+]
privacy
[+]
user
[-] class-wpml-tm-service-activation-ajax.php
[edit]
[+]
widgets
[+]
super-globals
[+]
emails
[+]
words-count
[+]
support
[+]
post-translation
[+]
browser-language-redirect
[+]
request-handling
[+]
notices
[+]
upgrade