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

Plugins are tools to extend the functionality of WordPress. This tag should not be used to mark requests for plugin recommendations, which are off-topic per the FAQ.

1
vote
Sounds like browser prefetching, see WordPress core tickets #12603, #14382, and #20192. Basically, sometimes some browsers see what the next post is, and decide to go ahead and load it while you are …
answered Jun 7 '14 by J.D.
0
votes
Usually, you don't want to do this, as it might inadvertently affect tests that run after the test that creates the data. If there is some data that you need to be available to several of your tests …
answered Aug 4 '17 by J.D.
8
votes
You should not access the database directly, if at all possible. There are two main reasons for this: If the database structure changes (unlikely), your queries may become outdated. Using functions …
answered Sep 4 '13 by J.D.
5
votes
Should you test this? Yes. How should you test this? That depends. There are several different approaches to unit testing WordPress plugins. The one that I prefer and am most familiar with is more … like integration testing. I can't tell from your post whether you are using this approach or not, but I'll answer from this perspective anyway. For my own plugins, I've created a base testcase that …
answered Jan 22 '15 by J.D.
2
votes
The problem is that you aren't declaring $dg_options as global here: define('DG_OPTION_NAME', 'document_gallery'); $dg_options = get_option(DG_OPTION_NAME); During uninstall you aren't in the globa …
answered Mar 8 '14 by J.D.
6
votes
plugin exists in the wp-content/plugins folder, so if you install the plugin that way you'll have to actually have your plugin (or a symlink to it) in the plugins directory. This is a pain, so I usually … remotely, before WordPress is loaded, so that it can then be loaded by WordPress exactly as it normally would "in real life". This does require you to have a symlink to the plugin in the plugins
answered Feb 18 '16 by J.D.
1
vote
This will not be a problem. WordPress doesn't provide plugins with an explicit update hook for this reason: If a plugin is manually updated then this upgrade hook won't fire. The best way to … when it doesn't match the version in your plugin. Many popular plugins use this method. It's definitely the most fool-proof. [From ticket #19681] So, each plugin has to do its own check to see …
answered May 24 '14 by J.D.
0
votes
I define any constants and globals in their own file, and load that both in the main file of the plugin and in uninstall.php. That way all of my globals are organized in a single place. And then I don …
answered Nov 1 '15 by J.D.
4
votes
be testing all of it. But as to what parts you should unit (or integration) test, and what parts you should use acceptance tests for, is a different matter. Currently, for my plugins, I use two …
answered Dec 19 '16 by J.D.
0
votes
You may not have the xdebug PHP extension enabled. When I run the tests without xdebug enabled on PHPUnit 4.8.26, I get this message: Warning: The Xdebug extension is not loaded No cod …
answered Jul 12 '16 by J.D.
4
votes
my plugins' translations, although that last part about checking the UI has intrigued me. Just checking that the translations exist, as you are doing now, doesn't appear to me to provide much benefit …
answered Jul 8 '16 by J.D.
2
votes
What you have discovered is that WordPress is loaded—and all of the actions are called—before the tests run. It is possible to hook into an action when WordPress is loaded, but it has to be done from …
answered Oct 1 '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.