Kara Ferguson

Editorial

Menu

Skip to content
  • Home
  • About
  • Testimonials
  • Blog
  • Contact
  • Projects

WordPress Development in Depth by Peter MacIntyre and Sávio Resende

Client: php[architect]

Title: WordPress Development in Depth by Peter MacIntyre and Sávio Resende

Excerpt:

“This is an issue within the underlying language of PHP; when it encounters a call to a function with an already used name, it comes to a complete halt and emits a fatal error. For example, if your plugin was named ‘Plugin Services Manager,’ prefix your save to database function with psm_. Your function’s full name would then be: psm_save_to_db().


This advice goes back to rule two. You could copy well-tested code from a previously developed plugin and therefore be in self-conflict. Although it may not seem efficient to have potentially duplicated code, it is best, in the long run, to be as separated and ensconced as possible with your plugin code. If you find that you use the same functions across plugins, consider making a “base” plugin that your other plugins depend on.”

Related

Post navigation

← Noom, Inc. Engineering Team
Growing the PHP Core—One Test at a Time →
Widgets

Follow Me

Facebooktwitterpinterestlinkedin

Site Management

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Archives

  • February 2017
  • May 2016

Recent Posts

  • WTF: the Use of Profanity in Writing
  • Three Things Every Writer Does, but Shouldn’t
Proudly powered by WordPress | Theme: Illustratr by WordPress.com.
 

Loading Comments...