Plugin Directory

Changeset 1286247


Ignore:
Timestamp:
11/14/2015 03:14:26 PM (10 years ago)
Author:
laughlin.david
Message:

changed comments

Location:
keeping-points/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • keeping-points/trunk/keeping-points.php

    r1281376 r1286247  
    5252// PLUGIN PREFIX:                                                         
    5353// ------------------------------------------------------------------------
    54 // A PREFIX IS USED TO AVOID CONFLICTS WITH EXISTING PLUGIN FUNCTION NAMES.
    55 // WHEN CREATING A NEW PLUGIN, CHANGE THE PREFIX AND USE YOUR TEXT EDITORS
    56 // SEARCH/REPLACE FUNCTION TO RENAME THEM ALL QUICKLY.
    57 // ------------------------------------------------------------------------
    58 
    59 // 'posk_' prefix is derived from [p]plugin [o]ptions [s]tarter [k]it
    6054
    6155// ------------------------------------------------------------------------
     
    7367add_filter( 'plugin_action_links', 'dl_keeping_points_plugin_action_links', 10, 2 );
    7468
    75 // --------------------------------------------------------------------------------------
    76 // CALLBACK FUNCTION FOR: register_uninstall_hook(__FILE__, 'posk_delete_plugin_options')
     69
    7770// --------------------------------------------------------------------------------------
    7871// THIS FUNCTION RUNS WHEN THE USER DEACTIVATES AND DELETES THE PLUGIN. IT SIMPLY DELETES
     
    8578}
    8679
    87 // ------------------------------------------------------------------------------
    88 // CALLBACK FUNCTION FOR: register_activation_hook(__FILE__, 'posk_add_defaults')
    8980// ------------------------------------------------------------------------------
    9081// THIS FUNCTION RUNS WHEN THE PLUGIN IS ACTIVATED. IF THERE ARE NO THEME OPTIONS
     
    10091    if(($tmp['chk_default_options_db']=='1')||(!is_array($tmp))) {
    10192        delete_option('keeping_points_options'); // so we don't have to reset all the 'off' checkboxes too! (don't think this is needed but leave for now)
    102         $arr = array(   "chk_button1" => "1",
    103                         "chk_button3" => "1",
    104                         "textarea_one" => "This type of control allows a large amount of information to be entered all at once. Set the 'rows' and 'cols' attributes to set the width and height.",
    105                         "textarea_two" => "This text area control uses the TinyMCE editor to make it super easy to add formatted content.",
    106                         "textarea_three" => "Another TinyMCE editor! It is really easy now in WordPress 3.3 to add one or more instances of the built-in WP editor.",
    107                         "txt_one" => "Enter whatever you like here..",
    108                         "drp_select_box" => "four",
    109                         "chk_default_options_db" => "",
    110                         "rdo_group_one" => "one",
    111                         "rdo_group_two" => "two"
     93        $arr = array(   "chk_default_options_db" => ""
    11294        );
    11395        update_option('keeping_points_options', $arr);
     
    11799
    118100
    119 // ------------------------------------------------------------------------------
    120 // CALLBACK FUNCTION FOR: add_action('admin_init', 'posk_init' )
    121101// ------------------------------------------------------------------------------
    122102// THIS FUNCTION RUNS WHEN THE 'admin_init' HOOK FIRES, AND REGISTERS YOUR PLUGIN
     
    130110}
    131111
    132 // ------------------------------------------------------------------------------
    133 // CALLBACK FUNCTION FOR: add_action('admin_menu', 'posk_add_options_page');
    134112// ------------------------------------------------------------------------------
    135113// THIS FUNCTION RUNS WHEN THE 'admin_menu' HOOK FIRES, AND ADDS A NEW OPTIONS
     
    143121}
    144122
     123///LOAD AJAX TO MENU PAGE
    145124function dl_keeping_points_load_scripts($hook) {
    146125    global $point_settings;
     
    153132add_action('admin_enqueue_scripts', 'dl_keeping_points_load_scripts');
    154133
     134//TEST DISPLAY FOR AJAX
    155135function dl_keeping_points_process_ajax() {
    156136    $options = get_option('keeping_points_options');
     
    161141add_action ( 'wp_ajax_points_action' , 'dl_keeping_points_process_ajax' );
    162142
    163 //function to display point fields
     143//function to display point fields - ADDS BUTTONS TO ADMIN MENU DEPENDING ON
     144//HOW MANY BUTTONS ARE NEEDED BY USER // ADD AJAX FUNCTIONALITY IN NEXT VERSION
    164145function dl_keeping_points_loop_point_choice($number) {
    165146    for($i=0;$i < $number; $i++) {
     
    189170}
    190171
     172//FUNCTION TO DISPLAY TEXT BOXES TO ADD NAMES AND POINTS FOR PERSON IN POINT SYSTEM.
    191173function dl_keeping_points_dlaugh_ppl_names() {
    192174   
     
    278260    </script>
    279261     */
    280 // ------------------------------------------------------------------------------
    281 // CALLBACK FUNCTION SPECIFIED IN: add_options_page()
     262
    282263// ------------------------------------------------------------------------------
    283264// THIS FUNCTION IS SPECIFIED IN add_options_page() AS THE CALLBACK FUNCTION THAT
     
    390371}
    391372
    392 // ------------------------------------------------------------------------------
    393 // SAMPLE USAGE FUNCTIONS:
    394 // ------------------------------------------------------------------------------
    395 // THE FOLLOWING FUNCTIONS SAMPLE USAGE OF THE PLUGINS OPTIONS DEFINED ABOVE. TRY
    396 // CHANGING THE DROPDOWN SELECT BOX VALUE AND SAVING THE CHANGES. THEN REFRESH
    397 // A PAGE ON YOUR SITE TO SEE THE UPDATED VALUE.
    398 // ------------------------------------------------------------------------------
    399 
    400373
    401374/* <?php $my_greet = "What is up?"; ?>
     
    403376 */
    404377
     378 ///AJAX FOR THE FRONT-END OF THE PLUGIN DISPLAY. THIS IS WHERE USER PASTES SHORTCODE TO THEIR PAGE.
    405379function shortpoints_process_ajax() {
    406380    $options = get_option('keeping_points_options');
     
    431405add_action ( 'wp_ajax_nopriv_shortpoints-ajax' , 'shortpoints_process_ajax' );
    432406
     407
     408//THE FRONT-END OF THE PLUGIN DISPLAY. THIS IS WHERE USER PASTES SHORTCODE TO THEIR PAGE.
    433409function dlaugh_keeping_points_plugin()
    434410{
  • keeping-points/trunk/readme.txt

    r1281403 r1286247  
    88Requires at least: 4.3.1
    99Tested up to: 4.3.1
    10 Stable tag: 0.9.5
    11 Version: 0.9.5
     10Stable tag: 0.9.6
     11Version: 0.9.6
    1212
    1313Keeping Points is a plugin to help create a points reward or tracking system for each person within a program, church, or company.
Note: See TracChangeset for help on using the changeset viewer.