• 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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’.

    Thread Starter olivier280602

    (@olivier280602)

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘about Perpetual Upgrade-proof Modifications’ is closed to new replies.