WordPress filter hook pre_comment_approved

I was really busy this whole month which makes me neglected Hungred Dot Com a lot. But i will still try to keep up with it as soon as possible. This article will definitely help ANYONE who uses wordpress filter hook 'pre_comment_approved'. I search Google for a while but couldn't get any help so i decided to investigate instead. The documentation of this hook is a bit screwed up. I'm sure they will edit it in the future. Nonetheless, for people who are having problem using this (you should be). Here is a solution i can provide.

Problem with pre_comment_approved

The problem i am having with pre_comment_approved is that i am UNABLE to retrieve the comment id that should be attached with this filter hook. Instead, the parameter for this action hook is just a simple status to tell you what status is being applied to a particular comment. The purpose of having this filter hook is to enable anyone to change the status into something else instead of approve eg, 'spam'. But some of us will want to do something else with it and we would like to know which comment has been approved. On the documentation, it said that there is a global variable $comment_ID which you can use in the function that you used to hook pre_comment_approved. Unfortunately, it doesn't exist. Try using the global variable $comment. You will get null (i have no idea why too). So how do you identify comment are we dealing with?

Solution to find comment ID in pre_comment_approved

After cracking my brain and stress for a while. I stare at the core code of WordPress and found some global variable to test (that is why i know $comment_ID and $comment was empty/null). There is a global variable $comment_id instead of $comment_ID in the core implementation of WordPress. But both of them gives you nothing. Hence, if you like to find the whole detail, your/my best bet will be the global variable $commentdata. Here is a simple way of getting your pre_comment_approved filter work.

add_filter('pre_comment_approved', array($this, 'alertUser'),);
public function alertUser($status){
	global $wpdb, $commentdata;
	echo $commentdata['comment_author'];
	echo $commentdata['comment_author_email'];
	echo $commentdata['comment_content'];
	echo $commentdata['comment_post_ID'];
	// etc..
}

With this, you should save some time figuring how and why the heck it is not working ($comment_ID, this is misleading).

List Of All Jobs in a select box

Today i was working on a registration and i needed a list of all job available for my user to choose. What will most of us do when this happen? Search Google! After that i left with despite because i fail to find such resource. The next terrifying thing most developer look at is the list of job available on Wikipedia (it just keep on going, damnit). Imagining compiling the whole few hundred list of job just to get them into a select box. Well, you don't have to imagine because i already did it. Hence, you get the joy while i do the work. lol~

