Plugin Directory

Changeset 1312280


Ignore:
Timestamp:
12/19/2015 11:08:33 AM (10 years ago)
Author:
allnull
Message:

custom head;

Location:
wp-code-prettify/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-code-prettify/trunk/wp-code-prettify-page.php

    r994197 r1312280  
    144144        <td colspan="2"><textarea cols="75" rows="5" name="style_custom"><?php echo stripslashes($wp_code_prettify['style_custom']); ?></textarea></td>
    145145        </tr>
     146        <tr>
     147        <th scope="row"><?php _e('You can add custom HTML into head section.', 'wp-code-prettify'); ?></th>
     148        <td colspan="2"><textarea cols="75" rows="5" name="head_custom"><?php echo stripslashes($wp_code_prettify['head_custom']); ?></textarea></td>
     149        </tr>
    146150    </table>
    147151
  • wp-code-prettify/trunk/wp-code-prettify.php

    r994197 r1312280  
    7979
    8080    $wp_code_prettify = maybe_unserialize(get_option('wp_code_prettify'));
    81 
     81    ?>
     82
     83    <?php
    8284    if($wp_code_prettify['load_pos'] == 'head') {
    8385
    84         $plugin_path = site_url('/wp-content/plugins/' . dirname( plugin_basename( __FILE__ ) ));
     86        $plugin_path = plugins_url('', __FILE__);
    8587        ?>
    8688
     
    111113        <?php
    112114    }
     115
     116    echo '<!--wp code prettify-->';
     117    if($this->is_str_and_not_empty($wp_code_prettify['head_custom'])) {
     118        echo stripslashes($wp_code_prettify['head_custom']);
     119    }
    113120}
    114121
     
    125132    }
    126133
    127     $plugin_path = site_url('/wp-content/plugins/' . dirname( plugin_basename( __FILE__ ) ));
     134    $plugin_path = plugins_url('', __FILE__);
    128135    ?>
    129136
Note: See TracChangeset for help on using the changeset viewer.