Changeset 361079
- Timestamp:
- 03/17/2011 03:26:52 AM (15 years ago)
- Location:
- hrecipe/trunk
- Files:
-
- 3 edited
-
hrecipe.class.php (modified) (3 diffs)
-
hrecipe.php (modified) (3 diffs)
-
hrecipe_format.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hrecipe/trunk/hrecipe.class.php
r359402 r361079 48 48 //wp_enqueue_script('hrecipe-jquery-min'); 49 49 //wp_enqueue_script('hrecipe-reciply'); 50 wp_register_script('hrecipe-format',plugins_url('hrecipe/js/hrecipe_format.js',dirname(__FILE__))); 50 51 wp_register_script('hrecipescript',plugins_url('hrecipe/js/hrecipescript.js',dirname(__FILE__))); 51 52 wp_localize_script('hrecipescript','hrecipe_handle',hrecipe_localize_vars()); 52 53 53 // TODO: Move the enqueue to where it's needed. 54 // TODO: Move the enqueue to where it's needed. 54 55 wp_enqueue_script('hrecipescript'); 56 //wp_enqueue_script('hrecipe-format'); 55 57 56 58 … … 61 63 } 62 64 63 function hrecipe_validate() { 64 return true; 65 } 65 /** 66 * Place holder for options registration. 67 */ 68 function hrecipe_validate() { 69 return true; 70 } 66 71 67 72 function hrecipe_plugin_menu() { … … 129 134 // of in the init function. All the php in the hrecipe_format.php file 130 135 // 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'); 131 138 include ('hrecipe_format.php'); 132 139 } -
hrecipe/trunk/hrecipe.php
r359006 r361079 64 64 register_activation_hook( __FILE__ , array (&$recipe, 'hrecipe_activate')); 65 65 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')); 67 69 add_filter('plugin_action_links', 'plugin_links', 10, 2); 68 70 $recipe->init(); 71 72 73 add_action('admin_footer', array ($recipe, 'hrecipe_plugin_footer')); 69 74 70 75 //add_action('wp_head', array ($recipe, 'hrecipe_plugin_head')); … … 90 95 if (!$this_plugin) { 91 96 $this_plugin = plugin_basename(__FILE__); 92 }97 } 93 98 94 99 if ($file == $this_plugin) { … … 100 105 } 101 106 102 103 107 } 104 108 -
hrecipe/trunk/hrecipe_format.php
r361051 r361079 1 1 2 <?php3 //global $hrecipe_plugin_url;4 5 //include('hrecipe_localize_vars.php');6 ?>7 2 8 3 <script type="text/javascript">//<![CDATA[ … … 35 30 tb_remove(); 36 31 } 37 38 39 /*40 <p class="review hreview-aggregate">41 <span class="rating">42 <span class="average">4.0</span> stars based on43 <span class="count">35</span> reviews44 </span>45 </p>46 */47 32 48 33 … … 263 248 //*/ 264 249 265 //var want_linklove = '<?php if (get_option('hrecipe_linklove') == 'on') echo 'true'; else echo ''; ?>'266 250 var want_linklove = (hrecipe_handle.hrecipe_linklove == 'on') ? 'true' : ''; 267 251 //alert (want_linklove); … … 270 254 } 271 255 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' : ''; 274 257 //alert (want_reciply); 275 258 if (want_reciply) { … … 282 265 } 283 266 284 //var et = '<?php if (get_option('hrecipe_enclosure') == 'div') echo "div"; else echo "fieldset";?>';285 267 var et = (hrecipe_handle.hrecipe_enclosure == 'div') ? 'div' : 'fieldset'; 286 268 HRecipeOutput += '</' + et + '>';
Note: See TracChangeset
for help on using the changeset viewer.