at path:
ROOT
/
wp-content
/
plugins
/
mojo-marketplace-wp-plugin
/
inc
/
base.php
run:
R
W
Run
RestApi
DIR
2025-12-13 10:18:02
R
W
Run
upgrades
DIR
2025-12-13 10:18:02
R
W
Run
Admin.php
8.24 KB
2025-01-29 19:52:11
R
W
Run
Delete
Rename
AdminBar.php
840 By
2025-01-29 19:52:11
R
W
Run
Delete
Rename
Data.php
640 By
2025-01-29 19:52:11
R
W
Run
Delete
Rename
base.php
2.3 KB
2025-01-29 19:52:11
R
W
Run
Delete
Rename
jetpack.php
1.04 KB
2025-01-29 19:52:11
R
W
Run
Delete
Rename
partners.php
813 By
2025-01-29 19:52:11
R
W
Run
Delete
Rename
plugin-nfd-compat-check.php
6.39 KB
2025-01-29 19:52:11
R
W
Run
Delete
Rename
plugin-nfd-upgrade.php
4.99 KB
2025-01-29 19:52:11
R
W
Run
Delete
Rename
plugin-php-compat-check.php
4.81 KB
2025-01-29 19:52:11
R
W
Run
Delete
Rename
plugin-quiet-upgrader-skin.php
943 By
2025-01-29 19:52:11
R
W
Run
Delete
Rename
settings.php
705 By
2025-01-29 19:52:11
R
W
Run
Delete
Rename
updates.php
12.33 KB
2025-01-29 19:52:11
R
W
Run
Delete
Rename
error_log
up
📄
base.php
Save
<?php /** * Base functions * * @package WPPluginMojo */ namespace Mojo; /** * Check if plugin install date exists. * * @return bool */ function mojo_has_plugin_install_date() { return ! empty( get_option( 'mojo_plugin_install_date', '' ) ); } /** * Get the plugin install date. * * @return string */ function mojo_get_plugin_install_date() { return (string) get_option( 'mojo_plugin_install_date', gmdate( 'U' ) ); } /** * Set the plugin install date. * * @param string $value Date in Unix timestamp format. */ function mojo_set_plugin_install_date( $value ) { update_option( 'mojo_plugin_install_date', $value, true ); } /** * Get the number of days since the plugin was installed. * * @return int */ function mojo_get_days_since_plugin_install_date() { return absint( ( gmdate( 'U' ) - mojo_get_plugin_install_date() ) / DAY_IN_SECONDS ); } /** * Basic setup */ function mojo_setup() { if ( ( '' === get_option( 'mm_master_aff' ) || false === get_option( 'mm_master_aff' ) ) && defined( 'MMAFF' ) ) { update_option( 'mm_master_aff', MMAFF ); } $install_date = get_option( 'mm_install_date' ); if ( empty( $install_date ) ) { update_option( 'mm_install_date', date( 'M d, Y' ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date $event = array( 't' => 'event', 'ec' => 'plugin_status', 'ea' => 'installed', 'el' => 'Install date: ' . get_option( 'mm_install_date', date( 'M d, Y' ) ), // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date 'keep' => false, ); $events = get_option( 'mm_cron', array() ); $events['hourly'][ $event['ea'] ] = $event; update_option( 'mm_cron', $events ); } if ( ! mojo_has_plugin_install_date() ) { $date = false; if ( ! empty( $install_date ) ) { $date = \DateTime::createFromFormat( 'M d, Y', $install_date ); } mojo_set_plugin_install_date( $date ? $date->format( 'U' ) : gmdate( 'U' ) ); } } add_action( 'admin_init', __NAMESPACE__ . '\\mojo_setup' ); /** * Filter the date used in data module * * @param string $install_date value from hook * @return int */ function mojo_install_date_filter( $install_date ) { return mojo_get_plugin_install_date(); } add_filter( 'nfd_install_date_filter', __NAMESPACE__ . '\\mojo_install_date_filter' );