The table below allows you to select which page types get an extra header link and the format of the link text.
+
+
+
+
+
+
+
Available substitution tags:
+
+
%title% - displays the corresponding title for each page type
+
%site_title% - displays the title of the site
+
+
+page_footer();
+ }
+}
+
diff --git a/blog/wp-content/plugins/extra-feed-links/inc/scbForms.php b/blog/wp-content/plugins/extra-feed-links/inc/scbForms.php
new file mode 100644
index 0000000..97fe41c
--- /dev/null
+++ b/blog/wp-content/plugins/extra-feed-links/inc/scbForms.php
@@ -0,0 +1,189 @@
+ any valid type
+ 'names' => string | array
+ 'values' => string | array (default: 1 or $options['name'])
+ 'check' => true | false (default: true)
+ 'extra' => string (default: class="widefat")
+ 'desc' => string (default: name)
+ 'desc_pos' => 'before' | 'after' | 'none' (default: after)
+ );
+ $options = array('name' => 'value'...)
+ */
+
+ public function input($args, $options = array()) {
+ $token = '%input%';
+
+ extract(wp_parse_args($args, array(
+ 'desc_pos' => 'after',
+ 'check' => true,
+ 'extra' => 'class="widefat"'
+ )));
+
+ // Check required fields
+ if ( empty($type) )
+ trigger_error('No type specified', E_USER_WARNING);
+
+ if ( empty($names) ) {
+ trigger_error('No name specified', E_USER_WARNING);
+ return;
+ }
+
+ // Check for defined options
+ if ( $check && 'submit' != $type && !empty($options) )
+ self::check_names($names, $options);
+
+ $f1 = is_array($names);
+ $f2 = is_array($values);
+
+ // Set default values
+ if ( !isset($values) )
+ if ( 'text' == $type && !$f1 )
+ $values = stripslashes(wp_specialchars($options[$names], ENT_QUOTES));
+ elseif ( in_array($type, array('checkbox', 'radio')) )
+ $values = true;
+
+ // Expand names or values
+ if ( !$f1 && !$f2 )
+ $a = array($names => $values);
+ elseif ( $f1 && !$f2 )
+ $a = array_fill_keys($names, $values);
+ elseif ( !$f1 && $f2 )
+ $a = array_fill_keys($values, $names);
+ else
+ $a = array_combine($names, $values);
+
+ // Determine what goes where
+ if ( !$f1 && $f2 ) {
+ $i1 = 'val';
+ $i2 = 'name';
+ } else {
+ $i1 = 'name';
+ $i2 = 'val';
+ }
+
+ if ( $f1 || $f2 )
+ $l1 = 'name';
+ else
+ $l1 = 'desc';
+
+ // Generate output
+ foreach ( $a as $name => $val ) {
+ // Build extra string
+ $extra_s = $extra;
+
+ if ( in_array($type, array('checkbox', 'radio')) && $options[$$i1] == $$i2)
+ $extra_s .= " checked='checked'";
+
+ // Build the item
+ $input = " ";
+
+ // Add description
+ $desc = $$l1;
+ $desc = str_replace('[]', '', $desc);
+ if ( FALSE == stripos($desc, $token) )
+ if ( 'before' == $desc_pos )
+ $desc .= ' ' . $token;
+ elseif ( 'after' == $desc_pos )
+ $desc = $token . ' ' . $desc;
+ $desc = str_replace($token, $input, $desc);
+ $desc = trim($desc);
+
+ // Add label
+ if ( 'none' == $desc_pos || empty($desc) )
+ $output[] = $input . "\n";
+ else
+ $output[] = "\n";
+ }
+
+ return implode("\n", $output);
+ }
+
+ public static function select($args, $options) {
+ extract(wp_parse_args($args, array(
+ 'name' => '',
+ 'selected' => NULL,
+ 'extra' => ''
+ )));
+
+ if ( empty($name) )
+ trigger_error('No name specified', E_USER_NOTICE);
+
+ if ( !is_array($options) ) {
+ trigger_error("Second argument is expected to be an associative array", E_USER_WARNING);
+ return;
+ }
+
+ foreach ( $options as $key => $value ) {
+ $extra_s = $extra;
+ if ( $name === $selected )
+ $extra_s = " selected='selected'";
+ else
+ $extra_s = "";
+
+ $opts .= "\t\n";
+ }
+
+ return "\n";
+ }
+
+ // Creates a textarea
+ public static function textarea($args, $content) {
+ extract(wp_parse_args($args, array(
+ 'name' => '',
+ 'extra' => 'class="widefat"',
+ 'escaped' => 'false'
+ )));
+
+ if ( !$escaped )
+ $content = stripslashes(wp_specialchars($content, ENT_QUOTES));
+
+ if ( empty($name) )
+ trigger_error('No name specified', E_USER_NOTICE);
+
+ return "\n";
+ }
+
+ // Adds a form around the $content, including a hidden nonce field
+ public function form_wrap($content, $nonce = 'update_options') {
+ $output .= "\n\n";
+
+ return $output;
+ }
+
+
+//_____HELPER METHODS (SHOULD NOT BE CALLED DIRECTLY)_____
+
+
+ // Checks if selected $names have equivalent in $options. Used by form_row()
+ protected static function check_names($names, $options) {
+ $names = (array) $names;
+
+ foreach ( $names as $i => $name )
+ $names[$i] = str_replace('[]', '', $name);
+
+ foreach ( array_diff($names, array_keys($options)) as $key )
+ trigger_error("Option not defined: {$key}", E_USER_WARNING);
+ }
+}
+
+// < PHP 5.2
+if ( !function_exists('array_fill_keys') ) :
+function array_fill_keys($keys, $value) {
+ $r = array();
+
+ foreach($keys as $key)
+ $r[$key] = $value;
+
+ return $r;
+}
+endif;
+
diff --git a/blog/wp-content/plugins/extra-feed-links/inc/scbOptions.php b/blog/wp-content/plugins/extra-feed-links/inc/scbOptions.php
new file mode 100755
index 0000000..bc285ed
--- /dev/null
+++ b/blog/wp-content/plugins/extra-feed-links/inc/scbOptions.php
@@ -0,0 +1,67 @@
+key = $key;
+ $this->data = get_option($this->key);
+ }
+
+ public function setup($file, $defaults) {
+ $this->defaults = $defaults;
+ register_activation_hook($file, array($this, 'reset'), false);
+ register_uninstall_hook($file, array($this, 'delete'));
+ }
+
+ // Get all data or a certain field
+ public function get($field = '') {
+ if ( empty($field) === true )
+ return $this->data;
+
+ return @$this->data[$field];
+ }
+
+ // Update a portion of the data
+ public function update_part($newdata) {
+ if ( !is_array($this->data) || !is_array($newdata) )
+ return false;
+
+ $this->update(array_merge($this->data, $newdata));
+ }
+
+ // Update option
+ public function update($newdata) {
+ if ( $this->data === $newdata )
+ return;
+
+ $this->data = $newdata;
+
+ add_option($this->key, $this->data) or
+ update_option($this->key, $this->data);
+ }
+
+ // Reset option to defaults
+ public function reset($override = true) {
+ if ( !$override && is_array($this->defaults) && is_array($this->data) )
+ $newdata = array_merge($this->defaults, $this->data);
+ else
+ $newdata = $this->defaults;
+
+ $this->update($newdata);
+ }
+
+ // Delete option
+ public function delete() {
+ delete_option($this->key);
+ }
+}
+
+// < WP 2.7
+if ( !function_exists('register_uninstall_hook') ) :
+function register_uninstall_hook() {}
+endif;
diff --git a/blog/wp-content/plugins/extra-feed-links/inc/scbOptionsPage.php b/blog/wp-content/plugins/extra-feed-links/inc/scbOptionsPage.php
new file mode 100644
index 0000000..155260b
--- /dev/null
+++ b/blog/wp-content/plugins/extra-feed-links/inc/scbOptionsPage.php
@@ -0,0 +1,195 @@
+ '',
+ 'short_title' => '',
+ 'page_slug' => '',
+ 'type' => 'settings'
+ );
+
+ // Hook string created at page init
+ protected $pagehook;
+
+ // Nonce string
+ protected $nonce;
+
+ // Plugin dir url
+ protected $plugin_url;
+
+ // scbOptions object holder
+ protected $options;
+
+ // Form actions
+ protected $actions = array();
+
+
+//_____MAIN METHODS_____
+
+
+ // Main constructor
+ public function __construct($file = '') {
+ $this->set_url($file);
+
+ $this->setup();
+ $this->check_args();
+
+ if ( isset($this->options) )
+ $this->options->setup($file, $this->defaults);
+
+ add_action('admin_menu', array($this, 'page_init'));
+ }
+
+ // This is where all the page args goes
+ abstract protected function setup();
+
+ // This is where the css and js go
+ public function page_head() {}
+
+ // This is where the page content goes
+ abstract public function page_content();
+
+ // To be used in ::page_head()
+ protected function admin_msg($msg, $class = "updated") {
+ echo "
$msg
\n";
+ }
+
+ // Wraps a string in a \n";
+ }
+
+ // Wraps a string in a \n";
+ }
+
+ // Generates a standard page head
+ protected function page_header() {
+ $this->form_handler();
+
+ echo "
\n";
+ echo "
".$this->args['page_title']."
\n";
+ }
+
+ // Generates a standard page footer
+ protected function page_footer() {
+ echo "
\n";
+ }
+
+ public function form_wrap($content) {
+ return parent::form_wrap($content, $this->nonce);
+ }
+
+ // Wrap a field in a table row
+ public function form_row($args, $options) {
+ return "\n
\n\t
{$args['title']}
\n\t
\n\t\t". parent::input($args, $options) ."\n\t
\n\n
";
+ }
+
+ // Generates multiple rows and wraps them in a form table
+ protected function form_table($rows, $action = 'Save Changes') {
+ $output .= "\n