300,
'display' => __('Every 5 Minutes', '1-click-form-sync'),
];
}
return $schedules;
});
// Register activation and deactivation hooks.
register_activation_hook(__FILE__, [\OneClickFormSync\Core\Activator::class, 'activate']);
register_deactivation_hook(__FILE__, [\OneClickFormSync\Core\Deactivator::class, 'deactivate']);
// Add custom action links under plugin title on Plugins page (Settings | Setup Wizard).
add_filter('plugin_action_links_' . plugin_basename(__FILE__), function (array $links): array {
$custom_links = [
'' . esc_html__('Settings', '1-click-form-sync') . '',
'' . esc_html__('Setup Wizard', '1-click-form-sync') . '',
];
return array_merge($custom_links, $links);
});
// Add custom row meta links on Plugins page (Suggest a Feature | Support).
add_filter('plugin_row_meta', function (array $links, string $file): array {
if ($file === plugin_basename(__FILE__)) {
$links[] = '' . esc_html__('Suggest a Feature', '1-click-form-sync') . '';
$links[] = '' . esc_html__('Support', '1-click-form-sync') . '';
}
return $links;
}, 10, 2);
// Initialize and run the plugin.
add_action('plugins_loaded', function (): void {
$container = new \OneClickFormSync\Core\Container();
$plugin = new \OneClickFormSync\Core\Plugin($container);
$plugin->run();
});