<select class="select" id="selectbox" name="selectbox">
		<option value="Athlete">Athlete</option>
		<option value="Accountant">Accountant</option>
		<option value="Actor">Actor</option>
		<option value="Actress">Actress</option>
		<option value="Administrator">Administrator</option>
		<option value="Aerospace Engineer">Aerospace Engineer</option>
		<option value="Air Traffic Controller">Air Traffic Controller</option>
		<option value="Ambassador">Ambassador</option>
		<option value="Anesthetist">Anesthetist</option>
		<option value="Anchorman">Anchorman</option>
		<option value="Animator">Animator</option>
		<option value="Animal trainer">Animal trainer</option>
		<option value="Archaeologist">Archaeologist</option>
		<option value="Architect">Architect</option>
		<option value="Artist">Artist</option>
		<option value="Astronaut">Astronaut</option>
		<option value="Astronomer">Astronomer</option>
		<option value="Athletic trainer">Athletic trainer</option>
		<option value="Attorney">Attorney</option>
		<option value="Author">Author</option>
		<option value="Army">Army</option>
		<option value="Brain Surgeon">Brain Surgeon</option>
		<option value="Baker">Baker</option>
		<option value="Bank teller">Bank teller</option>
		<option value="Banker">Banker</option>
		<option value="Barber">Barber</option>
		<option value="Barista">Barista</option>
		<option value="Barrister">Barrister</option>
		<option value="Bartender">Bartender</option>
		<option value="Babysitter">Babysitter</option>
		<option value="Beauty queen">Beauty queen</option>
		<option value="Beauty therapist">Beauty therapist</option>
		<option value="Beekeeper">Beekeeper</option>
		<option value="Blacksmith">Blacksmith</option>
		<option value="Boilermaker">Boilermaker</option>
		<option value="Bookkeeper">Bookkeeper</option>
		<option value="Bookseller">Bookseller</option>
		<option value="Brewer">Brewer</option>
		<option value="Butcher">Butcher</option>
		<option value="Butler">Butler</option>
		<option value="Builder">Builder</option>
		<option value="Cab driver">Cab driver</option>
		<option value="Calligrapher">Calligrapher</option>
		<option value="Cameraman">Cameraman</option>
		<option value="Car designer">Car designer</option>
		<option value="Cardiologist">Cardiologist</option>
		<option value="Carpenter">Carpenter</option>
		<option value="Cartoonist">Cartoonist</option>
		<option value="Cartographer">Cartographer</option>
		<option value="Cashier">Cashier</option>
		<option value="Cellist">Cellist</option>
		<option value="Chess player">Chess player</option>
		<option value="CIO (Chief Information Officer)">CIO (Chief Information Officer)</option>
		<option value="CEO (Chief Executive Officer)">CEO (Chief Executive Officer)</option>
		<option value="CTO (Chief Technology Officer)">CTO (Chief Technology Officer)</option>
		<option value="CFO (Chief Financial Officer)">CFO (Chief Financial Officer)</option>
		<option value="Chauffeur">Chauffeur</option>
		<option value="Cheesemaker">Cheesemaker</option>
		<option value="Cook)">Cook)</option>
		<option value="Chemist">Chemist</option>
		<option value="Chief of police">Chief of police</option>
		<option value="Chimney sweep">Chimney sweep</option>
		<option value="Civil servant">Civil servant</option>
		<option value="Civil engineer">Civil engineer</option>
		<option value="Clarinetist">Clarinetist</option>
		<option value="Cleaner">Cleaner</option>
		<option value="Clerk">Clerk</option>
		<option value="Clockmaker">Clockmaker</option>
		<option value="Coach">Coach</option>
		<option value="Coachman">Coachman</option>
		<option value="Coast guard">Coast guard</option>
		<option value="Cobbler">Cobbler</option>
		<option value="Columnist">Columnist</option>
		<option value="Comedian">Comedian</option>
		<option value="Company Secretary">Company Secretary</option>
		<option value="Compasssmith">Compasssmith</option>
		<option value="Composer">Composer</option>
		<option value="Computer programmer">Computer programmer</option>
		<option value="Conductor (music)">Conductor (music)</option>
		<option value="Construction engineer">Construction engineer</option>
		<option value="Construction worker">Construction worker</option>
		<option value="Consul">Consul</option>
		<option value="Consultant">Consultant</option>
		<option value="Contractor, general">Contractor, general</option>
		<option value="Coroner">Coroner</option>
		<option value="Corrector">Corrector</option>
		<option value="Cosmonaut">Cosmonaut</option>
		<option value="Costume Designer">Costume Designer</option>
		<option value="Courier">Courier</option>
		<option value="Cryptographer">Cryptographer</option>
		<option value="Currier">Currier</option>
		<option value="Customs officer">Customs officer</option>
		<option value="Dancer">Dancer</option>
		<option value="Dentist">Dentist</option>
		<option value="Deputy (law enforcement)">Deputy (law enforcement)</option>
		<option value="Dermatologist">Dermatologist</option>
		<option value="Designer/Developer">Designer/Developer</option>
		<option value="Detective">Detective</option>
		<option value="Dictator">Dictator</option>
		<option value="Disc jockey">Disc jockey</option>
		<option value="Diver">Diver</option>
		<option value="Doctor">Doctor</option>
		<option value="Dog walker">Dog walker</option>
		<option value="Doorman">Doorman</option>
		<option value="Dressmaker">Dressmaker</option>
		<option value="Ecologist">Ecologist</option>
		<option value="Economist">Economist</option>
		<option value="Editor">Editor</option>
		<option value="Electrical engineer">Electrical engineer</option>
		<option value="Electrician">Electrician</option>
		<option value="Elevator mechanic">Elevator mechanic</option>
		<option value="Engineer">Engineer</option>
		<option value="Engraver">Engraver</option>
		<option value="Entrepreneur">Entrepreneur</option>
		<option value="Environmental scientist">Environmental scientist</option>
		<option value="Executive manager">Executive manager</option>
		<option value="Exterminator">Exterminator</option>
		<option value="Falconer">Falconer</option>
		<option value="Farmer">Farmer</option>
		<option value="Farrier">Farrier</option>
		<option value="Fashion designer">Fashion designer</option>
		<option value="FBI Agent">FBI Agent</option>
		<option value="Film director">Film director</option>
		<option value="Film producer">Film producer</option>
		<option value="Financial adviser">Financial adviser</option>
		<option value="Fire marshal">Fire marshal</option>
		<option value="Fire Safety Officer">Fire Safety Officer</option>
		<option value="Firefighter">Firefighter</option>
		<option value="First Mate">First Mate</option>
		<option value="Fishmonger">Fishmonger</option>
		<option value="Fisherman">Fisherman</option>
		<option value="Fitter">Fitter</option>
		<option value="Flavorist">Flavorist</option>
		<option value="Fletcher">Fletcher</option>
		<option value="Flight attendant">Flight attendant</option>
		<option value="Flight instructor">Flight instructor</option>
		<option value="Florist">Florist</option>
		<option value="Flutist">Flutist</option>
		<option value="Food critic">Food critic</option>
		<option value="Footballer">Footballer</option>
		<option value="Forester">Forester</option>
		<option value="Fortune teller">Fortune teller</option>
		<option value="Funeral Director">Funeral Director</option>
		<option value="Gamekeeper">Gamekeeper</option>
		<option value="Game designer">Game designer</option>
		<option value="Gardener">Gardener</option>
		<option value="Gemcutter">Gemcutter</option>
		<option value="Genealogist">Genealogist</option>
		<option value="General">General</option>
		<option value="Geologist">Geologist</option>
		<option value="Goldsmith">Goldsmith</option>
		<option value="Government agent">Government agent</option>
		<option value="Governor">Governor</option>
		<option value="Graphic Designer">Graphic Designer</option>
		<option value="Gravedigger">Gravedigger</option>
		<option value="Greengrocer">Greengrocer</option>
		<option value="Grocer">Grocer</option>
		<option value="Guide">Guide</option>
		<option value="Guitarist">Guitarist</option>
		<option value="Gunsmith">Gunsmith</option>
		<option value="Harpist">Harpist</option>
		<option value="Handyman">Handyman</option>
		<option value="Hairdresser">Hairdresser</option>
		<option value="Harbourmaster">Harbourmaster</option>
		<option value="Harper">Harper</option>
		<option value="Hatter">Hatter</option>
		<option value="Historian">Historian</option>
		<option value="Homeopath">Homeopath</option>
		<option value="Hotel manager">Hotel manager</option>
		<option value="Housekeeper">Housekeeper</option>
		<option value="Hairstylist">Hairstylist</option>
		<option value="Human Resource Manager">Human Resource Manager</option>
		<option value="Human Resource Assistant">Human Resource Assistant</option>
		<option value="Illuminator">Illuminator</option>
		<option value="Illusionist">Illusionist</option>
		<option value="Illustrator">Illustrator</option>
		<option value="Importer">Importer</option>
		<option value="Industrial engineer">Industrial engineer</option>
		<option value="Industrialist">Industrialist</option>
		<option value="Information Technologist">Information Technologist</option>
		<option value="Information Designer">Information Designer</option>
		<option value="Inker">Inker</option>
		<option value="Innkeeper">Innkeeper</option>
		<option value="Instructor">Instructor</option>
		<option value="Interior designer">Interior designer</option>
		<option value="Interpreter">Interpreter</option>
		<option value="Interrogator">Interrogator</option>
		<option value="Inventor">Inventor</option>
		<option value="disambiguation needed">disambiguation needed</option>
		<option value="Investment banker">Investment banker</option>
		<option value="Investment broker">Investment broker</option>
		<option value="Ironmonger">Ironmonger</option>
		<option value="Ironmaster">Ironmaster</option>
		<option value="Ironworker">Ironworker</option>
		<option value="Jailer">Jailer</option>
		<option value="Janitor">Janitor</option>
		<option value="Jeweller">Jeweller</option>
		<option value="Journalist">Journalist</option>
		<option value="Jurist">Jurist</option>
		<option value="Judge">Judge</option>
		<option value="Jockey">Jockey</option>
		<option value="Joggler">Joggler</option>
		<option value="Karate master">Karate master</option>
		<option value="Kinesiologist">Kinesiologist</option>
		<option value="Laborer">Laborer</option>
		<option value="Landlady)">Landlady)</option>
		<option value="Lavendar)">Lavendar)</option>
		<option value="Law enforcement agent">Law enforcement agent</option>
		<option value="Lawyer">Lawyer</option>
		<option value="Leadworker">Leadworker</option>
		<option value="Leatherer">Leatherer</option>
		<option value="Leather worker">Leather worker</option>
		<option value="Lecturer">Lecturer</option>
		<option value="Level designer (also Mapper)">Level designer (also Mapper)</option>
		<option value="Librarianship">Librarianship</option>
		<option value="Librettist">Librettist</option>
		<option value="Lifeguard">Lifeguard</option>
		<option value="Lighthouse keeper">Lighthouse keeper</option>
		<option value="Lighting technician">Lighting technician</option>
		<option value="Lineman">Lineman</option>
		<option value="Linguist">Linguist</option>
		<option value="Loan officer">Loan officer</option>
		<option value="Lobbyist">Lobbyist</option>
		<option value="Locksmith">Locksmith</option>
		<option value="Lumberjack">Lumberjack</option>
		<option value="Lyricist">Lyricist</option>
		<option value="Magistrate">Magistrate</option>
		<option value="Magnate">Magnate</option>
		<option value="Maid">Maid</option>
		<option value="Mailman or Mail carrier">Mailman or Mail carrier</option>
		<option value="Make-up artist">Make-up artist</option>
		<option value="Management consultant">Management consultant</option>
		<option value="Manager">Manager</option>
		<option value="Manicurist">Manicurist</option>
		<option value="Manufacturer">Manufacturer</option>
		<option value="Marine">Marine</option>
		<option value="Marine biologist">Marine biologist</option>
		<option value="Market gardener">Market gardener</option>
		<option value="Martial artist">Martial artist</option>
		<option value="Mason">Mason</option>
		<option value="Master of business administration">Master of business administration</option>
		<option value="MC)">MC)</option>
		<option value="masseur)">masseur)</option>
		<option value="Matador">Matador</option>
		<option value="Mathematician">Mathematician</option>
		<option value="Mechanic">Mechanic</option>
		<option value="Mechanical Engineer">Mechanical Engineer</option>
		<option value="Mechanician">Mechanician</option>
		<option value="Mediator">Mediator</option>
		<option value="Medic">Medic</option>
		<option value="Medical biller">Medical biller</option>
		<option value="Medical Transcriptionist">Medical Transcriptionist</option>
		<option value="Mesmerist">Mesmerist</option>
		<option value="Messenger">Messenger</option>
		<option value="Mid-wife">Mid-wife</option>
		<option value="Milkmaid)">Milkmaid)</option>
		<option value="Miller">Miller</option>
		<option value="Miner">Miner</option>
		<option value="Missionary">Missionary</option>
		<option value="Model">Model</option>
		<option value="Modeller">Modeller</option>
		<option value="Moneychanger">Moneychanger</option>
		<option value="Moneylender">Moneylender</option>
		<option value="Monk">Monk</option>
		<option value="Mortgage broker">Mortgage broker</option>
		<option value="Mountaineer">Mountaineer</option>
		<option value="Muralist">Muralist</option>
		<option value="Musician">Musician</option>
		<option value="Navigator">Navigator</option>
		<option value="N??gociant">N??gociant</option>
		<option value="Negotiator">Negotiator</option>
		<option value="Netmaker">Netmaker</option>
		<option value="Neurologist">Neurologist</option>
		<option value="Newscaster">Newscaster</option>
		<option value="Night auditor">Night auditor</option>
		<option value="Nightwatchmen">Nightwatchmen</option>
		<option value="Notary">Notary</option>
		<option value="Novelist">Novelist</option>
		<option value="Numerologist">Numerologist</option>
		<option value="Numismatist">Numismatist</option>
		<option value="Nun">Nun</option>
		<option value="Nursemaid">Nursemaid</option>
		<option value="Nurse">Nurse</option>
		<option value="Nutritionist">Nutritionist</option>
		<option value="Oboist">Oboist</option>
		<option value="Obstetrician">Obstetrician</option>
		<option value="Occupational therapist">Occupational therapist</option>
		<option value="Odontologist">Odontologist</option>
		<option value="Oncologist">Oncologist</option>
		<option value="Ontologist">Ontologist</option>
		<option value="Operator">Operator</option>
		<option value="Ophthalmologist">Ophthalmologist</option>
		<option value="Optometrist)">Optometrist)</option>
		<option value="Oracle">Oracle</option>
		<option value="Ordinary Seaman">Ordinary Seaman</option>
		<option value="disambiguation needed">disambiguation needed</option>
		<option value="Orthodontist">Orthodontist</option>
		<option value="Ornithologist">Ornithologist</option>
		<option value="Ostler">Ostler</option>
		<option value="Otorhinolaryngologist">Otorhinolaryngologist</option>
		<option value="Optometrist">Optometrist</option>
		<option value="Ocularist">Ocularist</option>
		<option value="Opthamologist">Opthamologist</option>
		<option value="Painter">Painter</option>
		<option value="Paleontologist">Paleontologist</option>
		<option value="Paralegal">Paralegal</option>
		<option value="Paramedic">Paramedic</option>
		<option value="Park ranger">Park ranger</option>
		<option value="Parole Officer">Parole Officer</option>
		<option value="Pastor">Pastor</option>
		<option value="Patent attorney">Patent attorney</option>
		<option value="Patent examiner">Patent examiner</option>
		<option value="Pathologist">Pathologist</option>
		<option value="Pawnbroker">Pawnbroker</option>
		<option value="Peddler">Peddler</option>
		<option value="Pediatrician">Pediatrician</option>
		<option value="Pedologist (soil)">Pedologist (soil)</option>
		<option value="Percussionist">Percussionist</option>
		<option value="Perfumer">Perfumer</option>
		<option value="Personal Trainer">Personal Trainer</option>
		<option value="Pharmacist">Pharmacist</option>
		<option value="Philanthropist">Philanthropist</option>
		<option value="Philologist">Philologist</option>
		<option value="Philosopher">Philosopher</option>
		<option value="Photographer">Photographer</option>
		<option value="Photo Specialist">Photo Specialist</option>
		<option value="Physical Therapist">Physical Therapist</option>
		<option value="Physician">Physician</option>
		<option value="Physician Assistant">Physician Assistant</option>
		<option value="Physicist">Physicist</option>
		<option value="Physiognomist">Physiognomist</option>
		<option value="Physiotherapist">Physiotherapist</option>
		<option value="Pianist">Pianist</option>
		<option value="Piano tuner">Piano tuner</option>
		<option value="Pilot (shipping)">Pilot (shipping)</option>
		<option value="Pilot (aviation)">Pilot (aviation)</option>
		<option value="Pirate">Pirate</option>
		<option value="Plumber">Plumber</option>
		<option value="Podiatrist">Podiatrist</option>
		<option value="Poet">Poet</option>
		<option value="Police inspector">Police inspector</option>
		<option value="Politician">Politician</option>
		<option value="disambiguation needed">disambiguation needed</option>
		<option value="Presenter">Presenter</option>
		<option value="President">President</option>
		<option value="Press officer">Press officer</option>
		<option value="Priest">Priest</option>
		<option value="Princess">Princess</option>
		<option value="Principal">Principal</option>
		<option value="Printer">Printer</option>
		<option value="Private detective">Private detective</option>
		<option value="Probation Officer">Probation Officer</option>
		<option value="Proctologist">Proctologist</option>
		<option value="Product designer">Product designer</option>
		<option value="Professor">Professor</option>
		<option value="Professional dominant">Professional dominant</option>
		<option value="Programmer">Programmer</option>
		<option value="Project Manager">Project Manager</option>
		<option value="Proofreader">Proofreader</option>
		<option value="Psychiatrist">Psychiatrist</option>
		<option value="Psychodramatist">Psychodramatist</option>
		<option value="Psychologist">Psychologist</option>
		<option value="Public Relations Officer">Public Relations Officer</option>
		<option value="Public speaker">Public speaker</option>
		<option value="Publisher">Publisher</option>
		<option value="Porn star">Porn star</option>
		<option value="Queen consort">Queen consort</option>
		<option value="Queen regnant">Queen regnant</option>
		<option value="Quilter">Quilter</option>
		<option value="Radiologist">Radiologist</option>
		<option value="Radiographer">Radiographer</option>
		<option value="Real estate broker">Real estate broker</option>
		<option value="Real estate investor">Real estate investor</option>
		<option value="Real estate developer">Real estate developer</option>
		<option value="Receptionist">Receptionist</option>
		<option value="Record Producer">Record Producer</option>
		<option value="Referee">Referee</option>
		<option value="Refuse collector">Refuse collector</option>
		<option value="Registrar">Registrar</option>
		<option value="Reporter">Reporter</option>
		<option value="Researcher">Researcher</option>
		<option value="Respiratory Therapist">Respiratory Therapist</option>
		<option value="Restaurateur">Restaurateur</option>
		<option value="Retailer">Retailer</option>
		<option value="Rubbish Collector">Rubbish Collector</option>
		<option value="Sailmaker">Sailmaker</option>
		<option value="Sailor">Sailor</option>
		<option value="Salesmen">Salesmen</option>
		<option value="Sanitation worker">Sanitation worker</option>
		<option value="Saucier">Saucier</option>
		<option value="Saxophonist">Saxophonist</option>
		<option value="disambiguation needed">disambiguation needed</option>
		<option value="Scientist">Scientist</option>
		<option value="School superintendent">School superintendent</option>
		<option value="Scout">Scout</option>
		<option value="Screenwriter">Screenwriter</option>
		<option value="Scrivener)">Scrivener)</option>
		<option value="Seamstress">Seamstress</option>
		<option value="Second Mate">Second Mate</option>
		<option value="Secret service agent">Secret service agent</option>
		<option value="Secretary general">Secretary general</option>
		<option value="Security guard">Security guard</option>
		<option value="Senator">Senator</option>
		<option value="SEO (search engine optimizer)">SEO (search engine optimizer)</option>
		<option value="Sexton">Sexton</option>
		<option value="Sheepshearer">Sheepshearer</option>
		<option value="Sheriff">Sheriff</option>
		<option value="Sheriff officer">Sheriff officer</option>
		<option value="Shoemaker">Shoemaker</option>
		<option value="Shop assistant">Shop assistant</option>
		<option value="Singer">Singer</option>
		<option value="Skydiver">Skydiver</option>
		<option value="Sleeper">Sleeper</option>
		<option value="Sleuth">Sleuth</option>
		<option value="Social worker">Social worker</option>
		<option value="Socialite">Socialite</option>
		<option value="Software engineer">Software engineer</option>
		<option value="Soil scientist">Soil scientist</option>
		<option value="Soldier">Soldier</option>
		<option value="Solicitor">Solicitor</option>
		<option value="Sommelier">Sommelier</option>
		<option value="Sonographer">Sonographer</option>
		<option value="Sound Engineer">Sound Engineer</option>
		<option value="Special agent">Special agent</option>
		<option value="Speech therapist">Speech therapist</option>
		<option value="Sportsman">Sportsman</option>
		<option value="Spy">Spy</option>
		<option value="Statistician">Statistician</option>
		<option value="Street artist">Street artist</option>
		<option value="Street musician">Street musician</option>
		<option value="Stevedore">Stevedore</option>
		<option value="Street sweeper">Street sweeper</option>
		<option value="Street vendor">Street vendor</option>
		<option value="Structural engineers">Structural engineers</option>
		<option value="Stunt double">Stunt double</option>
		<option value="Stunt performer">Stunt performer</option>
		<option value="Surgeon">Surgeon</option>
		<option value="Supervisor">Supervisor</option>
		<option value="Surveyor">Surveyor</option>
		<option value="Swimmer">Swimmer</option>
		<option value="Switchboard operator">Switchboard operator</option>
		<option value="System administrator">System administrator</option>
		<option value="Systems analyst">Systems analyst</option>
		<option value="Student">Student</option>
		<option value="Tailor">Tailor</option>
		<option value="Tanner">Tanner</option>
		<option value="Tapester)">Tapester)</option>
		<option value="Tax Collector">Tax Collector</option>
		<option value="Tax Lawyer">Tax Lawyer</option>
		<option value="Taxidermist">Taxidermist</option>
		<option value="Taxicab driver">Taxicab driver</option>
		<option value="Taxonomist">Taxonomist</option>
		<option value="Tea lady">Tea lady</option>
		<option value="Teacher">Teacher</option>
		<option value="Technician">Technician</option>
		<option value="Technologist">Technologist</option>
		<option value="Technical Writer">Technical Writer</option>
		<option value="Telegraph operator)">Telegraph operator)</option>
		<option value="Telephone operator">Telephone operator</option>
		<option value="Tennis player">Tennis player</option>
		<option value="Test developer">Test developer</option>
		<option value="Test pilot">Test pilot</option>
		<option value="Torchwood Officer">Torchwood Officer</option>
		<option value="Thatcher">Thatcher</option>
		<option value="Theatre director">Theatre director</option>
		<option value="Therapist">Therapist</option>
		<option value="Thimbler">Thimbler</option>
		<option value="Tiler">Tiler</option>
		<option value="Toolmaker">Toolmaker</option>
		<option value="Trademark attorney">Trademark attorney</option>
		<option value="Trader">Trader</option>
		<option value="Tradesman">Tradesman</option>
		<option value="Trainer (business)">Trainer (business)</option>
		<option value="Transit planner">Transit planner</option>
		<option value="Translator">Translator</option>
		<option value="Treasurer">Treasurer</option>
		<option value="Truck Driver">Truck Driver</option>
		<option value="Turner">Turner</option>
		<option value="Tutor">Tutor</option>
		<option value="Tyler">Tyler</option>
		<option value="Typist">Typist</option>
		<option value="Undertaker">Undertaker</option>
		<option value="Ufologist">Ufologist</option>
		<option value="Undercover agent">Undercover agent</option>
		<option value="Underwriter">Underwriter</option>
		<option value="Upholsterer">Upholsterer</option>
		<option value="Urologist">Urologist</option>
		<option value="Usher">Usher</option>
		<option value="Underwear model">Underwear model</option>
		<option value="Valet">Valet</option>
		<option value="Verger">Verger</option>
		<option value="Veterinarian">Veterinarian</option>
		<option value="Vibraphonist">Vibraphonist</option>
		<option value="Vicar">Vicar</option>
		<option value="Video editor">Video editor</option>
		<option value="Video game developer">Video game developer</option>
		<option value="Vintner">Vintner</option>
		<option value="Violinist">Violinist</option>
		<option value="Violist">Violist</option>
		<option value="Voice Actor">Voice Actor</option>
		<option value="Waitress)">Waitress)</option>
		<option value="disambiguation needed">disambiguation needed</option>
		<option value="Watchmaker">Watchmaker</option>
		<option value="Weaponsmith">Weaponsmith</option>
		<option value="Weatherman">Weatherman</option>
		<option value="Weaver">Weaver</option>
		<option value="Web designer">Web designer</option>
		<option value="Web developer">Web developer</option>
		<option value="Wedding Planner">Wedding Planner</option>
		<option value="Welder">Welder</option>
		<option value="Wet nurse">Wet nurse</option>
		<option value="Woodcarver">Woodcarver</option>
		<option value="Wood cutter">Wood cutter</option>
		<option value="Wrangler">Wrangler</option>
		<option value="Winemaker">Winemaker</option>
		<option value="Writer">Writer</option>
		<option value="Xylophonist">Xylophonist</option>
		<option value="Yodeler">Yodeler</option>
		<option value="Zookeeper">Zookeeper</option>
		<option value="Zoologist">Zoologist</option>
	</select>

