WordPress: Plugin Development overriding guide - wordpress

I have been developing plugins for WordPress. Most plugin I have developed with two three classes and not so huge like Buddypress, WooCommerce or etc.
I am planning to make two open source plugins to deliver some sort of complex system (detail can't share you at the moment but later during the development) where other developers can customize functions and system for them need same as Buddypress and WooCommerce.
As I check those plugins files and realize they have register them own action and filters which developers can modify as per them need. But my problem is unable to understand completely how I should write the plugin where other developer have flexibility to override plugin function as well as they can add them own.
I know it is difficult to give definite answer but I need some sort of start-up guide so I can go into right direction. Do I need to register my action and filters? If yes how to do? if not than how can I do?
Your hint will help me a lot... Thanks a lot

You can check WordPress-Plugin-Boilerplate, it should get you started on the right path.

It may be useful to use wp-cli for generate plugin like so:
wp scaffold plugin my-plugin
Or using "WordPress Plugin Boilerplate" for more complex works: https://wpbp.github.io/wiki.html

Related

I need a WordPress plugin that can create an IDE for codes to run on my website

I have a WordPress site, and I teach python on it and I want to share some code on it. I want a code editor that users can see my code and run it.
Please if you know any plugin that can do this help me.
I really do not think that there is such kind of a plugin available as of now. However, you can always search for such a plugin inside the official WordPress plugin repository.
Still, my recommendation would be to consider building your custom website ( not based on WordPress at all ) in order to achieve that using a different application or framework that has already developed a tool for that purpose.

Themecheck plugin showing an error about Kirki(wordpress framework) text domain

I am using Kirki framework to develop a WordPress theme. After completing the theme I tested my theme using theme check plugin. It throws an error
More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs.
The domains found are myTheme, kirki.
I ignored this issue and submitted my theme to themeforest.net but the review team asked me o solve this issue. Is there anyway i can solve this issue.
Any help would be appreciated. Thanks in advance ;)
This is the answer which I got from the support person.
Ideally you wouldn't be including kirki in your theme... You can instead require its installation as a plugin. This way your users will also get any future bugfixes and improvements simply by updating the plugin.
If you don't want to do that and insist on including Kirki in your theme, then there's nothing to worry about...
Kirki has a separate implementation for localizations when used inside a theme: https://github.com/aristath/kirki/blob/develop/l10n.php
The WPTRT team is aware of that and in fact the textdomain is whitelisted when submitting a theme in wordpress.org for exactly that reason (hybrid-core is another one that is whitelisted because they both use the same implementation).
You can point this out to the theme reviewer and link to this thread here, if there any more questions from them I would be more than happy to answer them.
If you don't want to do that either, then you can just manually go through the files and change all 'kirki' textdomains to your own.

Getting started with Redux in WordPress

I apologize if this has been asked before, but after doing some research, I could not find any resources answering this specific question of mine.
I'm trying to use the Redux framework in my WordPress theme. I used the builder to get started, which is linked to on the plugin page. I customized my framework there and chose the option of "embed only" (Embed Only: TGM is not used and Redux is embedded within the theme/plugin). I also exported as a custom theme, which uses Underscores. As a result, I now have admin directory inside of my theme, with an "options-init.php" file in it. I've been modifying this file to add my options. Is this right? In the documentation it mentions to look for a sample-config.php file, and to copy that and modify it, but I can't find that anywhere. I want to make sure I'm doing this right before I get too far and find an issue.
Also, how do I make sure the framework stays up to date with the latest security patches? Is it a better idea to install it as a plugin rather than embed it in the theme itself?
Lead dev of Redux Framework here. It is very much a better idea to run Redux via a plugin if you want your users to have security updates.
Another option is to embed redux, but to use TGM to suggest for users to install the plugin. This way your theme is not dependent on Redux, but the moment they install the plugin, that version of Redux will take over.
It's up to you, but the plugin is the way to go.

How much can wordpress be customized? I want to create an Intranet portal but the plugins don't seem to be enough

I tried to use Wordpress plugins including Buddypress to create an intranet portal but it does not include the features that i am looking for. Are there any good free plugins for such purpose?
Start by defining all of the features you want your portal to have. Then search for plugins that offer some or all of them. You may need to use multiple plugins to achieve your goals. Since WordPress is written in PHP, you can create your own plugins and either modify existing templates or create your own templates from scratch. In short, the answer to your question: "How much can WordPress bu customized?", the answer is that it is fully customizable.

How to add custom functionality to WordPress

I am developing a website on the WordPress platform and this is my first time using WordPress.
WordPress offers an estimate of 20% of the entire project scope, this means I have to write code for the remaining 80%
My question is how do I extend the WordPress platform to provide the functionality I require?
Thanks for your responses in advance
Pls remember am a newbie! will appreciate clear and detailed responses
Thanks
It really depends on what you're attempting to achieve, but a good first port of call would be to immerse yourself the details in plug-ins (specifically the "Writing a Plugin" section) and the Plugin API, as this is the easiest way to extend WordPress using the wide variety of hooks that the API provides.
However, it's also quite likely that at least some of the functionality you require has already be created as a 3rd party plug-in, so I thorough check of the currently available plug-ins would most likely pay dividends.
Wordpress has support for plug-ins. Additionally, it's all PHP scripts, so you can modify the core system as needed; however I would highly recommend that you only use plug-ins to extend functionality, as by changing the core system you won't be able to apply security updates.
For more information on plug-ins, read the Wordpress codex, which also contains detailed documentation on all functions available.
In addition to Plugins, which other users have already mentioned as a way to extend Wordpress functionality, you should read about the concept of Child Themes.
Themes in general make up the appearance and some functionality of your Wordpress site. For making your own theme, which you will be doing, it is a good idea to start off with an existing theme and build upon it. The standard Wordpress theme Twentyten is a great starting point, where many issues have already been taken care of.
The changes you add can be pure CSS restyling or much more complex additions.

Resources