WordPress security issue to output data from user input from theme option form

Security issues arise when you write code that open up possibilities for outsiders to access your database or otherwise compromise your installation. The above code just reads options and content from the database and translates this into static html that will be send to the browser of the page’s visitor. There’s no code (like a … Read more

Cannot find the code for “Edit This” link in posts in a specific theme

This should be located in the entry-meta.php file of the parent theme (kuorinka). Here is the code: <?php if ( ‘post’ == get_post_type() ) : ?> <div class=”entry-meta”> <!– Date & Author name–> <?php kuorinka_posted_on(); ?> <!– Comments count –> <?php if ( ! post_password_required() && ( comments_open() || ‘0’ != get_comments_number() ) ) : … Read more

Theme Options: If There is No Input, Don’t Display?

Check if get_option returns a value and if it is not blank, then output the links. This should work for you: <?php if(get_option(‘to_facebook’) && get_option(‘to_facebook’) != ”) { ?> <a href=”https://wordpress.stackexchange.com/questions/34948/<?php echo get_option(“to_facebook’); ?>”></a> <?php } if(get_option(‘to_google_plus’) && get_option(‘to_google_plus’) != ”) { ?> <a href=”https://wordpress.stackexchange.com/questions/34948/<?php echo get_option(“to_google_plus’); ?>”></a> <?php } ?>

Can’t save options

@Mamaduka: Here is why your settings aren’t updating. Your validation function is wrong. To wit: function ev_options_validate( $input ) { $ev_options = get_option( ‘theme_evolutionary_options’ ); $valid_input = $ev_options; $ev_options[‘color_scheme’] = array_key_exists( $ev_options[‘color_scheme’], ev_get_valid_color_schemes() ) ? $ev_options[‘color_scheme’] : ‘blue’; $ev_options[‘copytright’] = wp_kses_data( $ev_options[‘copyright’] ); return $valid_input; } You’re updating $ev_options, but returning $valid_input. You need to … Read more

Using jQuery to retrieve customizer value

Use that JQuery code from your question in customizer preview for real time update. Your transport should be set to ‘postMessage’. In your website you can add body class in function.php: function theme_prefix_body_class( $classes ) { if ( get_theme_mod(‘header_fixed’, 0 ) == true ) { $classes[] = ‘fixed-header’; } return $classes; } add_filter( ‘body_class’, ‘theme_prefix_body_class’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)