Yoast\WP\SEO\Helpers
Short_Link_Helper::get_days_active()
Gets the number of days the plugin has been active.
Метод класса: Short_Link_Helper{}
Хуков нет.
Возвращает
int
. The number of days the plugin is active.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_days_active();
Код Short_Link_Helper::get_days_active() Short Link Helper::get days active Yoast 24.6
protected function get_days_active() { $date_activated = $this->options_helper->get( 'first_activated_on' ); $datediff = ( \time() - $date_activated ); return (int) \round( $datediff / \DAY_IN_SECONDS ); }