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