How to change the file upload directory on version 3.5?

In addition to what Joseph suggested, you can also define the upload path in the wp-config.php file like this: define( ‘UPLOADS’, ‘wp-content/’.’files’ ); If you’d like it outside the wp-content folder, specify path like this: define( ‘UPLOADS’, ”.’uploads’ ); For uploading to a folder like example.com/images, use this code: //Custom upload path define( ‘UPLOADS’, ”.’images’ … Read more

How can I add a fifth option to the alignment picker?

You mentioned using the class in your comment. You could try just adding max-width:100% to the css from the link you provided. Or use jQuery: $(document).ready(function(){ $(‘img.fulljust’).each(function(){ if($(this).width() > 300){ $(this).css({ ‘width’ : ‘100vw’; ‘position’: ‘relative’; ‘left’: ‘50%’; ‘right’: ‘50%’; ‘margin-left’: ‘-50vw’; ‘margin-right’: ‘-50vw’; }); } }); }); EDIT: I realized I didn’t answer your … Read more

Back End Interface Plugin

You will need an Admin Theme. Despite its name, this should be implemented as a plugin. Here is a basic plugin file: <?php # -*- coding: utf-8 -*- /** * Plugin Name: T5 Admin Theme */ add_action( ‘admin_init’, ‘t5_admin_theme_init’, 11 ); function t5_admin_theme_init() { $settings = new stdClass; $settings->name=”Clean”; $settings->url = plugins_url( ‘clean.css’, __FILE__ ); … Read more

Prevent Selected Terms Rising to the Top

This bugs me too. It is very confusing, so I thought I’d look into it. That meta box is created in “wp-admin/includes/meta-boxes.php” on line ~399. It uses wp_terms_checklist. The problem codes seems to be this (it is one in source): <?php wp_terms_checklist( $post->ID, array( ‘taxonomy’ => $taxonomy, ‘popular_cats’ => $popular_ids ) ) ?> That leaves … Read more

How to get the ToggleControl Gutenberg component working for a PHP Block

The issue is that in ToggleControl you are using the wrong prop for the value. It should be checked instead of value. Also use the blockEditor package instead of editor for InspectorControls as it will be deprecated. el( ToggleControl, { label: ‘Toogle’, checked: props.attributes.toggle, // here onChange: ( value ) => { props.setAttributes( { toggle: … Read more

Theme Options Panels, What are some good examples from Frameworks or Premium Themes? [closed]

Of the few I’ve seen, I think that most “premium” Themes way over-complicate Theme Settings pages. I generally prefer Theme Settings pages that maintain the style/layout of the rest of the WP-Admin UI. So, these would be my rules of thumb: Incorporate meaningful settings, and not necessarily every possible setting under the sun. Organize settings … Read more