Enjoy 🙂

Update:

I notice the above is pretty hard to find which has been previously selected by the user. Hence, i place them into an array and put it up here hopefully someone will find it useful for a list of all jobs in a php array 🙂

<select class="select" id="user_job" name="user_job">
		<option value=""> - Job - </option>
		<?php
			$loop = array('Athlete',		'Accountant',		'Actor',		'Actress',		'Administrator',		'Aerospace Engineer',		'Air Traffic Controller',		'Ambassador',		'Anesthetist',		'Anchorman',		'Animator',		'Animal trainer',		'Archaeologist',		'Architect',		'Artist',		'Astronaut',		'Astronomer',		'Athletic trainer',		'Attorney',		'Author',		'Army',		'Brain Surgeon',		'Baker',		'Bank teller',		'Banker',		'Barber',		'Barista',		'Barrister',		'Bartender',		'Babysitter',		'Beauty queen',		'Beauty therapist',		'Beekeeper',		'Blacksmith',		'Boilermaker',		'Bookkeeper',		'Bookseller',		'Brewer',		'Butcher',		'Butler',		'Builder',		'Cab driver',		'Calligrapher',		'Cameraman',		'Car designer',		'Cardiologist',		'Carpenter',		'Cartoonist',		'Cartographer',		'Cashier',		'Cellist',		'Chess player',		'CIO (Chief Information Officer)',		'CEO (Chief Executive Officer)',		'CTO (Chief Technology Officer)',		'CFO (Chief Financial Officer)',		'Chauffeur',		'Cheesemaker',		'Cook)',		'Chemist',		'Chief of police',		'Chimney sweep',		'Civil servant',		'Civil engineer',		'Clarinetist',		'Cleaner',		'Clerk',		'Clockmaker',		'Coach',		'Coachman',		'Coast guard',		'Cobbler',		'Columnist',		'Comedian',		'Company Secretary',		'Compasssmith',		'Composer',		'Computer programmer',		'Conductor (music)',		'Construction engineer',		'Construction worker',		'Consul',		'Consultant',		'Contractor, general',		'Coroner',		'Corrector',		'Cosmonaut',		'Costume Designer',		'Courier',		'Cryptographer',		'Currier',		'Customs officer',		'Dancer',		'Dentist',		'Deputy (law enforcement)',		'Dermatologist',		'Designer/Developer',		'Detective',		'Dictator',		'Disc jockey',		'Diver',		'Doctor',		'Dog walker',		'Doorman',		'Dressmaker',		'Ecologist',		'Economist',		'Editor',		'Electrical engineer',		'Electrician',		'Elevator mechanic',		'Engineer',		'Engraver',		'Entrepreneur',		'Environmental scientist',		'Executive manager',		'Exterminator',		'Falconer',		'Farmer',		'Farrier',		'Fashion designer',		'FBI Agent',		'Film director',		'Film producer',		'Financial adviser',		'Fire marshal',		'Fire Safety Officer',		'Firefighter',		'First Mate',		'Fishmonger',		'Fisherman',		'Fitter',		'Flavorist',		'Fletcher',		'Flight attendant',		'Flight instructor',		'Florist',		'Flutist',		'Food critic',		'Footballer',		'Forester',		'Fortune teller',		'Funeral Director',		'Gamekeeper',		'Game designer',		'Gardener',		'Gemcutter',		'Genealogist',		'General',		'Geologist',		'Goldsmith',		'Government agent',		'Governor',		'Graphic Designer',		'Gravedigger',		'Greengrocer',		'Grocer',		'Guide',		'Guitarist',		'Gunsmith',		'Harpist',		'Handyman',		'Hairdresser',		'Harbourmaster',		'Harper',		'Hatter',		'Historian',		'Homeopath',		'Hotel manager',		'Housekeeper',		'Hairstylist',		'Human Resource Manager',		'Human Resource Assistant',		'Illuminator',		'Illusionist',		'Illustrator',		'Importer',		'Industrial engineer',		'Industrialist',		'Information Technologist',		'Information Designer',		'Inker',		'Innkeeper',		'Instructor',		'Interior designer',		'Interpreter',		'Interrogator',		'Inventor',		'disambiguation needed',		'Investment banker',		'Investment broker',		'Ironmonger',		'Ironmaster',		'Ironworker',		'Jailer',		'Janitor',		'Jeweller',		'Journalist',		'Jurist',		'Judge',		'Jockey',		'Joggler',		'Karate master',		'Kinesiologist',		'Laborer',		'Landlady)',		'Lavendar)',		'Law enforcement agent',		'Lawyer',		'Leadworker',		'Leatherer',		'Leather worker',		'Lecturer',		'Level designer (also Mapper)',		'Librarianship',		'Librettist',		'Lifeguard',		'Lighthouse keeper',		'Lighting technician',		'Lineman',		'Linguist',		'Loan officer',		'Lobbyist',		'Locksmith',		'Lumberjack',		'Lyricist',		'Magistrate',		'Magnate',		'Maid',		'Mailman or Mail carrier',		'Make-up artist',		'Management consultant',		'Manager',		'Manicurist',		'Manufacturer',		'Marine',		'Marine biologist',		'Market gardener',		'Martial artist',		'Mason',		'Master of business administration',		'MC)',		'masseur)',		'Matador',		'Mathematician',		'Mechanic',		'Mechanical Engineer',		'Mechanician',		'Mediator',		'Medic',		'Medical biller',		'Medical Transcriptionist',		'Mesmerist',		'Messenger',		'Mid-wife',		'Milkmaid)',		'Miller',		'Miner',		'Missionary',		'Model',		'Modeller',		'Moneychanger',		'Moneylender',		'Monk',		'Mortgage broker',		'Mountaineer',		'Muralist',		'Musician',		'Navigator',		'N??gociant',		'Negotiator',		'Netmaker',		'Neurologist',		'Newscaster',		'Night auditor',		'Nightwatchmen',		'Notary',		'Novelist',		'Numerologist',		'Numismatist',		'Nun',		'Nursemaid',		'Nurse',		'Nutritionist',		'Oboist',		'Obstetrician',		'Occupational therapist',		'Odontologist',		'Oncologist',		'Ontologist',		'Operator',		'Ophthalmologist',		'Optometrist)',		'Oracle',		'Ordinary Seaman',		'disambiguation needed',		'Orthodontist',		'Ornithologist',		'Ostler',		'Otorhinolaryngologist',		'Optometrist',		'Ocularist',		'Opthamologist',		'Painter',		'Paleontologist',		'Paralegal',		'Paramedic',		'Park ranger',		'Parole Officer',		'Pastor',		'Patent attorney',		'Patent examiner',		'Pathologist',		'Pawnbroker',		'Peddler',		'Pediatrician',		'Pedologist (soil)',		'Percussionist',		'Perfumer',		'Personal Trainer',		'Pharmacist',		'Philanthropist',		'Philologist',		'Philosopher',		'Photographer',		'Photo Specialist',		'Physical Therapist',		'Physician',		'Physician Assistant',		'Physicist',		'Physiognomist',		'Physiotherapist',		'Pianist',		'Piano tuner',		'Pilot (shipping)',		'Pilot (aviation)',		'Pirate',		'Plumber',		'Podiatrist',		'Poet',		'Police inspector',		'Politician',		'disambiguation needed',		'Presenter',		'President',		'Press officer',		'Priest',		'Princess',		'Principal',		'Printer',		'Private detective',		'Probation Officer',		'Proctologist',		'Product designer',		'Professor',		'Professional dominant',		'Programmer',		'Project Manager',		'Proofreader',		'Psychiatrist',		'Psychodramatist',		'Psychologist',		'Public Relations Officer',		'Public speaker',		'Publisher',		'Porn star',		'Queen consort',		'Queen regnant',		'Quilter',		'Radiologist',		'Radiographer',		'Real estate broker',		'Real estate investor',		'Real estate developer',		'Receptionist',		'Record Producer',		'Referee',		'Refuse collector',		'Registrar',		'Reporter',		'Researcher',		'Respiratory Therapist',		'Restaurateur',		'Retailer',		'Rubbish Collector',		'Sailmaker',		'Sailor',		'Salesmen',		'Sanitation worker',		'Saucier',		'Saxophonist',		'disambiguation needed',		'Scientist',		'School superintendent',		'Scout',		'Screenwriter',		'Scrivener)',		'Seamstress',		'Second Mate',		'Secret service agent',		'Secretary general',		'Security guard',		'Senator',		'SEO (search engine optimizer)',		'Sexton',		'Sheepshearer',		'Sheriff',		'Sheriff officer',		'Shoemaker',		'Shop assistant',		'Singer',		'Skydiver',		'Sleeper',		'Sleuth',		'Social worker',		'Socialite',		'Software engineer',		'Soil scientist',		'Soldier',		'Solicitor',		'Sommelier',		'Sonographer',		'Sound Engineer',		'Special agent',		'Speech therapist',		'Sportsman',		'Spy',		'Statistician',		'Street artist',		'Street musician',		'Stevedore',		'Street sweeper',		'Street vendor',		'Structural engineers',		'Stunt double',		'Stunt performer',		'Surgeon',		'Supervisor',		'Surveyor',		'Swimmer',		'Switchboard operator',		'System administrator',		'Systems analyst',		'Student',		'Tailor',		'Tanner',		'Tapester)',		'Tax Collector',		'Tax Lawyer',		'Taxidermist',		'Taxicab driver',		'Taxonomist',		'Tea lady',		'Teacher',		'Technician',		'Technologist',		'Technical Writer',		'Telegraph operator)',		'Telephone operator',		'Tennis player',		'Test developer',		'Test pilot',		'Torchwood Officer',		'Thatcher',		'Theatre director',		'Therapist',		'Thimbler',		'Tiler',		'Toolmaker',		'Trademark attorney',		'Trader',		'Tradesman',		'Trainer (business)',		'Transit planner',		'Translator',		'Treasurer',		'Truck Driver',		'Turner',		'Tutor',		'Tyler',		'Typist',		'Undertaker',		'Ufologist',		'Undercover agent',		'Underwriter',		'Upholsterer',		'Urologist',		'Usher',		'Underwear model',		'Valet',		'Verger',		'Veterinarian',		'Vibraphonist',		'Vicar',		'Video editor',		'Video game developer',		'Vintner',		'Violinist',		'Violist',		'Voice Actor',		'Waitress)',		'disambiguation needed',		'Watchmaker',		'Weaponsmith',		'Weatherman',		'Weaver',		'Web designer',		'Web developer',		'Wedding Planner',		'Welder',		'Wet nurse',		'Woodcarver',		'Wood cutter',		'Wrangler',		'Winemaker',		'Writer',		'Xylophonist',		'Yodeler',		'Zookeeper',		'Zoologist');
			foreach($loop as $value){
				if($_POST['user_job'] == $value )
				echo '<option value="'.$value.'" selected>'.$value.'</option>';
				else
				echo '<option value="'.$value.'">'.$value.'</option>';
			}
		?>
	</select>

