Plugin Directory

Changeset 1207981


Ignore:
Timestamp:
07/28/2015 04:30:12 AM (11 years ago)
Author:
phd38
Message:
  • Fix of wrong JS code formatting with WP 4.2.3
Location:
wp-mediatagger/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-mediatagger/trunk/mediatagger.php

    r1180069 r1207981  
    16151615        }
    16161616
    1617         $strout .= '<script language="JavaScript" type="text/javascript">
     1617        $strjs .= '<script language="JavaScript" type="text/javascript">
    16181618';
    1619         $strout .= '<!--
     1619        $strjs .= '<!--
    16201620';
    1621         $strout .= 'function ' . $search_form_submit . '(post_var_name, post_var_value) {
     1621        $strjs .= 'function ' . $search_form_submit . '(post_var_name, post_var_value) {
    16221622';
    1623         $strout .= 'document.' . $search_form_name . '.elements[post_var_name].value = post_var_value ;
     1623        $strjs .= 'document.' . $search_form_name . '.elements[post_var_name].value = post_var_value ;
    16241624';
    1625         $strout .= 'document.' . $search_form_name . '.submit();
     1625        $strjs .= 'document.' . $search_form_name . '.submit();
    16261626';
    1627         $strout .= '}
     1627        $strjs .= '}
    16281628';
    1629         $strout .= 'function tagsearchblur(element) {
     1629        $strjs .= 'function tagsearchblur(element) {
    16301630';
    1631         $strout .= 'if(element.value == \'\') {element.value = \'' . $search_field_default . '\';}
     1631        $strjs .= 'if(element.value == \'\') {element.value = \'' . $search_field_default . '\';}
    16321632';
    1633         $strout .= '}
     1633        $strjs .= '}
    16341634';
    1635         $strout .= 'function tagsearchfocus(element) {
     1635        $strjs .= 'function tagsearchfocus(element) {
    16361636';
    1637         $strout .= 'if(element.value == \'' . $search_field_default . '\') {element.value = \'' . '' . '\';}
     1637        $strjs .= 'if(element.value == \'' . $search_field_default . '\') {element.value = \'' . '' . '\';}
    16381638';
    1639         $strout .= '}
     1639        $strjs .= '}
    16401640';
    1641         $strout .= '-->
     1641        $strjs .= '-->
    16421642';
    1643         $strout .= '</script>
     1643        $strjs .= '</script>
    16441644';
     1645
     1646// direct output (not buffered in strout) to avoid formatting issues with autop that broke the javascript formatting starting WP 4.2.3
     1647echo $strjs;
    16451648
    16461649        $strout .= '<form name="' . $search_form_name . '" method="post" action="' . $result_page_url . '" style="padding:0;margin:0">';
  • wp-mediatagger/trunk/readme.txt

    r1180069 r1207981  
    2424
    2525- Fix of tooltips in the options dashboard
     26- Fix of wrong JS code formatting with WP 4.2.3
    2627
    2728= 4.0.7 =
Note: See TracChangeset for help on using the changeset viewer.