How would you compose a complex plugin with lots of routes and functions? [closed]

I’ve been doing some work to adapt the WordPress-Plugin-Skeleton repo by Ian Dunn of Automattic (check out his presentation on WordPress plugin MVC – good stuff). My repo is arswright/wordpress-plugin-skeleton though, unfortunately, I’m too wrapped up in my own plugin dev work (and lurking StackExchange) to finish porting over the dependency injection container, dispatcher, and … Read more

How to stop activation addon if the main plugin is not activated

I found the solution. First of all, I discover that… you cannot use the admin_notices hook inside the activation hook function. More details here Thanks the link above, I found this solution : class MyAddon { const ACTIVATION_ERROR = “foo-activation-error” public function __construct(){ register_activation_hook( __FILE__, array( $this, ‘install’ ) ); if( is_admin() ){ add_action( “admin_init”, … Read more

How developed with version control word press site on shared host? [closed]

You should familiarize yourself with a Version Control System. Most people are using Git these days, however, there are other systems such as Subversion CVS Mercurial And plenty of others. The way I typically see WordPress projects in Version Control is the following: Everything in your /wp-content/ should be in your repository Things like wp-config.php … Read more

get_option() not returning expected value from plugin

It looks like your serialized settings are corrupted. I created the option mfwp_settings with the value array( ‘test’ => ‘response’ ). When I look at this in the database, the value is stored as a serialized array and looks like this: a:1:{s:4:”test”;s:8:”response”;} Here is a simple debugging function that successfully returns the expected value response … Read more