Get Tag With Post ID In WordPress

Today i was writing my plugin and required each post tag to be placed into a variable outside of WordPress loop. I have a look at WordPress function reference api and did some Google and surprisingly i couldn't find it. After a long time of digging on Google, i finally found a clue. Apparently, the method get_the_tags takes in a post id! However, if you look at get_the_tags reference page, it doesn't mention at all. Hence, i decides to write it down here to ease people life in the future.

Get Tag In WordPress

Once you get hold of your Post ID you can easily retrieve the tag associated with the post with the following code.

			$postid = $post->ID;
			get_the_tags($postid);

It will return a list of tags. Hope it helps 🙂

Remove WordPress Admin Menu Without Affecting WordPress Core System

In WordPress, each user type have different capability. Sometimes, we want to change these capability and the most easiest way to do that is to remove what they can see when they logged in. Especially when someone wants to change WordPress into a powerful CMS and remove certain admin menu without touching the core system. In most CMS, there are so much restriction on their core system that makes it really inflexible. Unlike other system, WordPress is able to modify their core codes using plugin without affecting the fundamental codes in WordPress. Hence, we can continue to upgrade our system without having to worry about updates that will kill your modification. In this article, i will show you how i remove WordPress admin menu using plugin style without affecting WordPress Core codes.

