function sunshine_init_offline() { global $sunshine; if ($sunshine->options['offline_active']) { $name = $sunshine->options['offline_name'] ? $sunshine->options['offline_name'] : __('Offline', 'sunshine'); $desc = $sunshine->options['offline_desc'] ? $sunshine->options['offline_desc'] : __('Send payment in outside of website', 'sunshine'); SunshinePaymentMethods::add_payment_method('offline', $name, $desc, 20); } }
function sunshine_paypal_init() { global $sunshine; if ($sunshine->options['paypal_active'] != 1) { return; } $name = $sunshine->options['paypal_name'] ? $sunshine->options['paypal_name'] : 'PayPal'; $desc = $sunshine->options['paypal_desc'] ? $sunshine->options['paypal_desc'] : __('Submit payment via PayPal account or use a credit card', 'sunshine'); SunshinePaymentMethods::add_payment_method('paypal', $name, $desc, 10); }
function sunshine_init() { global $sunshine; add_rewrite_endpoint($sunshine->options['endpoint_gallery'], EP_PERMALINK | EP_PAGES); add_rewrite_endpoint($sunshine->options['endpoint_image'], EP_PERMALINK | EP_PAGES); add_rewrite_endpoint($sunshine->options['endpoint_order'], EP_PERMALINK | EP_PAGES); SunshineUser::instance(); SunshineCountries::instance(); $functions = SUNSHINE_PATH . 'themes/' . $sunshine->options['theme'] . '/functions.php'; if (file_exists($functions)) { include_once $functions; } if (is_admin()) { include_once 'admin/sunshine-admin.php'; } else { SunshineSession::instance(); SunshinePaymentMethods::instance(); SunshineEmail::instance(); SunshineFrontend::instance(); } }