Plugin Directory

Changeset 871277


Ignore:
Timestamp:
03/07/2014 03:57:32 PM (12 years ago)
Author:
dpereyra
Message:

Added Bit.ly credentials option

Location:
pushquote/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pushquote/trunk/functions.php

    r653743 r871277  
    6464        register_setting( 'general', 'realtidbitsPushquote_options' );
    6565        add_settings_field('pushquotes_show_credits', '<label for="show_credits">'.__('Show PushQuotes credits text?' ).'</label>' , array(&$this, 'fields_html') , 'general' );
     66        add_settings_field('pushquotes_login', '<label for="login">'.__('Bit.ly Login' ).'</label>' , array(&$this, 'login') , 'general' );
     67        add_settings_field('pushquotes_api_key', '<label for="api_key">'.__('Bit.ly Api Key' ).'</label>' , array(&$this, 'api_key') , 'general' );
    6668    }
    6769    function fields_html() {
     
    7476        echo '<input type="checkbox" id="realtidbitsPushquote_options[show_credits]" name="realtidbitsPushquote_options[show_credits]" value="1" '.($value ? "checked='checked'" : "").' />';
    7577    }
     78    function login() {
     79        global $realtidbitsPushquote;
     80        if(is_array($realtidbitsPushquote)) {
     81            $value = $realtidbitsPushquote['login'];
     82        } else {
     83            $value = "";
     84        }
     85        echo '<input type="text" id="realtidbitsPushquote_options[login]" name="realtidbitsPushquote_options[login]" value="'.$value.'" />';
     86    }
     87    function api_key() {
     88        global $realtidbitsPushquote;
     89        if(is_array($realtidbitsPushquote)) {
     90            $value = $realtidbitsPushquote['api_key'];
     91        } else {
     92            $value = "";
     93        }
     94        echo '<input type="text" id="realtidbitsPushquote_options[api_key]" name="realtidbitsPushquote_options[api_key]" value="'.$value.'" />';
     95    }
    7696}
    7797?>
  • pushquote/trunk/includes/core.php

    r653743 r871277  
    2020        wp_enqueue_script( 'realtidbitsPushquote', realtidbitsPushquote_plugin_url( 'js/pullquote.js' ),
    2121            array('jquery'), REALPUSHQUOTE_VER, false);
    22         wp_localize_script( 'realtidbitsPushquote', 'PushquoteAjax', array( 'show_credits' => (is_array($realtidbitsPushquote) ? $realtidbitsPushquote['show_credits'] : 0 ) ) );
     22        wp_localize_script( 'realtidbitsPushquote', 'PushquoteAjax', array( 'show_credits' => (is_array($realtidbitsPushquote) ? $realtidbitsPushquote['show_credits'] : 0 ), 'login' => $realtidbitsPushquote['login'], 'api_key' => $realtidbitsPushquote['api_key'] ) );
    2323    }
    2424}
  • pushquote/trunk/js/pullquote.js

    r653743 r871277  
    77
    88jQuery(document).ready(function() {
    9     var login = "kga245",
    10     api_key = "R_156fc6d6bba784a8b3cab2e574fc61db",
     9    var login = PushquoteAjax.login,
     10    api_key = PushquoteAjax.api_key,
    1111    pathname = window.location.href,
    1212    pagetitle = document.title,
  • pushquote/trunk/readme.txt

    r653750 r871277  
    55Requires at least: 3.0
    66Tested up to: 3.5
    7 Stable tag: 1.0
     7Stable tag: 1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2626== Changelog ==
    2727
     28= 1.1 =
     29* Added Bit.ly credentials option
     30
    2831= 1.0 =
    2932* Release
  • pushquote/trunk/realtidbits-pushquote.php

    r653743 r871277  
    33Plugin Name: PushQuote Plugin
    44Description: Add pullquotes easily.
    5 Version: 1.0   
     5Version: 1.1   
    66Author: Realtidbits
    77Author URI: http://realtidbits.com/
     
    1515$realtidbitsPushquote = get_option('realtidbitsPushquote_options');
    1616
    17 define("REALPUSHQUOTE_VER","1.0",false);//Current Version of this plugin
     17define("REALPUSHQUOTE_VER","1.1",false);//Current Version of this plugin
    1818if ( ! defined( 'REALPUSHQUOTE_PLUGIN_BASENAME' ) )
    1919    define( 'REALPUSHQUOTE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.