' . esc_html__( 'Settings', 'ads-for-wp' ) . '', ); return array_merge( $links, $mylinks ); } add_filter( 'plugin_action_links_' . ADSFORWP_PLUGIN_BASENAME, 'adsforwp_action_links' ); /** * Set user defined message on plugin activate */ function adsforwp_admin_notice() { /* Check transient, if available display notice */ if ( get_transient( 'adsforwp_admin_notice_transient' ) ) { echo '

' . esc_html__( 'Thank you for using Ads For WP plugin!', 'ads-for-wp' ) . ' ' . esc_html__( 'Start adding ads', 'ads-for-wp' ) . '

'; /* Delete transient, only display this notice once. */ delete_transient( 'adsforwp_admin_notice_transient' ); } // Feedback notice $activation_date = get_option( 'adsforwp_activation_date' ); $one_day = gmdate( 'Y-m-d', strtotime( '+1 day', strtotime( $activation_date ) ) ); $seven_days = gmdate( 'Y-m-d', strtotime( '+7 day', strtotime( $activation_date ) ) ); $one_month = gmdate( 'Y-m-d', strtotime( '+30 day', strtotime( $activation_date ) ) ); $sixty_days = gmdate( 'Y-m-d', strtotime( '+60 day', strtotime( $activation_date ) ) ); $six_month = gmdate( 'Y-m-d', strtotime( '+180 day', strtotime( $activation_date ) ) ); $one_year = gmdate( 'Y-m-d', strtotime( '+365 day', strtotime( $activation_date ) ) ); $current_date = gmdate( 'Y-m-d' ); $list_of_date = array( $one_day, $seven_days, $one_month, $sixty_days, $six_month, $one_year ); $review_notice_bar_status_date = get_option( 'review_notice_bar_close_date' ); $review_notice_bar_never = get_option( 'adsforwp_review_never' ); if ( in_array( $current_date, $list_of_date ) && $review_notice_bar_status_date != $current_date && $review_notice_bar_never != 'never' ) { echo '

' . esc_html__( 'You have been using the Ads For WP plugin for some time now, do you like it?, If so,', 'ads-for-wp' ) . ' ' . esc_html__( 'please write us a review', 'ads-for-wp' ) . ' ' . '

'; } } add_action( 'admin_notices', 'adsforwp_admin_notice' ); /** * Here, We are adding support forum links, hire us links and review links for our plugin inside plugins list * * @param type $meta_fields * @param type $file * @return string */ function adsforwp_add_plugin_meta_links( $meta_fields, $file ) { if ( ADSFORWP_PLUGIN_BASENAME == $file ) { $plugin_url = 'https://wordpress.org/support/plugin/ads-for-wp'; $hire_url = 'https://ampforwp.com/hire/'; $meta_fields[] = "" . esc_html__( 'Support Forum', 'ads-for-wp' ) . ''; $meta_fields[] = "" . esc_html__( 'Hire Us', 'ads-for-wp' ) . ''; $meta_fields[] = " " . "" . "" . "" . "" . "" . ''; } return $meta_fields; } add_filter( 'plugin_row_meta', 'adsforwp_add_plugin_meta_links', 10, 2 );