WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 8 months ago

#11093 accepted enhancement

allow instalation customisation - code included and tested

Reported by: thomask Owned by: sorich87
Milestone: Future Release Priority: normal
Severity: minor Version: 2.9.1
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

Current Wordpress can have own instalation using instal.php file in /wp-content folder. The problem is, that this file can ovewrite only wp_install a wp_install_default functions, which are run AFTER both whole setup-config.php and install.php files were run. So e.g. it is not possible to add own logo to the instalation script, own input for e.g. predefining blog description ...

I have made very small changes to the install.php file
a) add if ( !function_exists( ... ) ) before all (2) functions in this file
b) create 'check_blog_installed' function as enclosure for part with blog checking with !function_exist check again, so it can be also owerwritten
c) create step_0, step_1, step_2 functions, and adding content of code parts run when $step = 0 or 1 or 2, again with !function_exist, so every step can be simply ovewritten
d) create display_footer with !function_exist check and move footer to it, so even footer can be overwritten.

I have made no other functions to install.php (even i think it should be revised because of not so nice code as other wordpress) because i think it should be next step

the functions i have created should not be a problem, as they are only in scope of instal.php file

Attachments (3)

install.php (6.4 KB) - added by thomask 4 years ago.
new install.php file - replacement for /wp-admin/install.php (previous one miss global $wpdb by mistake))
ticket11093.diff (2.1 KB) - added by thomask 4 years ago.
Diff solving ticket #11093 from version 2.9.1 wp-admin/install.php
11093.patch (10.3 KB) - added by sorich87 4 years ago.
Here is a new patch

Download all attachments as: .zip

Change History (12)

comment:1 thomask4 years ago

ups, wrong formating and typo. Should be:

...
I have made very small changes to the install.php file

  1. add if ( !function_exists( ... ) ) before all (2) functions in this file
  2. create 'check_blog_installed' function as enclosure for part with blog checking with !function_exist check again, so it can be also owerwritten
  3. create step_0, step_1, step_2 functions, and adding content of code parts run when $step = 0 or 1 or 2, again with !function_exist, so every step can be simply ovewritten
  4. create display_footer with !function_exist check and move footer to it, so even footer can be overwritten.

...I have made no other changes to install.php...

thomask4 years ago

new install.php file - replacement for /wp-admin/install.php (previous one miss global $wpdb by mistake))

comment:2 follow-up: scribu4 years ago

You should really use svn to generate a diff file.

See http://core.trac.wordpress.org/wiki#HowtoSubmitPatches

comment:3 in reply to: ↑ 2 thomask4 years ago

Replying to scribu:

You should really use svn to generate a diff file.

See http://core.trac.wordpress.org/wiki#HowtoSubmitPatches

I know, sorry, but I am probably dumb or old-mind, never been playing with Trac and diffs

comment:4 thomask4 years ago

  • Milestone changed from Unassigned to 2.9.2
  • Priority changed from high to normal
  • Resolution set to fixed
  • Status changed from new to closed
  • Version changed from 2.8.5 to 2.9.1

I have created diff to actual 2.9.1 version. I have never done it, so please someone to review it.

thomask4 years ago

Diff solving ticket #11093 from version 2.9.1 wp-admin/install.php

comment:5 thomask4 years ago

  • Keywords has-patch needs-testing added

comment:6 dd324 years ago

  • Keywords install customisation removed
  • Milestone changed from 2.9.2 to 3.0
  • Resolution fixed deleted
  • Status changed from closed to reopened

Tickets are closed upon code being commited to Trunk.

Setting milestone to 3.0 pending patch review & dev thoughts.

comment:7 dd324 years ago

Could you perhaps upload a Unified Diff, for example, from the output of Svn Diff? It'll make the changes much easier to review.

http://funcdoc.wordpress.com/2008/01/21/how-to-patch-the-wordpress-core/

Last edited 8 months ago by dd32 (previous) (diff)

comment:8 nacin4 years ago

  • Keywords needs-patch added; has-patch needs-testing removed
  • Milestone changed from 3.0 to Future Release

Punting pending proper patch.

sorich874 years ago

Here is a new patch

comment:9 sorich874 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to sorich87
  • Status changed from reopened to accepted
Note: See TracTickets for help on using tickets.