Forums

about Perpetual Upgrade-proof Modifications (3 posts)

  1. olivier280602
    Member
    Posted 2 years ago #

    Hello all,

    I'm quite not sure I'm on the right forum, so please transfer me if not.

    I'd like to create a simple way for me to automatize some repetitive actions I make concerning WordPress.

    i.e., I always modify my login page logo with some pleasant images. It gives me inspiration. The problem is that when I upgrade WordPress, all my little modifications dissapears.
    Could you please give me explanation to do that (I couldn't understand the codex eplanation). I really owuld like someone to just explain me this, so that I can make it myself for other modifications.

    Also, I'd like to automatically install and activate some plugins when I setup a new wordpress blog.

    Thanks for your help,
    Sorry to made it long.

    Lui

  2. apljdi
    Member
    Posted 2 years ago #

    Well, there is no such thing as "Perpetual Upgrade-proof Modifications". It is always possible that what you do will break with the next update, but you can up the odds considerably and make things much easier on yourself by using hooks. The Login/Register/Lost-Password hooks can be found here mixed in with other admin hooks. Here is an example of the kind that makes our graphics people cringe-- it turn the background bright red. Put this in your theme's functions.php.

    function registration_css() {
      echo '<style type="text/css">
      	body.login { background: red; }
       </style>';
    }
    add_action('login_head','registration_css');

    Notice the pattern: 1) Create a function that does what you need then 2) attach it to a WP hook, in this case 'login_head'.

  3. olivier280602
    Member
    Posted 2 years ago #

    I see! Thanks for your help, it will also help me to go further through!

Topic Closed

This topic has been closed to new replies.

About this Topic