WordPress.org

Ready to get started?Download WordPress

Forums

WP Captcha-Free
[resolved] Violates WordPress Plugin Repository Rules (9 posts)

  1. L D
    Member
    Posted 2 years ago #

    WordPress requires all plugins in their repository to give the blog owner control over whether they want to display a "powered by" link or similar. The option is not available in admin.

  2. ClaytonJames
    Member
    Posted 2 years ago #

    Just a footnote;

    Requires WordPress Version: 2.3 or higher
    Compatible up to: 2.8.4
    Last Updated: 2009-7-4 Downloads: 59,839

    Might be something to consider.

    [edit] If you are having good luck with this plugin and want to give it a go, it looks like you can remove the link easily enough. It's in plain text on line 97.
    <p><small><noscript><strong>Please note:</strong> JavaScript is required to post comments.</noscript> <a href="http://wordpresssupplies.com/wordpress-plugins/captcha-free/">Spam protection by WP Captcha-Free</a></small></p>

    Just remove it.

  3. L D
    Member
    Posted 2 years ago #

    *shrug* Just because it's old, doesn't make it right. I would change it for everyone but alas, I don't have access. But it does show that the repository is indeed filled with dead plugins.

  4. L D
    Member
    Posted 2 years ago #

    Here, so that no one may accuse me of any kind of unwillingness to contribute and help fix a plugin to help those who don't know or aren't comfortable with messing with the code, here are the modifications to add a sub-menu to the admin panel giving people an option to give a promo back or not with the added benefit of a div class for styling options. If you want, you can even use it to put different messages for the user to see or, if you're comfortable with coding, you can extend the plugin and easily make changes to those additional options right in the admin panel.

    Add the following right before the ?> at the bottom of captcha-free.php...

    // Hook for adding admin menus
    add_action('admin_menu', 'captcha_free_promo');
    
    // action function for above hook
    function captcha_free_promo() {
        // Add a new submenu under Settings:
        add_options_page(__('WP Captcha-Free','menu-captcha-free'), __('WP Captcha-Free','menu-captcha-free'), 'manage_options', 'captcha-free-settings', 'captcha_free_settings_page');
    }
    
    // captcha_free_settings_page() displays the page content for the settings submenu
    function captcha_free_settings_page() {
    
        //must check that the user has the required capability
        if (!current_user_can('manage_options'))
        {
          wp_die( __('You do not have sufficient permissions to access this page.') );
        }
    
        // variables for the field and option names
        $opt_name = 'captcha-free-promo';
        $hidden_field_name = 'captcha_free_submit_hidden';
        $data_field_name = 'captcha-free-promo';
    
        // Read in existing option value from database
        $opt_val = get_option( $opt_name );
    
        // See if the user has posted us some information
        // If they did, this hidden field will be set to 'Y'
        if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
            // Read their posted value
            $opt_val = $_POST[ $data_field_name ];
    
            // Save the posted value in the database
            update_option( $opt_name, $opt_val );
    
            // Put an settings updated message on the screen
    
    ?>
    <div class="updated"><p><strong><?php _e('settings saved.', 'menu-captcha-free' ); ?></strong></p></div>
    <?php
    
        }
    
        // Now display the settings editing screen
    
        echo '<div class="wrap">';
    
        // header
    
        echo "<h2>" . __( 'WP Captcha-Free Promo Notice Setting', 'menu-captcha-free' ) . "</h2>";
    
        // settings form
    
        ?>
    
    <form name="captcha-free-promo-settings" method="post" action="">
    <input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
    
    <p><?php _e("Promo Message:", 'menu-captcha-free' ); ?>
    <input type="text" name="<?php echo $data_field_name; ?>" value="<?php echo $opt_val; ?>" size="50" />
    </p>
    
    <p>The original message: <a href="http://wordpresssupplies.com/wordpress-plugins/captcha-free/">Spam protection by WP Captcha-Free</a></small></p>
    
    <hr />
    
    <p class="submit">
    <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
    </p>
    
    </form>
    </div>
    
    <?php
    }

    Then, find the following line...

    <p><small><noscript><strong>Please note:</strong> JavaScript is required to post comments.</noscript> <a href="http://wordpresssupplies.com/wordpress-plugins/captcha-free/">Spam protection by WP Captcha-Free</a></small></p>

    and change it to this...

    <p><small><noscript><strong>Please note:</strong> JavaScript is required to post comments.</noscript><div class="captcha-free-promo"><?php print get_option('captcha-free-promo'); ?></div></p>
  5. ClaytonJames
    Member
    Posted 2 years ago #

    *Slow Clap...*

  6. L D
    Member
    Posted 2 years ago #

    Oh, you are just full of tender sarcasm. *rolls eyes*

  7. ClaytonJames
    Member
    Posted 2 years ago #

    Yeah... I think it was just more because of your self-absorbed, presumptuous commentary than your actual intentions though. No worries. I smiled!

    :-)

  8. L D
    Member
    Posted 2 years ago #

    Ah, I see, you're a status quo type of person. Anyone who breaks your comfortable slothful norm is presumptuous and self-absorbed. Funny, I've learned that being presumptuous on programming forums protects one from getting bashed by the "experts"... Not a problem, I fully understand! :)

  9. L D
    Member
    Posted 2 years ago #

    You know what, I take back my last comment. You can see it anyway. I got what I needed and I'm not going to make myself unhappy by trading insults with you. You can keep fanning the flame all you want. I'm out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic