function gllr_init() { global $gllr_plugin_info, $pagenow; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); if (!$gllr_plugin_info) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $gllr_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_min_version_check(plugin_basename(__FILE__), $gllr_plugin_info, '3.8', '3.5'); /* Add media button to the gallery post type */ if (isset($_GET['post']) && get_post_type($_GET['post']) == 'gallery' || isset($pagenow) && $pagenow == 'post-new.php' && isset($_GET['post_type']) && $_GET['post_type'] == 'gallery') { add_action('edit_form_after_title', 'gllr_media_custom_box'); } /* Register post type */ gllr_post_type_images(); /* demo data */ $demo_options = get_option('gllr_demo_options'); if (!empty($demo_options) || isset($_GET['page']) && $_GET['page'] == 'gallery-plugin.php') { gllr_include_demo_data(); } }
function gglcptch_init() { global $gglcptch_plugin_info, $gglcptch_options; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); 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_min_version_check(plugin_basename(__FILE__), $gglcptch_plugin_info, '3.8'); /* Call register settings function */ if (!($is_admin = is_admin()) || isset($_GET['page']) && 'google-captcha.php' == $_GET['page']) { register_gglcptch_settings(); } /* Add hooks */ if (!$is_admin) { /* Add hooks */ if ('1' == $gglcptch_options['login_form'] || '1' == $gglcptch_options['reset_pwd_form'] || '1' == $gglcptch_options['registration_form']) { add_action('login_enqueue_scripts', 'gglcptch_add_styles'); 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['reset_pwd_form']) { add_action('lostpassword_form', 'gglcptch_login_display'); add_action('allow_password_reset', 'gglcptch_lostpassword_check'); } if ('1' == $gglcptch_options['registration_form']) { if (!is_multisite()) { add_action('register_form', 'gglcptch_login_display', 99); add_action('registration_errors', 'gglcptch_lostpassword_check'); } else { add_action('signup_extra_fields', 'gglcptch_signup_display'); add_action('signup_blogform', 'gglcptch_signup_display'); add_filter('wpmu_validate_user_signup', 'gglcptch_signup_check'); } } } 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['contact_form']) { add_filter('cntctfrm_display_captcha', 'gglcptch_cf_display', 10, 2); add_filter('cntctfrm_check_form', 'gglcptch_recaptcha_check'); /** * this filters are necessary for compatibility * with old Contact Form Pro by BestWebsoft versions * @deprecated since 1.0.4 * @todo remove after 25.02.2017 */ add_filter('cntctfrmpr_display_captcha', 'gglcptch_cf_display', 10, 2); add_filter('cntctfrmpr_check_form', 'gglcptch_recaptcha_check'); } } }
function gglcptch_init() { global $gglcptch_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); 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_min_version_check(plugin_basename(__FILE__), $gglcptch_plugin_info, '3.8', '3.1'); }
function gglcptch_init() { global $gglcptch_options, $gglcptch_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); 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_min_version_check(plugin_basename(__FILE__), $gglcptch_plugin_info, '3.8', '3.1'); /* Get options from the database */ $gglcptch_options = get_option('gglcptch_options'); if (!$gglcptch_options) { register_gglcptch_settings(); $gglcptch_options = get_option('gglcptch_options'); } /* Add hooks */ if ('1' == $gglcptch_options['login_form'] || '1' == $gglcptch_options['reset_pwd_form'] || '1' == $gglcptch_options['registration_form']) { add_action('login_enqueue_scripts', 'gglcptch_add_site_script_styles'); 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']) { if (!is_multisite()) { add_action('register_form', 'gglcptch_login_display'); add_action('register_post', 'gglcptch_lostpassword_check'); } else { add_action('signup_extra_fields', 'gglcptch_signup_display'); add_filter('wpmu_validate_user_signup', 'gglcptch_signup_check', 10, 3); } } } if ('1' == $gglcptch_options['contact_form']) { add_filter('cntctfrm_display_captcha', 'gglcptch_cf_display'); add_filter('cntctfrmpr_display_captcha', 'gglcptch_cf_display'); } }
function gllr_init() { global $gllr_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); if (!$gllr_plugin_info) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $gllr_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_min_version_check(plugin_basename(__FILE__), $gllr_plugin_info, '3.8', '3.5'); /* Register post type */ gllr_post_type_images(); }
function vstrsnln_plugin_init() { global $vstrsnln_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); if (empty($vstrsnln_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $vstrsnln_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_min_version_check(plugin_basename(__FILE__), $vstrsnln_plugin_info, '3.8', '3.4'); /* Get/Register and check settings for plugin */ vstrsnln_default_options(); vstrsnln_write_user_base(); }
function pgntn_init() { global $bws_plugin_info, $pgntn_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); /* 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_min_version_check(plugin_basename(__FILE__), $pgntn_plugin_info, '3.8', '3.3'); pgntn_settings(); pgntn_display(); }
function cstmfldssrch_init() { global $cstmfldssrch_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); if (empty($cstmfldssrch_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $cstmfldssrch_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_min_version_check(plugin_basename(__FILE__), $cstmfldssrch_plugin_info, '3.8', '3.1'); /* Call register settings function */ if (!is_admin() || isset($_GET['page']) && "custom-fields-search.php" == $_GET['page']) { cstmfldssrch_register_options(); } }
function gglnltcs_init() { global $gglnltcs_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); if (empty($gglnltcs_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $gglnltcs_plugin_info = get_plugin_data(__FILE__); } /* Check if plugin is compatible with current WP version.*/ bws_wp_min_version_check(plugin_basename(__FILE__), $gglnltcs_plugin_info, '3.8', '3.3'); /* Load options only on the frontend or on the plugin page. */ if (!is_admin() || isset($_REQUEST['page']) && "bws-google-analytics.php" == $_REQUEST['page']) { gglnltcs_get_options_from_db(); } }
function pplrpsts_init() { global $pplrpsts_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); if (empty($pplrpsts_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $pplrpsts_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_min_version_check(plugin_basename(__FILE__), $pplrpsts_plugin_info, '3.8', '3.1'); if (!session_id()) { @session_start(); } add_image_size('popular-post-featured-image', 60, 60, true); }
function gglcptch_init() { global $gglcptch_options, $gglcptch_allow_url_fopen, $gglcptch_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); 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_min_version_check(plugin_basename(__FILE__), $gglcptch_plugin_info, '3.8', '3.1'); /* Get options from the database */ $gglcptch_options = get_option('gglcptch_options'); /* Get option from the php.ini */ $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 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_min_version_check(plugin_basename(__FILE__), $cntctfrm_plugin_info, '3.8', '3.1'); if (!is_admin()) { cntctfrm_check_and_send(); } }
function gglstmp_init() { global $gglstmp_plugin_info; 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_include.php'; bws_include_init(plugin_basename(__FILE__)); /* check compatible with current WP version */ bws_wp_min_version_check(plugin_basename(__FILE__), $gglstmp_plugin_info, '3.8', '3.1'); /* 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 prflxtrflds_init() { global $prflxtrflds_plugin_info; /*add bws menu. use in prflxtrflds_admin_menu*/ require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); /* Get plugin data */ if (empty($prflxtrflds_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $prflxtrflds_plugin_info = get_plugin_data(__FILE__); } /* Function check if plugin is compatible with current WP version */ bws_wp_min_version_check(plugin_basename(__FILE__), $prflxtrflds_plugin_info, '3.8'); /* Call register settings function */ if (!is_admin() || isset($_GET['page']) && 'profile-extra-fields.php' == $_GET['page']) { prflxtrflds_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_include.php'; bws_include_init(plugin_basename(__FILE__)); 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_min_version_check(plugin_basename(__FILE__), $mltlngg_plugin_info, '3.8', '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($_REQUEST['action']) || isset($_POST['action2']) || isset($_POST['mltlngg_add_new_language_form_was_send']) && true == $mltlngg_options['enabled_new_language']) { flush_rewrite_rules(); } }
function cptch_init() { global $cptch_plugin_info; require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init(plugin_basename(__FILE__)); 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_min_version_check(plugin_basename(__FILE__), $cptch_plugin_info, '3.8', '3.1'); /* Call register settings function */ if (!is_admin() || isset($_GET['page']) && "captcha.php" == $_GET['page']) { cptch_settings(); } if (!is_admin()) { cptch_contact_form_options(); } }
function adsns_plugin_init() { require_once dirname(__FILE__) . '/bws_menu/bws_include.php'; bws_include_init('adsense-plugin/adsense-plugin.php'); if (empty($this->adsns_plugin_info)) { if (!function_exists('get_plugin_data')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $this->adsns_plugin_info = get_plugin_data(dirname(__FILE__) . '/adsense-plugin.php'); } /* Function check if plugin is compatible with current WP version */ bws_wp_min_version_check('adsense-plugin/adsense-plugin.php', $this->adsns_plugin_info, '3.8', '3.3'); /* Call register settings function */ if (!is_admin() || isset($_GET['page']) && "adsense-plugin.php" == $_GET['page']) { $this->adsns_activate(); } }
function bws_wp_version_check($plugin_basename, $plugin_info, $require_wp) { bws_wp_min_version_check($plugin_basename, $plugin_info, '3.8', $require_wp); }