HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wptoho/wp-content/plugins/defender-security/src/component/class-breadcrumbs.php
<?php
/**
 * Manages the display of Breadcrumbs.
 *
 * @package WP_Defender\Component
 */

namespace WP_Defender\Component;

use WP_Defender\Component;

/**
 * Use Breadcrumbs on different plugin pages.
 *
 * @since 5.2.0
 */
class Breadcrumbs extends Component {

	/**
	 * Get the feature's slug.
	 *
	 * @return string
	 */
	private function get_feature_slug(): string {
		return 'wd_' . \WP_Defender\Model\Setting\Session_Protection::get_module_slug() . '_breadcrumbs';
	}

	/**
	 * Update the feature's meta key.
	 *
	 * @return void
	 */
	public function update_meta_key(): void {
		update_user_meta( get_current_user_id(), $this->get_feature_slug(), 1 );
	}

	/**
	 * Get the feature's meta key.
	 *
	 * @return bool
	 */
	public function get_meta_key(): bool {
		return (bool) get_user_meta( get_current_user_id(), $this->get_feature_slug(), true );
	}

	/**
	 * Delete the feature's meta key.
	 *
	 * @return void
	 */
	public function delete_meta_key(): void {
		global $wpdb;

		$wpdb->delete( $wpdb->usermeta, array( 'meta_key' => $this->get_feature_slug() ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.SlowDBQuery
	}
}