Plugin Directory

Changeset 361079


Ignore:
Timestamp:
03/17/2011 03:26:52 AM (15 years ago)
Author:
doolin
Message:

Ready for incremental release.

Location:
hrecipe/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • hrecipe/trunk/hrecipe.class.php

    r359402 r361079  
    4848        //wp_enqueue_script('hrecipe-jquery-min');
    4949        //wp_enqueue_script('hrecipe-reciply');
     50        wp_register_script('hrecipe-format',plugins_url('hrecipe/js/hrecipe_format.js',dirname(__FILE__)));
    5051        wp_register_script('hrecipescript',plugins_url('hrecipe/js/hrecipescript.js',dirname(__FILE__)));
    5152        wp_localize_script('hrecipescript','hrecipe_handle',hrecipe_localize_vars());
    5253
    53         // TODO: Move the enqueue to where it's needed.       
     54        // TODO: Move the enqueue to where it's needed.
    5455        wp_enqueue_script('hrecipescript');
     56        //wp_enqueue_script('hrecipe-format');
    5557       
    5658       
     
    6163    }
    6264
    63 function hrecipe_validate() {
    64   return true;
    65 }
     65  /**
     66   * Place holder for options registration.
     67   */
     68   function hrecipe_validate() {
     69     return true;
     70   }
    6671
    6772    function hrecipe_plugin_menu() {
     
    129134        // of in the init function.  All the php in the hrecipe_format.php file
    130135        // should go away, and it should be renamed to hrecipe_format.js       
     136        // See if wp_enqueue_script will work here.
     137        //wp_enqueue_script('hrecipe-format');
    131138        include ('hrecipe_format.php');
    132139    }
  • hrecipe/trunk/hrecipe.php

    r359006 r361079  
    6464    register_activation_hook( __FILE__ , array (&$recipe, 'hrecipe_activate'));
    6565    register_deactivation_hook( __FILE__ , array (&$recipe, 'hrecipe_deactivate'));
    66     add_action('admin_footer', array ($recipe, 'hrecipe_plugin_footer'));
     66    // TODO: this call only loads a php file which inserts the javascript.
     67    // Find a way to leverage wp_enqueue_script for this.
     68    //add_action('admin_footer', array ($recipe, 'hrecipe_plugin_footer'));
    6769    add_filter('plugin_action_links', 'plugin_links', 10, 2);
    6870    $recipe->init();
     71
     72
     73    add_action('admin_footer', array ($recipe, 'hrecipe_plugin_footer'));
    6974
    7075    //add_action('wp_head', array ($recipe, 'hrecipe_plugin_head'));
     
    9095        if (!$this_plugin) {
    9196            $this_plugin =  plugin_basename(__FILE__);
    92         }
     97            }
    9398       
    9499        if ($file == $this_plugin) {
     
    100105    }
    101106
    102 
    103107}
    104108
  • hrecipe/trunk/hrecipe_format.php

    r361051 r361079  
    11
    2 <?php
    3   //global $hrecipe_plugin_url;
    4 
    5   //include('hrecipe_localize_vars.php');
    6 ?>
    72
    83<script type="text/javascript">//<![CDATA[
     
    3530    tb_remove();
    3631  }
    37 
    38 
    39   /*
    40   <p class="review hreview-aggregate">
    41   <span class="rating">
    42      <span class="average">4.0</span> stars based on
    43      <span class="count">35</span> reviews
    44   </span>
    45  </p>
    46   */
    4732
    4833 
     
    263248    //*/
    264249
    265     //var want_linklove = '<?php if (get_option('hrecipe_linklove') == 'on') echo 'true'; else echo ''; ?>'
    266250    var want_linklove = (hrecipe_handle.hrecipe_linklove == 'on') ? 'true' : '';
    267251    //alert (want_linklove);
     
    270254    }
    271255   
    272     //var want_reciply = '<?php if (get_option('hrecipe_reciply') == 'on') echo 'true'; else echo ''; ?>'
    273     var want_reciply = hrecipe_handle.hrecipe_reciply == 'on') ? 'true' : '';
     256    var want_reciply = (hrecipe_handle.hrecipe_reciply == 'on') ? 'true' : '';
    274257    //alert (want_reciply);
    275258    if (want_reciply) {
     
    282265    }
    283266   
    284     //var et =  '<?php if (get_option('hrecipe_enclosure') == 'div') echo "div"; else echo "fieldset";?>';
    285267    var et =  (hrecipe_handle.hrecipe_enclosure == 'div') ? 'div' : 'fieldset';
    286268    HRecipeOutput += '</' + et + '>';
Note: See TracChangeset for help on using the changeset viewer.