Beforehand we’ve got featured greater than aspect.
add_filter( 'image_send_to_editor', perform( $html, $id, $caption, $title, $align, $url, $measurement, $alt ) if( current_theme_supports( 'html5' ) && ! $caption ) $html = sprintf( '<determine>%s</determine>', $html ); // Modify to your wants! return $html; , 10, eight );
Compatibility: WordPress 2.9.zero
39. Change Default Position Identify
“Administrator”, “Writer”, and “Subscriber” are the names given for WordPress customers on the administrative degree. To change these default names to one thing that sounds extra apt in your web site, add the next code, then make the change to the names to what you favor:
perform change_role_name() international $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); $wp_roles->roles['contributor']['name'] = 'Freelance'; $wp_roles->role_names['contributor'] = 'Freelance'; add_action('init', 'change_role_name');
Compatibility: WordPress three.1
forty. Default Attachment Settings
This is a snippet that allows you to specify the default measurement, alignment, and the hyperlink for pictures you need to embed within the editor.
add_action( 'after_setup_theme', 'default_attachment_display_settings' ); perform default_attachment_display_settings() update_option( 'image_default_align', 'left' ); update_option( 'image_default_link_type', 'none' ); update_option( 'image_default_size', 'giant' );
Compatibility: WordPress three.5
forty one. Validate Featured Picture
A few of us choose posts to be launched with a Featured Picture. This submit, Validate Featured Image On Post, by Paul Underwood will present you how you can make your customers add a featured picture earlier than their submit could be revealed.
Compatibility: WordPress three.zero
forty two. Customized Picture Measurement In Media Uploader
add_image_size is the WordPress perform that permits us to crop and show customized picture measurement. If you wish to permit customers so as to add picture inside this tradition measurement, add the next codes to show the “custom image size” option within the WordPress media uploader.
perform pw_add_image_sizes() add_image_size( 'pw-thumb', 300, one hundred, true ); add_image_size( 'pw-giant',
The post 50 Most-Needed WordPress Ideas, Tips and Hacks appeared first on DICKLEUNG DESIGN 2014.

沒有留言:
張貼留言