| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | if ( ! defined( 'ABSPATH' ) ) { |
| 14: | exit; |
| 15: | } |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | |
| 26: | function epl_plugin_action_links( $links, $file ) { |
| 27: | $settings_link = '<a href="' . admin_url( 'admin.php?page=epl-settings' ) . '">' . esc_html__( 'General Settings', 'easy-property-listings' ) . '</a>'; |
| 28: | if ( 'easy-property-listings/easy-property-listings.php' === $file ) { |
| 29: | array_unshift( $links, $settings_link ); |
| 30: | } |
| 31: | |
| 32: | return $links; |
| 33: | } |
| 34: | add_filter( 'plugin_action_links', 'epl_plugin_action_links', 10, 2 ); |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: | |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | |
| 45: | function epl_plugin_row_meta( $input, $file ) { |
| 46: | if ( 'easy-property-listings/easy-property-listings.php' !== $file ) { |
| 47: | return $input; |
| 48: | } |
| 49: | |
| 50: | $links = array( |
| 51: | '<a href="' . admin_url( 'index.php?page=epl-getting-started' ) . '">' . esc_html__( 'Getting Started', 'easy-property-listings' ) . '</a>', |
| 52: | '<a href="https://www.easypropertylistings.com.au/extensions/?utm_source=plugins-page&utm_medium=plugin-row&utm_campaign=admin">' . esc_html__( 'Add Ons', 'easy-property-listings' ) . '</a>', |
| 53: | ); |
| 54: | |
| 55: | $input = array_merge( $input, $links ); |
| 56: | |
| 57: | return $input; |
| 58: | } |
| 59: | add_filter( 'plugin_row_meta', 'epl_plugin_row_meta', 10, 2 ); |
| 60: | |