Coder Social home page Coder Social logo

ethitter / external-permalinks-redux Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 3.0 2.41 MB

Allows you to point WordPress objects (posts, pages, custom post types) to a URL of your choosing.

License: GNU General Public License v2.0

PHP 72.02% JavaScript 12.81% Shell 15.17%

external-permalinks-redux's Introduction

External Permalinks Redux

Contributors: ethitter, thinkoomph
Donate link: http://www.thinkoomph.com/plugins-modules/external-permalinks-redux/
Tags: link, redirect, external link, permalink
Requires at least: 3.0
Tested up to: 6.0
Stable tag: 1.3.2
Requires PHP: 5.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Allows you to point WordPress objects (posts, pages, custom post types) to a URL of your choosing.

Description

Allows users to point WordPress objects (posts, pages, custom post types) to a URL of their choosing, which is particularly useful for injecting non-WordPress content into loops. The object appears normally in any loop output, but visitors to the object will be redirected to the specified URL. The plugin also allows you to choose the type of redirect, either temporary (302), or permanent (301).

Through a filter, the External Permalinks Redux meta box can easily be added to custom post types. There is also a function available for use with WordPress' add_meta_box function.

This plugin was originally written for use on WordPress.com VIP. It is inspired by and backwards-compatible with Mark Jaquith's Page Links To plugin, meaning users can switch between plugins without risk of losing any existing external links.

This plugin is translation-ready.

Installation

  1. Upload external-permalinks-redux.php to /wp-content/plugins/.
  2. Activate plugin through the WordPress Plugins menu.

Frequently Asked Questions

How can I add support for my custom post type?

Using the epr_post_types filter, one can modify the default array of object types (post and page) to include additional custom post types or remove the plugin from one of the default post types.

What other filters does this plugin include?

  • epr_meta_key_target - modify the meta key associated with the external URL
  • epr_meta_key_type - modify the meta key associated with the redirect type
  • epr_status_codes - modify array of available status codes used when redirect is issued

Changelog

1.3.2

  • Fix translations when plugin is used with older WordPress versions.

1.3.1

  • Fix translations in block editor.

1.3

  • Introduce block-editor (Gutenberg) sidebar component for supported post types..

1.2

  • Introduce get_redirect_data() method to look up a post ID's redirect.
  • Introduce PHPUnit tests
  • Conform to current VIP Go Coding Standards.

1.1

  • Introduce a filter to change the metabox title for clarity. Does break translation for that string if used.
  • Add additional HTML classes in the metabox to aid customization.
  • Coding standards and PHPDoc cleanup.

1.0.4

  • Implement singleton pattern for instantiation. Thanks batmoo.

1.0.3

  • Increase priority of init action to ensure that the filters it contains are available to other plugins. Thanks batmoo.

1.0.2

  • Add status codes filter. Thanks danielbachhuber.
  • Correct translation string implementation, removing variable name.
  • Miscellaneous cleanup, such as whitespace removal.

1.0.1

  • Add shortcut function for registering meta box on custom post types. This is included as an alternative to the epr_post_types filter discussed in the FAQ.

1.0

  • Initial release in WordPress.org repository.
  • Rewrote original WordPress.com VIP plugin into a class and added support for custom post types.

Upgrade Notice

1.3.2

Fixes translations when plugin is used with older WordPress versions.

1.3.1

Fixes translations in block editor.

1.3

Introduces block-editor (Gutenberg) sidebar component for supported post types.

1.2

Introduces get_redirect_data() method along with unit tests and PHPCS cleanup.

1.0.4

Implements singleton pattern for instantiation. No functional changes are included in this release.

1.0.3

Ensures that filters are available to plugins and themes. Recommended for anyone trying to hook to those filters.

Screenshots

1. The metabox provided for the Classic Editor.

The metabox provided for the Classic Editor.

2. The sidebar plugin provided for the Block Editor.

The sidebar plugin provided for the Block Editor.

external-permalinks-redux's People

Contributors

ethitter avatar danielbachhuber avatar mjangda avatar

Stargazers

wordsauce avatar Luke Cavanagh avatar Jens avatar Joel Kuzmarski avatar Rinat K avatar  avatar  avatar

Watchers

 avatar Signo Creativo avatar  avatar

external-permalinks-redux's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.