$item ) { if ( $item['slug'] === $slug && $i !== $index ) { $taken = true; } } if ( '' === $slug || '' === $url ) { $error = 'A slug and a full destination URL starting with http:// or https:// are required.'; } elseif ( $taken ) { $error = 'That slug is already used by another go link.'; } elseif ( null !== $index && isset( $redirects[ $index ] ) ) { // Keep the click history when the slug changes. if ( $redirects[ $index ]['slug'] !== $slug ) { $wpdb->query( $wpdb->prepare( "UPDATE $clicks SET slug = %s WHERE slug = %s", $slug, $redirects[ $index ]['slug'] ) ); } $redirects[ $index ] = array( 'slug' => $slug, 'url' => $url ); update_option( 'footloom_redirects', $redirects ); } else { $redirects[] = array( 'slug' => $slug, 'url' => $url ); update_option( 'footloom_redirects', $redirects ); } } elseif ( 'delete_redirect' === $action && isset( $redirects[ $index ] ) ) { $wpdb->query( $wpdb->prepare( "DELETE FROM $clicks WHERE slug = %s", $redirects[ $index ]['slug'] ) ); unset( $redirects[ $index ] ); $redirects = array_values( $redirects ); update_option( 'footloom_redirects', $redirects ); } elseif ( 'save_prefix' === $action ) { $prefix = trim( preg_replace( '/[^a-z0-9_\/-]/', '', strtolower( sanitize_text_field( wp_unslash( $_POST['prefix'] ?? '' ) ) ) ), '/' ); if ( '' === $prefix || preg_match( '#^wp-|//#', $prefix ) ) { $error = 'Choose a prefix with letters, numbers, dashes or underscores, like go or out. It can\'t start with wp-.'; } else { update_option( 'footloom_redirect_prefix', $prefix ); } } if ( $error ) { echo '

' . esc_html( $error ) . '

'; } else { echo '

Saved.

'; } } $counts = $wpdb->get_results( $wpdb->prepare( "SELECT slug, COUNT(*) AS total, SUM(created_at > %s) AS week FROM $clicks GROUP BY slug", gmdate( 'Y-m-d H:i:s', time() - 7 * DAY_IN_SECONDS ) ), OBJECT_K ); // phpcs:enable $edit_index = isset( $_GET['edit'] ) && isset( $redirects[ absint( $_GET['edit'] ) ] ) ? absint( $_GET['edit'] ) : null; $form = null !== $edit_index ? $redirects[ $edit_index ] : array( 'slug' => '', 'url' => '' ); $page_url = admin_url( 'admin.php?page=footloom-redirections' ); ?>

Share a go link on your site, in emails, social posts or ads. Footloom counts each click and sends the visitor on to the destination right away.

Your go links

No go links yet. Add your first one below.

$item ) : ?>
Go linkDestinationLast 7 daysAll time
week : 0; ?> total : 0; ?> Edit


The go link will be your-slug. Lowercase letters, numbers, dashes and underscores.

Cancel

Link prefix

Changing the prefix changes every go link. Links you already shared with the old prefix will stop working.