Last active
February 1, 2017 13:49
-
-
Save khaledMohammed000/98a7b7745909088d0bdffc1bca40c57c to your computer and use it in GitHub Desktop.
final code for the extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: AMP Nav Links | |
| Version: 0.0.1 | |
| Author: Mohammed Khaled | |
| Author URI: https://ampforwp.com/ | |
| Donate link: https://www.paypal.me/Kaludi/5 | |
| License: GPL2 | |
| */ | |
| // Exit if accessed directly. | |
| if ( ! defined( 'ABSPATH' ) ) exit; | |
| function ampforwp_next() { | |
| // modify the text "next" to whatever you want | |
| return 'next'; | |
| } | |
| function ampforwp_previous() { | |
| // modify the text "previous" to whatever you want | |
| return 'previous'; | |
| } | |
| function ampforwp_custom_modifications() { | |
| add_filter('ampforwp_next_link','ampforwp_next' ); | |
| add_filter('ampforwp_prev_link', 'ampforwp_previous'); | |
| } | |
| add_action('amp_init','ampforwp_custom_modifications'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment