Upload file on pre_update_option_{option_name}

I’m quite sure the problem is not with the WordPress hook you’re using. Instead, the following: Cannot find $_FILES, in $_POST, there’s the filename .. is most likely because your form tag (<form>) does not have the required enctype attribute which must be set to multipart/form-data to make file upload input works in that the … Read more

Updating just one option with update_option

Your method is correct, but the problem is that the value inside the option in your example, i.e.: get_option( ‘second_option’ ); is not serialized correctly ( it was either edited directly–and incorrectly–through the database or inserted with something other than update_option() ). If you var_dump( get_option( ‘second_option’ ) );, you’ll see that it’s not an … Read more

Add description to custom plugin setting

I’ve not seen this type of title settings layout in the admin pages, so it seems you’re parting away from it. Otherwise note that the title field of add_settings_field() is unescaped, so in theory one could add some HTML code for new title layout. Usually the description is added to the input field.

Displaying the full text instead of post title

Try to see inside your index.php file. If it have <?php the_content(); ?> inside the loop. Also watch inside your post in admin and don’t put any <!–more–> tags inside your content. This method show all the content on the main page.

How can I increase the font sizes used by the WordPress visual and HTML post editors?

Put this on the top of your functions.php file after the first <?php add_action( ‘admin_print_styles-post.php’, ‘my_admin_css’ ); add_action( ‘admin_print_styles-post-new.php’, ‘my_admin_css’ ); function my_admin_css() { ?> <style type=”text/css”> #editorcontainer textarea#content { font-size:130%!important } </style> <?php } The function will print out the additional CSS on the pages where you write posts only (so it’s not loading … Read more

Google fonts dropdown in Options Framework

Should be very easy since its has a hook right in place so something like, add_filter(‘of_recognized_font_faces’,’add_google_fonts_list’); function add_google_fonts_list($defaults){ //add as many as you want $mine = array( ‘Ubuntu’ => “‘Ubuntu’, sans-serif”, ‘Lobster’ => “‘Lobster’, cursive”, ); return array_merge($mine,$defaults); } and when you render the css make sure to add the right import ex: @import url(http://fonts.googleapis.com/css?family=Ubuntu);

Verify Values Using Settings API

That’s exactly what the sanitize callback is for in the call to register_setting(): <?php register_setting( $option_group, $option_name, $sanitize_callback ); ?> That third parameter, $sanitize_callback, is a filter callback to which the user settings are passed after submitting the settings form, and before saving to the database. The settings are passed as an array. The correct … Read more

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