__( 'Check that the bar is switched on in the list, that the display rules and the schedule fit the page, and that you did not close it yourself (closed bars stay hidden for the days set in the Appearance tab — try a private window). If you use page caching, clear the cache after changes.', 'runline' ), __( 'The bar is under the header of my theme', 'runline' ) => __( 'Switch on "Move a fixed (sticky) header of the theme below the top bars" in Runline → Settings, or put the bar into the header with the block or the Elementor widget.', 'runline' ), __( 'How do I put a bar into a page or a column?', 'runline' ) => __( 'Set Display → Where to "Only where I put the shortcode", then add the Runline bar block, the Runline bar Elementor widget, or the shortcode below. The bar takes the width of that place.', 'runline' ), __( 'How do I move my bars to another site?', 'runline' ) => __( 'Click Export in the list of bars and Import on the other site. Imported bars are switched off, so you can check them first.', 'runline' ), ); ?>

[runline id="123" width="320" radius="8" size="13"]

$answer ) : ?>

Dayslot

' . esc_html__( 'Runline adds announcement bars to the site. Here is what it stores and shows; copy what fits your site.', 'runline' ) . '

' . '

' . esc_html__( 'Suggested text:', 'runline' ) . ' ' . esc_html__( 'When you subscribe with the form in an announcement bar, we keep your e-mail address, the date and the bar you used. If the form is connected to an e-mail service (Mailchimp, MailerLite or Brevo), your address is also sent to that service.', 'runline' ) . '

' . '

' . esc_html__( 'We count how many times each announcement bar is shown and clicked, per day. These numbers contain no cookies, no IP addresses and nothing that identifies you. To count a view only once, your browser keeps a note for the length of your visit (session storage).', 'runline' ) . '

' . '

' . esc_html__( 'A bar can remember in your browser that you closed it, so it stays hidden.', 'runline' ) . '

' . '

' . esc_html__( 'If the "Recent orders" messages are on, the bar shows recent orders of our shop: the product, how long ago, and — as set by us — the first letter of the first name, the first name, or the city of the buyer.', 'runline' ) . '

'; wp_add_privacy_policy_content( 'Runline', wp_kses_post( $text ) ); } ); /* Links in the list of plugins. */ add_filter( 'plugin_row_meta', function ( $links, $file ) { if ( plugin_basename( RUNLINE_FILE ) === $file ) { $links[] = '' . esc_html__( 'Help', 'runline' ) . ''; $links[] = '' . esc_html__( 'Support', 'runline' ) . ''; $links[] = '' . esc_html__( 'Rate Runline ★★★★★', 'runline' ) . ''; } return $links; }, 10, 2 ); /** * When Runline was first used here (for the review request). Set on activation, or now for older installs. */ function runline_installed_at() { $time = (int) get_option( 'runline_installed' ); if ( ! $time ) { $time = time(); update_option( 'runline_installed', $time, false ); } return $time; } add_action( 'runline_install', function () { runline_installed_at(); set_transient( 'runline_welcome', 1, DAY_IN_SECONDS ); } ); /** * Which notice an admin sees now: "welcome" (after activation, until a bar is made or the notice is closed), * "review" (two weeks after the start, with a bar switched on) or "". * * @param string $screen ID of the admin screen. */ function runline_notice_now( $screen ) { if ( ! current_user_can( 'manage_options' ) || ( 'toplevel_page_' . RUNLINE_PAGE === $screen && isset( $_GET['bar'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- only reads which screen this is. return ''; } $user = get_current_user_id(); if ( 'plugins' === $screen && get_transient( 'runline_welcome' ) && ! get_user_meta( $user, 'runline_welcome_done', true ) ) { $bars = get_posts( array( 'post_type' => RUNLINE_POST_TYPE, 'post_status' => 'any', 'posts_per_page' => 1, 'fields' => 'ids', ) ); if ( ! $bars ) { return 'welcome'; } } // Screens of Runline (the IDs of sub-pages start with the translated menu name, so only the slug is checked). if ( 'toplevel_page_' . RUNLINE_PAGE !== $screen && ! preg_match( '/_page_runline-(settings|help|subscribers)$/', $screen ) ) { return ''; } $later = (int) get_user_meta( $user, 'runline_review_later', true ); if ( get_user_meta( $user, 'runline_review_done', true ) || $later > time() || time() - runline_installed_at() < 14 * DAY_IN_SECONDS ) { return ''; } $on = get_posts( array( 'post_type' => RUNLINE_POST_TYPE, 'post_status' => 'publish', 'posts_per_page' => 1, 'fields' => 'ids', 'meta_key' => RUNLINE_ACTIVE_META, // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key 'meta_value' => '1', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value ) ); return $on ? 'review' : ''; } add_action( 'admin_notices', function () { $screen = get_current_screen(); $notice = $screen ? runline_notice_now( $screen->id ) : ''; if ( ! $notice ) { return; } $answer = function ( $choice ) { return wp_nonce_url( add_query_arg( array( 'action' => 'runline_notice', 'choice' => $choice, ), admin_url( 'admin-post.php' ) ), 'runline_notice' ); }; if ( 'welcome' === $notice ) { ?>