WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 2 years ago

#11093 closed enhancement (wontfix)

allow instalation customisation - code included and tested

Reported by: thomask Owned by: sorich87
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Upgrade/Install Keywords: has-patch needs-testing needs-refresh
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 8 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 8 years ago.
Diff solving ticket #11093 from version 2.9.1 wp-admin/install.php
11093.patch (10.3 KB) - added by sorich87 7 years ago.
Here is a new patch

Download all attachments as: .zip

Change History (13)

#1 @thomask
8 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...

@thomask
8 years ago

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

#2 follow-up: @scribu
8 years ago

You should really use svn to generate a diff file.

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

#3 in reply to: ↑ 2 @thomask
8 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

#4 @thomask
8 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.

@thomask
8 years ago

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

#5 @thomask
8 years ago

  • Keywords has-patch needs-testing added

#6 @dd32
8 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.

#7 @dd32
8 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 4 years ago by dd32 (previous) (diff)

#8 @nacin
8 years ago

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

Punting pending proper patch.

@sorich87
7 years ago

Here is a new patch

#9 @sorich87
7 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to sorich87
  • Status changed from reopened to accepted

#10 @chriscct7
2 years ago

  • Keywords needs-testing needs-refresh added
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Severity changed from minor to normal
  • Status changed from accepted to closed
  • Version changed from 2.9.1 to 2.9

Given the lack of activity/requests here, closing as wontfix

Note: See TracTickets for help on using tickets.