post_type ) { include_once AIR_WP_SYNC_PLUGIN_DIR . 'views/header.php'; } } /** * Register admin styles and scripts */ public function register_styles_scripts() { wp_enqueue_style( 'air-wp-sync-admin', plugins_url( 'assets/css/admin-page.css', AIR_WP_SYNC_PLUGIN_FILE ), false, AIR_WP_SYNC_VERSION ); } /** * Show action links on the plugin screen */ public function plugin_action_links( $links ) { return array_merge( $links, array( 'upgrade' => '' . esc_html__( 'Upgrade to pro+ version', 'air-wp-sync' ) . '', ) ); } /** * Add admin notices */ public function add_notices() { // Add notice if some importers have deprecated api keys $deprecated_key_importers = array_filter( Air_WP_Sync_Helper::get_importers(), function ( $importer ) { return strpos( $importer->config()->get( 'api_key' ), 'key' ) === 0; } ); if ( $deprecated_key_importers ) { $list = array_map( function ( $importer ) { return '' . get_the_title( $importer->infos()->get( 'id' ) ) . ''; }, $deprecated_key_importers ); $list = implode( ', ', $list ); /* translators: %s = list of connections using deprecated API keys */ $message = sprintf( __( 'Air WP Sync: The following connections use API Keys that will be deprecated. To benefit from all the features of our plugin in a more secure way, please use a personal access token instead: %s', 'air-wp-sync' ), $list ); echo wp_kses( "

{$message}

", array( 'div' => array( 'class' => array(), ), 'p' => array(), 'strong' => array(), ) ); } } }