false, // Enable plugin switch 'sc_project' => '', // StatCounter Project ID 'sc_security' => '', // StatCounter Security String 'ga_uacct' => '', // Google Analytics Web Property ID 'ga_domain' => $ga_url, // Google Analytics Value of _setDomainName 'addfoot_other' => '', // For any other code ); return $addfoot_settings; } // Function to read options from the database function addfoot_read_options() { $addfoot_settings_changed = false; //ald_addfoot_activate(); $defaults = addfoot_default_options(); $addfoot_settings = array_map('stripslashes',(array)get_option('ald_addfoot_settings')); unset($addfoot_settings[0]); // produced by the (array) casting when there's nothing in the DB foreach ($defaults as $k=>$v) { if (!isset($addfoot_settings[$k])) $addfoot_settings[$k] = $v; $addfoot_settings_changed = true; } if ($addfoot_settings_changed == true) update_option('ald_addfoot_settings', $addfoot_settings); return $addfoot_settings; } // This function adds an Options page in WP Admin if (is_admin() || strstr($_SERVER['PHP_SELF'], 'wp-admin/')) { require_once(ALD_ADDFOOT_DIR . "/admin.inc.php"); // Add meta links function addfoot_plugin_actions( $links, $file ) { static $plugin; if (!$plugin) $plugin = plugin_basename(__FILE__); // create link if ($file == $plugin) { $links[] = '' . __('Settings', ADDFOOT_LOCAL_NAME ) . ''; $links[] = '' . __('Support', ADDFOOT_LOCAL_NAME ) . ''; $links[] = '' . __('Donate', ADDFOOT_LOCAL_NAME ) . ''; } return $links; } global $wp_version; if ( version_compare( $wp_version, '2.8alpha', '>' ) ) add_filter( 'plugin_row_meta', 'addfoot_plugin_actions', 10, 2 ); // only 2.8 and higher else add_filter( 'plugin_action_links', 'addfoot_plugin_actions', 10, 2 ); } ?>