Google Introduce A Tool For Data Control After Death

Google is becoming first company which have worked on privacy and data control and introduced a tool which will control your private data after death. New tools aim to help users maintain privacy in the case if something happen like death, which  will remove data after set period of inactivity.

Questions were asked on different forums and by community about privacy and data control of users on internet, Google is first company which have worked on this issue and introducing a tool which can help in these cases. Google named “Inactive Account Manager” to recently released tool which will take care of your emails, browsing history and other secure data. Almost every user on internet have stored lot of files, documents, pictures and other personal data at Gmail, Google Drives, Google calender and other services. its becomes a huge amount of data when you are surfing and using internet from last many years, after death who will be responsible for take care of this all personal stuff..??

I think this is “Google Inactive Account Manager” which will lead to online death of user. Google providing users ability to remove their personal stuff after inactivity of 3 months, 6 months, 9 months or 12 months. user have ability to decide whether its data will be removed automatically or can be transfer to another online account.

After Google i hope other companies will also move forward to take care of this issue.

Create a Custom Page Template in WordPress

Creating custom page templates in WordPress is easy!

Its just following line of code which you need to put at the start of page template file.

let’s start creating a page template called ‘project.php’ and put following line of code at start of this file and using FTP client upload this file to your theme folder.

<?php
/*
Template Name: Projects template
*/
?>

Now at your new page screen in page attribute widget you will templates, our recently uploaded template should appear here. if you will select this page template for your page and after hitting publish and viewing newly added page will show you a blank page. now you can start editing this page template file (project.php) and can add contents and code here what you want show for this specific page or pages. you can use this Custom template page to assign to different pages through page edit screen. there are lot things which you can do using this custom page template like adding a form, design different than other pages and huge amount of PHP code. this all is easy using Custom page templates.

WordPress also have lot of other alternatives to do this, but this one is much easy to adapt for even non-tech person. actually how it works? WordPress looks for several Page template files in your active WordPress Theme based upon the Template Hierarchy. and in that hierarchy Page’s selected “Custom Page Template” stand first, so that will be used.

Pass PHP variables between template files

If you need to pass a variable between template files, there will be many ways to do that. one more common way, not preferable way according to me is using Global variables.

For example you have instance of class, save it in Global variable and now you will be able to use it throughout the application.

GLOBALS['myobject'] = new class();

$wpdb, $wp_query are common global variables which WordPress use and these variable are accessible throughout the application. but what is the drawback of this method, these variable will be load at each page. as the number of variables increase, its become performance issue.

Another way you can use is using locate_template(). you can include that specific template file and then can use any variable which is existing in that file.

include(locate_template('custom-template-part.php'));

locate_template() will search in the STYLESHEETPATH before TEMPLATEPATH so that themes which inherit from a parent theme can just overload one file.

I mostly use templates to save in a folder and then using get_template_part() to get these small parts on WordPress generic template pages.

get_template_part( 'my-template-part' );

<?php get_template_part( 'templates/index', 'title' ); ?>

 

this function also makes it easy for a theme to reuse sections of code and an easy way for child themes to replace sections of their parent theme. you are all tempaltes are in one folder or may be subdivided to child folders. this will redurce a burden on generic templates by placing code into smaller pieces and also reuse.