Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author AntoineH

    (@antoineh)

    Does this happen when using the prediction page that is created by the plugin? This page should normally display a message to the user about being logged in first.

    Or with the shortcode?

    Thread Starter ARTEFACTOCO

    (@artefactoco)

    Hi,
    using the shortcode… when you use the prediction page from the plugin it works but I need it using shortcode.

    Thnaks.

    Plugin Author AntoineH

    (@antoineh)

    I will have a look at it. Shouldn’t be too hard to fix.

    Plugin Author AntoineH

    (@antoineh)

    If you add the following code to the shortcode_predictionform function in class-football-pool-shortcodes.php (at the top of the function), the same message as on the prediction page appears.

    if ( ! is_user_logged_in() ) {
    	return sprintf( __( 'You have to be a registered user and <a href="%s">logged in</a> to play in this pool.', FOOTBALLPOOL_TEXT_DOMAIN ),
    						wp_login_url(
    							apply_filters( 'the_permalink', get_permalink( get_the_ID() ) )
    						)
    				);
    }

    I will add it to the next version (2.4.0) with an extra option to alter the default text.

    Thread Starter ARTEFACTOCO

    (@artefactoco)

    Great! Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide Prediction Form for Unlogged Users’ is closed to new replies.