function sbscrbr_init() { global $sbscrbr_plugin_info; /* load textdomain of plugin */ load_plugin_textdomain('subscriber', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (empty($sbscrbr_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $sbscrbr_plugin_info = get_plugin_data(__FILE__); } /* check version on WordPress */ bws_wp_version_check(plugin_basename(__FILE__), $sbscrbr_plugin_info, '3.1'); /* add new user role */ $capabilities = array('read' => true, 'edit_posts' => false, 'delete_posts' => false); add_role('sbscrbr_subscriber', __('Mail Subscriber', 'subscriber'), $capabilities); /* register plugin settings */ $plugin_pages = array('sbscrbr_settings_page', 'sbscrbr_users'); if (!is_admin() || isset($_GET['page']) && in_array($_GET['page'], $plugin_pages)) { sbscrbr_settings(); } /* unsubscribe users from mailout if Subscribe Form not displayed on home page */ if (!is_admin()) { sbscrbr_update_user(); } }
function lmtttmpts_plugin_init() { global $lmtttmpts_plugin_info; /* Internationalization, first(!) */ load_plugin_textdomain('lmtttmpts', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (empty($lmtttmpts_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $lmtttmpts_plugin_info = get_plugin_data(__FILE__); } /* check WordPress version */ bws_wp_version_check(plugin_basename(__FILE__), $lmtttmpts_plugin_info, "3.6"); }
function rttchr_init() { global $rttchr_plugin_info; /* Internationalization, first(!) */ load_plugin_textdomain('re_attacher', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (empty($rttchr_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $rttchr_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_version_check(plugin_basename(__FILE__), $rttchr_plugin_info, '3.5'); }
function pgntn_init() { global $bws_plugin_info, $pgntn_plugin_info; /* Internationalization, first(!) */ load_plugin_textdomain('pagination', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; /* Add variable for bws_menu */ if (empty($pgntn_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $pgntn_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_version_check(plugin_basename(__FILE__), $pgntn_plugin_info, "3.3"); pgntn_settings(); pgntn_display(); }
function gglcptch_init() { global $gglcptch_options, $gglcptch_allow_url_fopen, $gglcptch_plugin_info; load_plugin_textdomain('google_captcha', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (empty($gglcptch_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $gglcptch_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_version_check(plugin_basename(__FILE__), $gglcptch_plugin_info, "3.0"); /* Get options from the database */ $gglcptch_options = get_option('gglcptch_options'); /* Get option from the php.ini */ if (isset($gglcptch_options['recaptcha_version']) && $gglcptch_options['recaptcha_version'] == 'v2') { $gglcptch_allow_url_fopen = ini_get('allow_url_fopen') != 1 ? false : true; } /* Add hooks */ if ('1' == $gglcptch_options['login_form']) { add_action('login_form', 'gglcptch_login_display'); add_action('authenticate', 'gglcptch_login_check', 21, 1); } if ('1' == $gglcptch_options['comments_form']) { add_action('comment_form_after_fields', 'gglcptch_commentform_display'); add_action('comment_form_logged_in_after', 'gglcptch_commentform_display'); add_action('pre_comment_on_post', 'gglcptch_commentform_check'); } if ('1' == $gglcptch_options['reset_pwd_form']) { add_action('lostpassword_form', 'gglcptch_login_display'); add_action('lostpassword_post', 'gglcptch_lostpassword_check'); } if ('1' == $gglcptch_options['registration_form']) { add_action('register_form', 'gglcptch_login_display'); add_action('register_post', 'gglcptch_lostpassword_check'); /* for multisite */ add_action('signup_extra_fields', 'gglcptch_login_display'); } if ('1' == $gglcptch_options['contact_form']) { add_filter('cntctfrm_display_captcha', 'gglcptch_cf_display'); add_filter('cntctfrmpr_display_captcha', 'gglcptch_cf_display'); } }
function cstmsrch_init() { global $cstmsrch_options, $cstmsrch_plugin_info; /* Function adds translations in this plugin */ load_plugin_textdomain('custom-search', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (empty($cstmsrch_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $cstmsrch_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_version_check(plugin_basename(__FILE__), $cstmsrch_plugin_info, '3.1'); /* Call register settings function */ if (!is_admin() || isset($_GET['page']) && "custom_search.php" == $_GET['page']) { register_cstmsrch_settings(); } }
function mltlngg_init() { global $wpdb, $mltlngg_options, $mltlngg_table_translate, $mltlngg_terms_table_translate, $mltlngg_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (empty($mltlngg_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $mltlngg_plugin_info = get_plugin_data(__FILE__); } /* check WordPress version */ bws_wp_version_check(plugin_basename(__FILE__), $mltlngg_plugin_info, "3.7"); $mltlngg_table_translate = $wpdb->prefix . 'mltlngg_translate'; $mltlngg_terms_table_translate = $wpdb->prefix . 'mltlngg_terms_translate'; mltlngg_register_settings(); /* If there have been changes in the list of languages do flush_rewrite_rules */ if (isset($_GET['action']) || isset($_POST['action']) || isset($_POST['action2']) || isset($_POST['mltlngg_add_new_language_form_was_send']) && true == $mltlngg_options['enabled_new_language']) { flush_rewrite_rules(); } }
function cntctfrm_init() { global $bws_plugin_info, $cntctfrm_plugin_info; if (!session_id()) { @session_start(); } require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); if (empty($cntctfrm_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $cntctfrm_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_version_check(plugin_basename(__FILE__), $cntctfrm_plugin_info, '3.1'); if (!is_admin()) { cntctfrm_check_and_send(); } }
function cntctfrm_init() { global $bws_plugin_info, $cntctfrm_plugin_info; /* Internationalization, first(!) */ if (!session_id()) { @session_start(); } load_plugin_textdomain('contact_form', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (empty($cntctfrm_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $cntctfrm_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_version_check(plugin_basename(__FILE__), $cntctfrm_plugin_info, '3.1'); if (!is_admin()) { cntctfrm_check_and_send(); } }
function gglstmp_init() { global $gglstmp_plugin_info; /* Internationalization */ load_plugin_textdomain('sitemap', false, dirname(plugin_basename(__FILE__)) . '/languages/'); if (empty($gglstmp_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $gglstmp_plugin_info = get_plugin_data(__FILE__); } /* add general functions */ require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; bws_wp_version_check(plugin_basename(__FILE__), $gglstmp_plugin_info, "3.1"); /* check compatible with current WP version ##*/ /* Get options from the database */ if (!is_admin() || isset($_GET['page']) && "google-sitemap-plugin.php" == $_GET['page']) { /* Get/Register and check settings for plugin */ gglstmp_register_settings(); } }
function cptch_init() { global $cptch_plugin_info; /* Internationalization */ load_plugin_textdomain('captcha', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (!$cptch_plugin_info) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $cptch_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_version_check(plugin_basename(__FILE__), $cptch_plugin_info, '3.1'); if (!is_admin()) { cptch_contact_form_options(); } /* Call register settings function */ if (!is_admin() || isset($_GET['page']) && "captcha.php" == $_GET['page']) { cptch_settings(); } }
function prtfl_init() { global $prtfl_boxes, $prtfl_plugin_info; /* Internationalization, first(!) */ load_plugin_textdomain('portfolio', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once dirname(__FILE__) . '/bws_menu/bws_functions.php'; if (!$prtfl_plugin_info) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $prtfl_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_version_check(plugin_basename(__FILE__), $prtfl_plugin_info, "3.1"); $prtfl_boxes['Portfolio-Info'] = array(array('_prtfl_short_descr', __('Short description', 'portfolio'), __('A short description which you\'d like to be displayed on your portfolio page', 'portfolio'), '', ''), array('_prtfl_date_compl', __('Date of completion', 'portfolio'), __('The date when the task was completed', 'portfolio'), '', ''), array('_prtfl_link', __('Link', 'portfolio'), __('A link to the site', 'portfolio'), '', ''), array('_prtfl_svn', __('SVN', 'portfolio'), __('SVN URL', 'portfolio'), '', '')); /* Call register settings function */ register_prtfl_settings(); /* Register post type */ prtfl_post_type_portfolio(); /* Register taxonomy for portfolio */ prtfl_taxonomy_portfolio(); }