Este plugin não foi testado com as 3 últimas grandes versões do WordPress. Pode já não ser suportado e pode ter problemas de compatibilidade quando usado com versões mais recentes do WordPress.

Functionality

Descrição

A functionality plugin is a way to separate what you might normally place in a theme’s functions.php file, and put it in a plugin instead. It works the same way as a theme functions.php file, but is separate from the theme and so not affected by theme upgrades, or tied to the theme so you loose all of your functions if you choose to switch themes.

This plugin automates the process of creating a functionality plugin. Simply install and activate this plugin, and your very own functionality plugin will be created for you. You can then edit your functionality plugin and add snippets to it using the quick link in the admin menu.

See this WP Daily post for more information on functionality plugins.

This plugin’s code is available on GitHub. Please feel free to fork the repository and send a pull request. If you find a bug in the plugin, open an issue.

Serbian translation provided by Ogi Djuraskovic from FirstSiteGuide.com.

Ecrãs

  • Editing the functionality plugin in the WordPress plugin editor

Instalação

  1. Upload the functionality directory to the /wp-content/plugins/ directory
  2. Active o plugin no menu Plugins
  3. Visit the ‘Plugins > Edit Functions’ menu in WordPress and enter filesystem credentials if necessary
  4. A functionality plugin will be created for you in wp-content/plugins/functions/functions.php
  5. Use the built-in WordPress file editor to edit your functionality plugin

Enable Styles Feature

  1. To enable the optional CSS styles feature, uncomment that line in the functions file, save the changes, and refresh the page
  2. Visit the new ‘Plugins > Edit Styles’ admin menu and enter filesystem credentials if necessary
  3. A stylesheet file will be created for you in wp-content/plugins/functions/style.css. This file will be automatically loaded on the front-end of your site.
  4. Use the built-in WordPress file editor to edit your stylesheet plugin

This plugin may be removed at any time, and your functionality plugin will remain working and intact. You will, however, loose the quick edit links in the admin menu, and automatic styles loading if that feature is enabled.

Perguntas frequentes

My functionality plugin isn’t working!

First of all, backup all of the code in your functionality plugin. Then deactivate and delete your functionality (it will have the same name as your site). To recreate the functionality plugin, visit the ‘Edit Functions’ link in the WordPress admin menu.

Can I get rid of this plugin once my functionality plugin has been created?

Sure! Once this plugin has been activated and the functionality plugin created, all it does is create a link in the WordPress admin menu for easily editing the functionality plugin, and include your CSS code on the front-end of your site. If you don’t want this, feel free to delete this plugin.

When would I use this plugin over the Code Snippets plugin?

This plugin is more suited to people who only have a few snippets and prefer editing a file to using a graphical interface. If you have more snippets, and like to be organized, you may feel more at home using the Code Snippets plugin, which I also created.

Isn’t this just like the Pluginception plugin?

Yes, in that they are both a plugin for creating plugins. However, this plugin is a bit more easier to use and specific than Pluginception.

Avaliações

3 Setembro, 2016 1 resposta
Easy to learn and use.
3 Setembro, 2016 2 respostas
Perfect plugin, I discover it thanks to wootheme documentation, it will be very useful the day I need to update my theme. Just a little thing: I’m using WP Editor to improve the quality of my plugin & theme editor, however when i’m editing the new functions.php, the editor isn’t working, I have the original editor from wordpress. Do you know why/how can I make it work? Thanks
3 Setembro, 2016 1 resposta
I suggest this to folks I’m helping all the time who the barrier to write a plugin from scratch seems too high. A nice way to intro people to plugin coding.
Ler todas as 12 avaliações

Contribuidores e programadores

“Functionality” é software de código aberto. As seguintes pessoas contribuíram para este plugin:

Contribuidores

“Functionality” foi traduzido para 2 locales. Obrigado aos tradutores pelas suas contribuições.

Traduza o “Functionality” para o seu idioma.

Interessado no desenvolvimento?

Consulte o código, consulte o repositório SVN, ou subscreva o registo de alterações por RSS.

Registo de alterações

2.0.0

  • Reorganised internal structure of plugin
  • Improved formatting of default file content
  • Moved functionality plugin into its own subdirectory
  • Added feature for creating a CSS stylesheet
  • Improved integration with the WP Filesystem API

1.2.1

  • Fixed bug preventing functionality plugin from being created on plugin activation

1.2.0

  • Updated to use wp_get_current_user() instead of get_currentuserinfo()
  • Updated code structure to use a controller class
  • Added support for the WP Editor plugin

1.1.1

1.1

  • Fixed a spelling error when initializing the class
  • Only initialize the class on plugin activation
  • Move class to separate file
  • Used a more reliable method of functionality plugin activation

1.0

  • Release inicial