Skip to content

jonpontet/external-links-to-new-window

Repository files navigation

External Links to New Window

This is a plugin for WordPress which, when enabled, will open all links in a new window or tab that are not of the same domain as the WordPress site. It works only on blog post and page content as it makes use of the WordPress the_content filter - this is a core feature of the plugin as it is designed to be as lean and least-cumbersome as possible.

Running the tests

  1. Install PHPUnit
  2. Install WP-CLI
  3. Run the command bin/install-wp-tests.sh wordpress_test username 'password' localhost latest from the plugin root. wordpress_test is the name of the MySQL database that will be created. username the name for the MySQL connection. password the password for the MySQL connection. localhost the host of the MySQL database.
  4. Run the command phpunit to run all the tests

More help if you need it thanks to Smashing Magazine.

Built with

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

Authors

License

This software is licensed under the GNU GENERAL PUBLIC LICENSE - see the LICENSE.md file for details.