1. New Twenty
Seventeen Theme
A new theme added in New Release of wordpress
4.7 with video header feature . Theme is mainly focus on business sites
and features a customizable front page with multiple sections
.You can use them with the help of widgets
, Navigation , Social menu , Logo , Custom Colours and other many
things .
2. No Destructive Live Previews
In wordpress 4.7 new feature is you can review the live
preview of site without saving
the actual changes to add them on site .
In the customise section all the parts of site visible which you able to
customize while live previewing. Click on any icon and start editing and you
can customize your site in faster way.
3. Smooth Menu Building
Lastly in many site have menu and that links to pages of you site. But
what you can do
When there is no pages yet . Now in new
version you once create menu in the menu section when you publish menu section
you will automatically get new pages for
site to fill the content in them.
4. Custom CSS
Some
time when you need to make some little
changes with css on your site to make
that look better or solve little issue to make your site perfect . Wordpress
new version 4.7 help you to add custom CSS and you can check changes on frontend
after saving that in backend. Also Preview with work directly without refresh
pages.
5. PDF Thumbnail Previews
Lastly in wordpress when you are uploading
any PDF in media section it will show
you default thumbnail there for PDF doc. In NEW wordpress 4.7 you
will see auto generated PDF
thumbnail so you can easily
distinguish between different documents .
6. Dashboard In your Language
One language doest mean that every body will prefer same language for site . In New
wordpress 4.7 you will get
user language option to change
you language .It will show in wordpress user Profiles .
7. Rest API End Points
New Wordpress 4.7 comes with
REST API endpoints for posts ,
Comments , terms , users , meta and
settings .Content endpoints provide
machine-readable external access to your wordpress site .
8. Post
Type Templates
New
opening for wordpress developer
is post type
template like the one we are using for page
template . You can create it easily by same way like
<?php
/*
Template Name: New Post layout
Template Post Type: post, page, product
*/
// … your code here
When At least one template exists
in theme for post type “Post attributes”
meta box will display in backend . Post attribute
label can be customized per post type using “attributes” label when registering post type .
9
Custom Bulk Actions
In wordpress 4.7 developer can Register custom bulk action in the list
table screen in the backend screen.
To add bulk action email to all
you can use the same function
way below :
add_filter( 'bulk_actions-edit-post', 'register_new_bulk_actions' );
function register_new_bulk_actions($bulk_actions) {
$bulk_actions['email_to_all'] = __(
'Email to All', 'email_to_all');
return $bulk_actions;
}
Now how to handle the form submission
TO handle bulk action register a call
back
handle_bulk_actions-edit-post
add_filter( 'handle_bulk_actions-edit-post', 'new_bulk_action_handler',
10, 3 );
function new_bulk_action_handler( $redirect_to, $doaction,
$post_ids ) {
if ( $doaction !== 'email_to_all' ) {
return $redirect_to;
}
foreach ( $post_ids as $post_id ) {
// action for each post.
}
$redirect_to =
add_query_arg( 'bulk_emailed_posts', count( $post_ids ),
$redirect_to ); return $redirect_to; }
Show Notices
add_action( 'admin_notices', 'new_bulk_action_admin_notice' );
function new_bulk_action_admin_notice() {
if ( ! empty( $_REQUEST['bulk_emailed_posts'] ) ) {
$emailed_count = intval(
$_REQUEST['bulk_emailed_posts'] );
printf( '<div
id="message" class="updated fade">' .
_n( 'Emailed %s
post to All.',
'Emailed
%s posts to All.',
$emailed_count,
'email_to_all'
) .
'</div>', $emailed_count );
}
}
10. WP_Hook
New wordpress release 4.7 introduced reworking of action and filters iteration
to address bugs that arose from recursive call back and from the call back that
changed the hooked call backs on
currently running actions and filters. All the
things are look like same for all the developer
as expected this shuld fix number
of hard traces bugs when different plug-in
make call back .
11. Registration Api Settings
Register_setting() used to include type description and rest API
Visibility Its improved enabled more
information for developer about meta .
Register_setting now accept an array for argument
which allow wordpress core to
know more about settings . This is usefull for REST API, where wordpress needs
to know more about type of data settings
.
12. Customize
Change sets
Changes in customizer like auto save drafts also make existing
new feature like starter
content possible.
No comments:
Post a Comment