WordPress Admin Menu

If you are able to dig into WordPress code, you will notice that their menu is created by a single function using two global variables as parameter. You can easily find this code located at wp-admin/menu-header.php, line 157-158.

_wp_menu_output( $menu, $submenu );
do_action( 'adminmenu' );

From the look of the method, you would have easily guess that this method is also a global method which takes in global variables $menu and $submenu to construct a full flag admin menu in WordPress. However, this method is like a loop that takes in a variable and loop through whatever is contain in the variable given. Hence, we will have to look at how each global variable is built to determine how to properly remove a WordPress admin menu.

Global Variable - $menu

If you dig deeper into WordPress, you will notice that the global variable $menu and $submenu are located at wp-admin/menu.php, line 25 onwards. This two variables play an important part in our objective as they create and remove main and submenu in WordPress. If you look at the code from line 28-115, you will notice that both menu and submenu is constructed first regardless of permission.

$menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top', 'menu-dashboard', 'div' );

$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );

$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top', 'menu-posts', 'div' );
	$submenu['edit.php'][5]  = array( __('Edit'), 'edit_posts', 'edit.php' );
	/* translators: add new post */
	$submenu['edit.php'][10]  = array( _x('Add New', 'post'), 'edit_posts', 'post-new.php' );

	$i = 15;
	foreach ( $wp_taxonomies as $tax ) {
		if ( $tax->hierarchical || ! in_array('post', (array) $tax->object_type, true) )
			continue;

		$submenu['edit.php'][$i] = array( esc_attr($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name );
		++$i;
	}

	$submenu['edit.php'][50] = array( __('Categories'), 'manage_categories', 'categories.php' );

$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top', 'menu-media', 'div' );
	$submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php');
	/* translators: add new file */
	$submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php');

$menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top', 'menu-links', 'div' );
	$submenu['link-manager.php'][5] = array( __('Edit'), 'manage_links', 'link-manager.php' );
	/* translators: add new links */
	$submenu['link-manager.php'][10] = array( _x('Add New', 'links'), 'manage_links', 'link-add.php' );
	$submenu['link-manager.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-link-categories.php' );

$menu[20] = array( __('Pages'), 'edit_pages', 'edit-pages.php', '', 'menu-top', 'menu-pages', 'div' );
	$submenu['edit-pages.php'][5] = array( __('Edit'), 'edit_pages', 'edit-pages.php' );
	/* translators: add new page */
	$submenu['edit-pages.php'][10] = array( _x('Add New', 'page'), 'edit_pages', 'page-new.php' );

$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top', 'menu-comments', 'div' );

$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group

$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );

$menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top', 'menu-appearance', 'div' );
	$submenu['themes.php'][5]  = array(__('Themes'), 'switch_themes', 'themes.php');
	$submenu['themes.php'][10] = array(__('Editor'), 'edit_themes', 'theme-editor.php');
	$submenu['themes.php'][15] = array(__('Add New Themes'), 'install_themes', 'theme-install.php');

$update_plugins = get_transient( 'update_plugins' );
$update_count = 0;
if ( !empty($update_plugins->response) )
	$update_count = count( $update_plugins->response );

$menu[65] = array( sprintf( __('Plugins %s'), "<span class='update-plugins count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'activate_plugins', 'plugins.php', '', 'menu-top', 'menu-plugins', 'div' );
	$submenu['plugins.php'][5]  = array( __('Installed'), 'activate_plugins', 'plugins.php' );
	/* translators: add new plugin */
	$submenu['plugins.php'][10] = array(_x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php');
	$submenu['plugins.php'][15] = array( __('Editor'), 'edit_plugins', 'plugin-editor.php' );

if ( current_user_can('edit_users') )
	$menu[70] = array( __('Users'), 'edit_users', 'users.php', '', 'menu-top', 'menu-users', 'div' );
else
	$menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top', 'menu-users', 'div' );

if ( current_user_can('edit_users') ) {
	$_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
	$submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
	$submenu['users.php'][10] = array(__('Add New'), 'create_users', 'user-new.php');
	$submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
} else {
	$_wp_real_parent_file['users.php'] = 'profile.php';
	$submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
}

$menu[75] = array( __('Tools'), 'read', 'tools.php', '', 'menu-top', 'menu-tools', 'div' );
	$submenu['tools.php'][5] = array( __('Tools'), 'read', 'tools.php' );
	$submenu['tools.php'][10] = array( __('Import'), 'import', 'import.php' );
	$submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' );
	$submenu['tools.php'][20] = array( __('Upgrade'), 'install_plugins',  'update-core.php');

$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top', 'menu-settings', 'div' );
	$submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php');
	$submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
	$submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php');
	$submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php');
	$submenu['options-general.php'][30] = array(__('Media'), 'manage_options', 'options-media.php');
	$submenu['options-general.php'][35] = array(__('Privacy'), 'manage_options', 'options-privacy.php');
	$submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php');
	$submenu['options-general.php'][45] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php');

Furthermore, its being done neat and nicely. After that a few loop is conducted to remove the menu and submenu according to the user permission. You can see that on line 152 - 209.

$_wp_submenu_nopriv = array();
$_wp_menu_nopriv = array();
// Loop over submenus and remove pages for which the user does not have privs.
foreach ( array( 'submenu' ) as $sub_loop ) {
	foreach ($$sub_loop as $parent => $sub) {
		foreach ($sub as $index => $data) {
			if ( ! current_user_can($data[1]) ) {
				unset(${$sub_loop}[$parent][$index]);
				$_wp_submenu_nopriv[$parent][$data[2]] = true;
			}
		}

		if ( empty(${$sub_loop}[$parent]) )
			unset(${$sub_loop}[$parent]);
	}
}

// Loop over the top-level menu.
// Menus for which the original parent is not acessible due to lack of privs will have the next
// submenu in line be assigned as the new menu parent.
foreach ( $menu as $id => $data ) {
	if ( empty($submenu[$data[2]]) )
		continue;
	$subs = $submenu[$data[2]];
	$first_sub = array_shift($subs);
	$old_parent = $data[2];
	$new_parent = $first_sub[2];
	// If the first submenu is not the same as the assigned parent,
	// make the first submenu the new parent.
	if ( $new_parent != $old_parent ) {
		$_wp_real_parent_file[$old_parent] = $new_parent;
		$menu[$id][2] = $new_parent;

		foreach ($submenu[$old_parent] as $index => $data) {
			$submenu[$new_parent][$index] = $submenu[$old_parent][$index];
			unset($submenu[$old_parent][$index]);
		}
		unset($submenu[$old_parent]);

		if ( isset($_wp_submenu_nopriv[$old_parent]) )
			$_wp_submenu_nopriv[$new_parent] = $_wp_submenu_nopriv[$old_parent];
	}
}

do_action('admin_menu', '');

// Remove menus that have no accessible submenus and require privs that the user does not have.
// Run re-parent loop again.
foreach ( $menu as $id => $data ) {
	// If submenu is empty...
	if ( empty($submenu[$data[2]]) ) {
		// And user doesn't have privs, remove menu.
		if ( ! current_user_can($data[1]) ) {
			$_wp_menu_nopriv[$data[2]] = true;
			unset($menu[$id]);
		}
	}
}

Now we have a basic understanding of how WordPress handle their admin menu according to user access. We are ready to remove or modify any user access to alter WordPress user capability to view a particular menu in WordPress.

Removing WordPress Admin Menu

After having you wasting your time reading all the way from the top to here, i finally getting back to track and write what this article is about. We understand from all the rubbish on top that the global variable $menu array contains all the top level menu item and the global variable $submenu array contains all submenu page of each top level menu item. We can perform a few methods to remove a WordPress Admin Menu. The first simple and very basic way of removing a WordPress admin menu is to unset the menu resist in the global array.

function remove_submenu() {
global $submenu;
//remove Theme editor
unset($submenu['themes.php'][10]);
}

function remove_menu() {
global $menu;
//remove post top level menu
unset($menu[5]);
}
add_action('admin_head', 'remove_menu');
add_action('admin_head', 'remove_submenu');

We can remove a set of admin menu by doing this.

function remove_menus () {
global $menu;
		$restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins'));
		end ($menu);
		while (prev($menu)){
			$value = explode(' ',$menu[key($menu)][0]);
			if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
		}
}
add_action('admin_menu', 'remove_menus');

The above code can be further reduce by 4 lines but i will keep it as it is.

This is pretty simple but not all user have these access and you might want to do some checking before accessing an invalid array to be unset which might give an error to be display. Although this is simple and the objective is achieve by removing the display of the menu/submenu, the user will still be able to direct access via the url. Hence, we need something better. Something that will disable all admin menu and sub menu tab from accessing and viewing.

function remove_menus () {
global $menu, $submenu, $user_ID;
	$the_user = new WP_User($user_ID);
	$valid_page = "admin.php?page=contact-form-7/admin/admin.php";
	$restricted = array('index.php','edit.php','categories.php','upload.php','link-manager.php','edit-pages.php','edit-comments.php', 'themes.php', 'plugins.php', 'users.php', 'profile.php', 'tools.php', 'options-general.php');
	$restricted_str = 'widgets.php';
	end ($menu);
	while (prev($menu)){
		$menu_item = $menu[key($menu)];
		$restricted_str .= '|'.$menu_item[2];
		if(in_array($menu_item[2] , $restricted)){
			$submenu_item = $submenu[$menu_item[2]];
			if($submenu_item != NULL){
				$tmp = $submenu_item;
				$max = array_pop(array_keys($tmp));
				for($i = $max; $i > 0;$i-=5){

					 if($submenu_item[$i] != NULL){
						$restricted_str .= '|'.$submenu[$menu_item[2]][$i][2];
						unset($submenu[$menu_item[2]][$i]);
					}
				}
			}
			unset($menu[key($menu)]);
		}
	}
	$result = preg_match('/(.*?)\/wp-admin\/?('.$restricted_str.')??(('.$restricted_str.'){1})(.*?)/',$_SERVER['REQUEST_URI']);
	if ($result != 0 && $result != FALSE){
		wp_redirect(get_option('siteurl') . '/wp-admin/' . $valid_page);
		exit(0);
	}
}
add_action('admin_menu', 'remove_menus');

The above function did just the thing. We will only required to provide the file name of the top level category and it will automatically disable all access to the subsequence admin sub menu. However, we will have to provide a valid page for user to gain access for the first time. The above code will disable ALL ADMIN MENU AND SUB MENU FOR ALL WORDPRESS ACCESS. The only page that was left accessible are the custom admin menu created by our user such as TweetMeme or Contact 7 form admin menu.

Easiest way to remove sub menu

After version 3.1, you are provided with the following methods to remove submenu

add_action( 'admin_menu', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
        remove_menu_page('link-manager.php');
        //remove_menu_page('themes.php');
        remove_submenu_page( 'themes.php', 'themes.php' );
        remove_submenu_page( 'themes.php', 'theme-editor.php' );
        remove_submenu_page( 'themes.php', 'themes.php?page=custom-background' );
        remove_submenu_page( 'widgets.php', 'theme-editor.php' );
        remove_menu_page('tools.php');
        remove_menu_page('upload.php');
        remove_menu_page('edit-comments.php');
        remove_menu_page('plugins.php');
        remove_menu_page('admin.php?page=w3tc_general');
        remove_menu_page('admin.php?page=better_wp_security');
        remove_menu_page('admin.php?page=wpcf7');
        remove_submenu_page( 'index.php', 'update-core.php' );
        remove_submenu_page( 'options-general.php', 'options-discussion.php' );
        remove_submenu_page( 'options-general.php', 'options-writing.php' );
        remove_submenu_page( 'options-general.php', 'options-reading.php' );
        remove_submenu_page( 'options-general.php', 'options-permalink.php' );
        remove_submenu_page( 'options-general.php', 'options-media.php' );
}

Pretty simple and direct, first parameter is the file name or parent file name of the page you want to remove, second parameter is the submenu you wish to remove.

Concolusion

This is the way i use to remove admin menu in WordPress. We do not have to check for user access as the user will already be redirected to the specific page before they can enter the permission denial page. Have fun 🙂

200++ Photoshop Photo Effects

Have you ever wonder where is that photo effect tutorial you saw the other day and start searching all over the internet but couldn't find what you saw initially? Honestly, i have. That is why i throw them all into this article instead. But i also use these article to gain inspiration on what to do with my photo image. Sometimes we are like a lost bird when it comes to creative design. Hence, putting up links of images can really benefit myself and hopefully people who come across this article too.

Create a Powerful Mental Wave Explosion Effect

wave-explosion

Photo to Pencil Sketch Effect

pencil

Sin City Style Effect

sincity

How To Make Your Own Vector Portraits

vector

Tutorial: Good and Evil Photo Effect

evil

The Making of Mystic Effect

mystic

Transform A Person Into An Alien Effect

alien-photoshop

Reflective Bubbles Effect

3315027133_4f9e8c8241

Crack and Peel Effect

3315027243_4fcabe071f

Expressive Lighting Effect

aura-effect

Displacement Effect

awesome-effect

Vector Composite Effect from a Photo

blabus

Easy Watercolor Painting Effect

cartoon-effect

Twins Effect

clones

Apple Style Portrait Effect

coldplay

Compositing Effect

compositing

Dimension Effect

dimension

Blue Glow Dreamy Effect

dreamy

Ink Drops in Your Digital Compositions Effect

dropink

Super Slick Dusky Lighting Effect

earth effect

Electrifying Energy Beams Effect

electric

Eery-Eye Photo Effect

evil-eye-effect

Fairy Night Eye Effect

Fairy-Night

Fairy tale Effect

fairytale

Make your image look awesome with a few light effects

fewlights

Fire Lines Effect

firelines

Make Perfume Commercial

fragrance

Dirty Grunge Effect

grunge

Coloring Effect

guitar-girl

Photoshop Effect: Focus With Light

hand-light-effect

Speeding Car Effect

car-effect

The Maiden and Hummingbird Photo Manipulation

doll-effects

Design an Epic Fantasy Scene with Photoshop

fantasy-effects

Thermal Photo Effect

flame-effects

Create an Abstract Design with Curved Light Streaks

hand-effect

Dance Photo Effect

hip-hop-effect

Glowing Neon Effect

human-3d-effects

Fantasy Art Scene

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvc2lsZW50by5qcGc=

Sexy Model with Glowing Bubbles Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy8xMHN0ZXBzMi5qcGc=

Glamour model

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy9hZG9iZXR1dG9yaWFsei5qcGc=

Create an Amazing A.I. Robot Woman in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy9kZXNpZ25yZXZpdmVyLmpwZw==

Impressive Photo Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy9waG90b3Nob3A4eC5qcGc=

Make Perfect Selection for Human Object by Utilising Channel Mask Technique in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy9wc2R2YXVsdC5qcGc=

Create a Realistic Break-Apart Effect with Debris Brushset in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy9wc2R2YXVsdDIuanBn

Create sexy cyborg Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy9wc2RlbHV4ZS5qcGc=

Create a Stylish Two-Tone Photo Montage Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy9wc2RmYW4uanBn

Design a Stylish Fashion Advert Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy9wc2RmYW4yLmpwZw==

Create a Divine Angel Montage Effect in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy90dXRvcmlhbDkyLmpwZw==

Text Image Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy90dXRvcmlhbHBhcmsuanBn

Dynamic Scene with a Fallen Angel Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9fZWZmZWN0cy90dXRzcGx1czMuanBn

Combine Photo Elements to Create a Surreal Photo Manipulation Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcGhvdG9zaG9wdHV0b3JpYWxzLnBuZw==

Fairy and Sunset Landscape Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcHN3aXNoLmpwZw==

Photo Manipulation - Creating a Fantasy Scene

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcHNkcm9ja3N0YXIuanBn

The Soft Sea Light

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcHNkdG9wLmpwZw==

Awesome Fantasy Style Castle Scene Creation in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvcHNkdmF1bHQuanBn

Fantasy Photo Manipulation Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvdHV0c3BsdXM0LmpwZw==

Fantasy Creature in a Misty Landscape

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvdHV0c3BsdXMuanBn

Create an Out of Bounds Fantasy Illustration Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvdHV0c3BsdXMyLmpwZw==

Making of a Forest Magical Scene

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvMTBzdGVwcy5qcGc=

Making of Urban Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvY2dhcmVuYS5qcGc=

Create a Magic Crystal Ball

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvYWRvYmV0dXRvcmlhbHouanBn

Warth Best Life

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvYWRvYmV0dXRvcmlhbHoyLmpwZw==

Fantastic Tree

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvYWxmb2FydC5qcGc=

Magic lamp in the old room

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvYWxmb2FydDIuanBn

Fantastic Water Landscape

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvYWxmb2FydDMuanBn

Matte painting

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvZXllc29udHV0b3JpYWxzLmpwZw==

Magic Book

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvZXllc29udHV0b3JpYWxzMi5qcGc=

Serenity Prayer

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvZXllc29udHV0b3JpYWxzMy5qcGc=

Galaxy Angel

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMvZXllc29udHV0b3JpYWxzNC5qcGc=

Badass Bling Effect in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL2dvbWVkaWF6aW5lLmpwZw==

Flying Girl in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL2FiZHV6ZWVkby5qcGc=

Really cool Eclipse Effect in Photosho

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL2FiZHV6ZWVkbzIuanBn

X-MEN movie poster

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL2Fkb2JldHV0b3JpYWx6LmpwZw==

How to create a stylish mad lady in photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL2Jlc3RwaG90b3Nob3B0dXRvcmlhbHMuanBn

Fantasy light effects in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL2RpZ2l0YWxhcnRzb25saW5lMi5qcGc=

Lighting effects in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL2RpZ2l0YWxhcnRzb25saW5lMy5qcGc=

Make incredible surreal images

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL2RpZ2l0YWxhcnRzb25saW5lNC5qcGc=

Dazzling Dance Photo Manipulation Effect

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL3Bob3Rvc2hvcHR1dG9yaWFscy5wbmc=

Light and Glow Effect In Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL3NlY29uZHBpY3R1cmUuanBn

Energize Your Graphics with Abstract Energy Lines

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL3R1dG9yaWFsOS5qcGc=

Ps Advanced Splatter Effect Tutorial

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyL3R1dGNhbmR5LmpwZw==

Lighting Effect in Photoshop

L2hvbWUzL3BzZGVsdXhlL3B1YmxpY19odG1sL2ltYWdlcy9zdG9yaWVzL3dlYnR1dHMyLzEwc3RlcHMuanBn

Creative Photoshop Animal King Photo Manipulation Tutorial

anime-king-effects

Robotic Frog

frog

How to Create a Flying Land Illustration On Fire

knight-story-effects

Watercolor Effect

light-girl-effects

Alien Invasion

invasion-effects

Creating Energy Spheres

light-beam

Seriously Cool Photoshop Explosion Effect

light-effect

Lightning from hand

lighting-effects

Adding Light Streaks Effect To A Photo

lights

How To Make Circle Pixels Effect

lines-effect

Giving A Mafia-Look Effect

mafia

Design an Awesome Space Dancer Scene Effect

magic-effects

The Little Mermaid Photo Effect

mermaid

Design a wolf howling at the moon effect

midnight-effects

Light Effect On A Model

modern-effect

How To Turn Your Photo Into Movie-Like Effect

movie-effect

Dynamic Lightning Effect

building

Dark Art Picture Style Effect

night-effect

The Ocean Girl Photo Effect

ocean

How To Make Digital Photos Look Like Lomo Photography Effect

old-effects

Age Progression

old-lady-effect

Creating an Abstract Watercolor Effect

painting-effects

Fiery Photoshop Space Explosion Effect

planet-effect

Add Realistic Rainbow Effect To A Photo

ranbow-effect

Fantastic Disintegration Effect

rawr-effects

Realistic Water Reflection Effect

reflect-effect

Grunge Photo Edges Effect

shouting-effects

Add A Sparkle Trail Effect To A Photo

sparkle

How to Place a Use lighting effects to make photos sparkle

sparkle02

Creating Light Motion Trails & Glowing Sparks Effect

sparks

Christmas Fairy Magic Effect

star-effects

Bringing A Stone Statue To Life Effect

state-effects

How to Turn Humdrum Photos into Cinematic Portraits

storm-effects

Colorful Picture Style Effect

strong-impression

Realistic Tattoos Effect

tatoo-effect

Cool Halftone Effect

text-effect

How to make a Typographic, Retro, Space Face Effect

topology-effect

Photo Editing / Retouching

tragic

How to Apply Textures to Uneven Surfaces

tree-effects

Create a fantasy illustration in Photoshop

unicorn-effects

Urban-Style Piece Of Artwork

urban

Watchmen Effect

watchman-effects

Make an Apple Coldplay Style Ad in Photoshop

welcome-effect

Zombie Effect

zombie-effect

Halftone Dots And Linear Light

3315027899_4deff3e472

Beautiful Lady Effect

3315027947_3b5fe05642

Mosaic, Fill A Photo With Photos Effect

3315028177_dfda4429b6

Creating A Rocking Silhouette

3315028369_d29730bbd1

Make Photos More Suggestive

3315028409_7f18db32d7

Adding Reflections To Sunglasses Effect

3315028555_e6cf210930

Devil's Eye Effect

3315854678_0ee80c73ea

Fantasy Art

3315855042_3dd0fdbdb2

Retro Comic Book Effect

comic-effect

Water effect photo montage

wave

Vibrant Image Effect Using Photoshop

dance-effect

Ghost Effect

ghost

Dramatic gritty effect

Dramatic-gritty-effect

Photo to Illustration Effect

photo-to-illustrator

Turn A Photo Into A Collage Of Polaroids In Photoshop

Collage-Polaroids-Photoshop

Instant Photo To Oil Painting Action

Instant-Photo-To-Oil-Painting-Action

Photo to sketch Effect

soft-contrast-2

Pop Art Silkscreen Effect

pop-art-silkscreen-350

The Louis Daguerre Effect

daguerre-photo-effect-final

Cubism Effect

cubic-effect

Cross-Processing Effect

cross-effect

Create an Illustrated Look From a Photograph

photo-to-drawing

Super mysterious lighting effects for your image

sun-effect

HDR Effect Tutorial

HDR-tutorial

FAKE MODEL PHOTOGRAPHY EFFECT

fake-photography-effect

Photo to stencil Effect

Photo-to-stencil

Transform your Photos into a Beautiful Mosaic

picture-mosaic-14

Panoramas on Steroids Effect

panographyfeature

Pop Art Effect

Pop-Art

Filtering Out Colours

filter-color

City Globe Effect

city-global

Vintage photo effect

Vintage-photo-effect

Selective Sepia Effect

Selective-Sepia

Photoshop Rain Effect

photoshop-rain

Soft Glow Effects

slow-glow-effect

Charcoal Effect

charcoal-drawing-photoshop

High-Key B&W Portrait Effect

high-key01

Horror Film Effect

Horror-Film-Effect

Snow Effect

Snow-effect

HDR - High Dynamic Range Photography

HDR

English Tea can Painting Effect

English-Tea-can-Painting

Realistic Spotlight Effect in Photoshop

Realistic-Spotlight-Effect-Photoshop

Better negative effect

negative-effect

Dave Hill Look Effect

dave-hill-photoshop

Frosted Pixels Effect

Frosted-Pixels

Darklight Photomanipulation

Darklight-Photomanipulation

Blue Print Effect

blue-print-effect

PIXEL STRETCH EFFECT

pixel-stretch

OLD MOVIE EFFECT

old-movie

REALISTIC FOG & MIST EFFECT

realistic-fog-mist-effect

The Night Vision Thing Effect

night-vision-2

A Realist Painting Effect

realistic-painting

Hot & Fiery Photo Effect

Hot-Fiery-Photo-Effect

Trippy Colors Photo effect Tutorial

trippy_color_effect_preview

Digital Painting with Light

Digital-Painting-Light

Displacement Water Effect

Displacement-Water-effect

Creating a 3D effect with image editing software

3d-pop-out

India Movie Look

movie-look

Faking Depth Of Field Effect

Depth_Of_Field

Infrared Photo Effect

infraned-effect

Blurry TV Effect

blurry-tv-effect

PUZZLE PATTERN EFFECT

puzzle-effect

Face painting on cracked wall Tutorial

Face-on-Cracked-wall

Create photo mosaics effect

photo-mosaics

Bourne Ultimatum Color and Motion Blur Effect

Bourne-Ultimatum-Color-and-Motion-Blur

Cast Light From A Window Effect

window-light-effect

Stylized paint effect

Stylized-paint-effect

Night shooting effect

Night-shooting-effect

Give Your Photos a Color Ink Sketch Effect

Color-Ink-Sketch-Effect

Wicked Blast Effect

Wicked-Blast

Fix Perspective Effect

fix-perspective

Sharpen with Edge Mask

sharpen-edge

Making Your Subject Pop Out Of A Photo

photo-pop-out

Telling Stories With Shadows

superman

Digital Pixel Effect

digital-pixel

Tearing A Photo To Reveal Another

tear-effect

Worn, Torn Photo Edges Effect In Photoshop

photoshop-worn-torn-photo-edges

image-hard-light

Mirror Image Effect In Photoshop

photoshop-mirror-image-effect

Placing An Image Inside Of Another In Photoshop

tv-image

Create A Starry Sky In Photoshop

starry-sky

Photo Into a Beautiful Painting

tutorial-how-to-turn-a-photo-into-a-beautiful-painting-in-photoshop

 

Summery

Finally, this article has ended (after 200 tutorial i lost count). This really eats a lot of my time but i think it is worthwhile since i can refer back to it every single time and won't find myself in 'where's that tutorial again' situation. Nonetheless, if any of you are using this too, please throw in more photoshop photo effect tutorial that can benefit us all. Enjoy 🙂