Esempio n. 1
0
 if ($wpmu == 1) {
     if (defined('MUPLUGINDIR')) {
         $si_captcha_dir = MUPLUGINDIR . '/si-captcha-for-wordpress/captcha';
     } else {
         $si_captcha_dir = WP_CONTENT_DIR . '/mu-plugins/si-captcha-for-wordpress/captcha';
     }
 }
 $si_captcha_url = $si_image_captcha->get_captcha_url_si();
 // only used for the no-session captcha setting
 $si_captcha_url_ns = $si_captcha_url . '/temp/';
 $si_captcha_dir_ns = $si_captcha_dir . '/temp/';
 $si_image_captcha->si_captcha_init_temp_dir($si_captcha_dir_ns);
 //Actions
 add_action('init', array(&$si_image_captcha, 'si_captcha_init'));
 // get the options now
 $si_image_captcha->si_captcha_get_options();
 if (isset($si_captcha_opt['si_captcha_disable_session']) && $si_captcha_opt['si_captcha_disable_session'] == 'true') {
     // add javascript (conditionally to footer)
     // http://scribu.net/wordpress/optimal-script-loading.html
     add_action('wp_footer', array(&$si_image_captcha, 'si_captcha_add_script'));
 } else {
     // start the PHP session
     // buddypress had session error on member and groups pages, so start session here instead of init
     add_action('plugins_loaded', array(&$si_image_captcha, 'si_captcha_start_session'));
 }
 // si captcha admin options
 add_action('admin_menu', array(&$si_image_captcha, 'si_captcha_add_tabs'), 1);
 add_action('admin_head', array(&$si_image_captcha, 'si_captcha_admin_head'), 1);
 if ($si_captcha_opt['si_captcha_external_style'] != 'true' && !is_admin()) {
     // css is added to footer, then jquery appends it to head
     add_action('wp_footer', array(&$si_image_captcha, 'si_captcha_add_css'));