Skip to content
WJunction - Webmaster Forum

HTML and Script optput not show in wordpress theme

Status
Not open for further replies.

nasavsisro

Established Member
152
2011
70
hi i'm using custom theme option framework on my theme i have been integrated every thing but in textarea when paste and try to save option it automatic remove HTML codes and <script> only text and <> are remain. i don't know how to resolve this problem.

also there is default google tracking code option it was working when i explore source of function i found this:

Code:
/* ----------------------------------------------------------------------------------- */
    /* Show analytics code in footer */
    /* ----------------------------------------------------------------------------------- */

    function wrockmetro_analytics() {
        $shortname = wrockmetro_get_option('of_shortname');
        $output = wrockmetro_get_option($shortname . 'wrock_analytics');
        if ($output <> "")
            echo "<script type='text/javascript'>" . stripslashes($output) . "</script>\n";
    }

    add_action('wp_footer', 'wrockmetro_analytics');


**Textarea code from OptionInterface.php**

Code:
// Textarea
            case 'textarea':
                $cols = '8';
                $ta_value = '';
                if (isset($value['options'])) {
                    $ta_options = $value['options'];
                    if (isset($ta_options['cols'])) {
                        $cols = $ta_options['cols'];
                    } else {
                        $cols = '8';
                    }
                }
                $val = stripslashes($val);
                $output .= '<textarea id="' . esc_attr($value['id']) . '" class="of-input" name="' . esc_attr($option_name . '[' . $value['id'] . ']') . '" cols="' . esc_attr($cols) . '" rows="8">' . esc_textarea($val) . '</textarea>';
                break;
 
Status
Not open for further replies.

About the author

N
Established Member · Joined
152
Messages
70
Reactions
28
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom