tumblr hit counter
false, // Enable plugin switch 'disable_notice' => false, // // Disable notice that is displayed when enable_plugin is false 'sc_project' => '', // StatCounter Project ID 'sc_security' => '', // StatCounter Security String 'ga_uacct' => '', // Google Analytics Web Property ID 'ga_ua' => false, // Choose between Classic Analytics or Universal Analytics 'ga_domain' => $ga_url, // Google Analytics Value of _setDomainName 'addfoot_other' => '', // For any other code ); return apply_filters( 'addfoot_default_options', $addfoot_settings ); } /** * Function to read options from the database and add any new ones. * * @return array Options from the database */ function addfoot_read_options() { $addfoot_settings_changed = false; $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 // If there are any new options added to the Default Options array, let's add them foreach ( $defaults as $k=>$v ) { if ( ! isset( $addfoot_settings[ $k ] ) ) { $addfoot_settings[ $k ] = $v; } $addfoot_settings_changed = true; } if ( true == $addfoot_settings_changed ) { update_option( 'ald_addfoot_settings', $addfoot_settings ); } return apply_filters( 'addfoot_read_options', $addfoot_settings ); } /** * Admin option * */ if ( is_admin() || strstr( $_SERVER['PHP_SELF'], 'wp-admin/' ) ) { /** * Load the admin pages if we're in the Admin. * */ require_once( ALD_ADDFOOT_DIR . "/admin.inc.php" ); /** * Adding WordPress plugin action links. * * @param array $links * @return array */ function addfoot_plugin_actions_links( $links ) { return array_merge( array( 'settings' => '' . __( 'Settings', 'add-to-footer' ) . '' ), $links ); } add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'addfoot_plugin_actions_links' ); /** * Add meta links on Plugins page. * * @param array $links * @param string $file * @return array */ function addfoot_plugin_actions( $links, $file ) { static $plugin; if ( ! $plugin ) { $plugin = plugin_basename( __FILE__ ); } // create link if ( $file == $plugin ) { $links[] = '' . __( 'Support', 'add-to-footer' ) . ''; $links[] = '' . __( 'Donate', 'add-to-footer' ) . ''; } return $links; } add_filter( 'plugin_row_meta', 'addfoot_plugin_actions', 10, 2 ); // only 2.8 and higher } // End admin.inc ?>