'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 ( ! bluehost_has_plugin_install_date() ) { $date = false; if ( ! empty( $install_date ) ) { $date = \DateTime::createFromFormat( 'M d, Y', $install_date ); } bluehost_set_plugin_install_date( $date ? $date->format( 'U' ) : gmdate( 'U' ) ); } } add_action( 'admin_init', __NAMESPACE__ . '\\bluehost_setup' ); /** * Filter the date used in data module * * @return int */ function bluehost_install_date_filter() { return bluehost_get_plugin_install_date(); } add_filter( 'nfd_install_date_filter', __NAMESPACE__ . '\\bluehost_install_date_filter' ); /** * SVG allowed tags for kses * * Exampl use: wp_kses( $svg, KSES_ALLOWED_SVG_TAGS ); */ const KSES_ALLOWED_SVG_TAGS = array( 'svg' => array( 'class' => true, 'fill' => true, 'height' => true, 'stroke' => true, 'stroke-width' => true, 'viewbox' => true, 'width' => true, 'xmlns' => true, ), 'g' => array( 'fill' => true, 'stroke' => true, 'stroke-miterlimit' => true, 'stroke-width' => true, ), 'rect' => array( 'fill' => true, 'height' => true, 'rx' => true, 'transform' => true, 'width' => true, 'x' => true, 'y' => true, ), 'text' => array( 'fill' => true, 'font-family' => true, 'font-size' => true, 'font-weight' => true, 'title' => true, 'transform' => true, ), 'path' => array( 'd' => true, 'fill' => true, 'opacity' => true, 'stroke-linecap' => true, 'stroke-linejoin' => true, 'transform' => true, ), );