Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 27757

WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins.

6
votes
If you haven't studied up on WordPress's own unit testing tools and how to use them with plugins, I'd recommend that you do that. Here's a tutorial I wrote, to get you started: http://codesymphony.co/ …
answered Jan 16 '14 by J.D.
0
votes
Testing plugin activation/installation and uninstall with the core WordPress test suite can be done more easily and properly with these additional utilities. Their main focus is testing uninstallation …
answered Feb 24 '16 by J.D.
5
votes
The benefit of uninstall.php, and the reason that it was introduced, is that it allows you to isolate your uninstallation code from the rest of your plugin's code. This means that your entire plugin d …
answered Oct 8 '16 by J.D.
2
votes
Blame brings us to #12101, where @westi said this: We also need to hilight that functions should check the capability as well and we ask for it to enforce visibility. The commit, [12914], was pa …
answered Nov 23 '17 by J.D.
1
vote
2answers
When a plugin is uninstalled, it should remove all related data from the site (or network, if on multisite). If a plugin adds tables to the database, for example, it should remove those tables from th …
asked Jul 4 '16 by J.D.
4
votes
When running the PHPUnit tests, WordPress will load the config from wp-tests-config.php instead of wp-config.php. You need to add your database connection details in wp-tests-config.php. And if you u …
answered Sep 28 '15 by J.D.
2
votes
I don't think that you should touch these options. WordPress core already handles this, whether by removing the references to your plugin when it is deleted (as in delete_plugins()), or by being coded …
answered Aug 25 '14 by J.D.
1
vote
As @Even commented, instead of url_to_postid(), you should be using something like this: if ( ! is_single() ) { return; } $post = get_post(); url_to_postid() is a round-about way of getting th …
answered Jun 7 '14 by J.D.
1
vote
Yes, it is possible to add, update and delete data in custom tables with a plugin. When you run your insert_data_into_table() function, what errors do you get?
answered Aug 27 '13 by J.D.
4
votes
The unit tests transform all CREATE TABLE and DROP TABLE queries to CREATE TEMPORARY TABLE and DROP TEMPORARY TALBE, respectively. So in your tearDown the query will attempt to drop temporary tables w …
answered Sep 13 '13 by J.D.
8
votes
The reason the WordPress test bootstrap is loaded at the end is precisely because it loads WordPress: // Load WordPress require_once ABSPATH . '/wp-settings.php'; If you don't hook your function to …
answered May 22 '14 by J.D.
4
votes
Types of tests First, note that "unit testing" in WordPress generally goes beyond unit testing, and is more like functional/integration testing. This is more of a technical difference, but if you und …
answered Dec 19 '16 by J.D.
4
votes
You actually have several questions in there, so I'll answer them one by one: However, if I simply do this on my main plugin file, it doesn't work: add_filter('pre_set_site_transient_update_p …
answered Jun 7 '14 by J.D.
1
vote
So, how to have the flexibility to pass variable into any Wordpress' action/filter and while maintain the flexibility to cancel them later? You could assign the function to one of the class's p …
answered Jul 23 '14 by J.D.
1
vote
WordPress.org does not have any hard requirements for code styles for plugins or themes. In the plugin guidelines, the relevant section is #4, "Keep your code (mostly) human readable." Mainly it is a …
answered Feb 3 '17 by J.D.