Giter Site home page Giter Site logo

soderlind / my-permalink-demo Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 39 KB

Demo plugin to show how to implement your custom permalink for your WordPress plugin.

Home Page: http://soderlind.no/wordpress-plugins-and-permalinks-how-to-use-pretty-links-in-your-plugin/

PHP 58.68% JavaScript 41.32%

my-permalink-demo's Introduction

My Permalink Demo

Contributors: PerS
Donate link: http://soderlind.no/donate/
Tags: permalink, rewrite rules, flush_rewrite_rules, generate_rewrite_rules, parse_request, permalink_structure, query_vars, wp_rewrite
Requires at least: 3.4
Tested up to: 4.5
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Demo plugin to show how to add a custom permalink to your plugin

Description

While working on my Read Offline plugin, I wanted to implement permalinks. After intensive googling and reading the WordPress source I thought I'd share my findings.

This commented plugin demonstrates how to implement a custom permalink for your plugin. To test, add the [mypermalink] or [mypermalink val="ipsum"] shortcode to a page or post.

You can view the plugin source at soderlind.no

Installation

  1. Download the plugin and extract the my-permalink-demo.zip
  2. Upload the extracted my-permalink-demo folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the 'Plugins' menu in WordPress

Changelog

1.1.0

1.0.3

  • Tested with WordPress 3.9, bumped version number

1.0.2

  • Thanks to Paul, the plugin now only flushes the rewrite rules when needed.

1.0.1

  • Fixed a bug in my_permalink_url() that gave 404 for blogs in a subdirectory.

1.0.0

  • Initial release

my-permalink-demo's People

Contributors

soderlind avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.