Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Adding filters for SQL statements listing posts while preparing CDN. #562

Open
wants to merge 1 commit into
base: v0.9.6.x_wip
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cdn_Core_Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ function import_library( $limit, $offset, &$count, &$total, &$results ) {
}
}

$sql = apply_filters('w3tc_cdn_import_library_sql', $sql);

$posts = $wpdb->get_results( $sql );

if ( $posts ) {
Expand Down Expand Up @@ -570,6 +572,8 @@ function rename_domain( $names, $limit, $offset, &$count, &$total, &$results ) {
}
}

$sql = apply_filters('w3tc_cdn_rename_domain_posts_sql', $sql);

$posts = $wpdb->get_results( $sql );

if ( $posts ) {
Expand Down Expand Up @@ -646,6 +650,8 @@ function get_import_posts_count() {
OR post_content LIKE "%%href=%%")
', $wpdb->prefix );

$sql = apply_filters('w3tc_cdn_import_posts_count_sql', $sql);

return $wpdb->get_var( $sql );
}

Expand Down