Plugin Directory

Changeset 361948


Ignore:
Timestamp:
03/19/2011 03:30:47 AM (15 years ago)
Author:
mathzqy
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • latex/trunk/latex.php

    r361946 r361948  
    5757*/
    5858
    59 if (!(get_option("latex_imgcss")!=='')):
    60     update_option("latex_imgcss", "vertical-align: middle; border: none;");
    61     update_option("latex_img_server", "http://chart.apis.google.com/chart?cht=tx&chl=");
    62     update_option("mathjax_server", "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default");
    63     update_option("latex_cache_path", ABSPATH."wp-content/plugins/latex/cache/");
    64 endif;
    65    
    66 
     59function latex_for_wp_activate() {
     60    if (get_option("latex_imgcss") == FALSE )
     61        add_option("latex_imgcss", "vertical-align: middle; border: none;");
     62    if (get_option("latex_img_server") == FALSE )
     63        add_option("latex_img_server", "http://chart.apis.google.com/chart?cht=tx&chl=");
     64    if (get_option("mathjax_server") == FALSE )
     65        add_option("mathjax_server", "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default");
     66    if (get_option("latex_cache_path") == FALSE )   
     67        add_option("latex_cache_path", ABSPATH."wp-content/plugins/latex/cache/");
     68}
     69
     70register_activation_hook( __FILE__, 'latex_for_wp_activate' );
    6771   
    6872add_action('admin_menu', 'latex_admin_page');
Note: See TracChangeset for help on using the changeset viewer.