Revision: 31145 Author: tstarling Date: 2008-02-21 10:25:44 +0000 (Thu, 21 Feb 2008)
Log Message: ----------- Hook suggested on IRC.
Modified Paths: -------------- trunk/phase3/includes/Parser.php
Modified: trunk/phase3/includes/Parser.php =================================================================== --- trunk/phase3/includes/Parser.php 2008-02-21 10:06:48 UTC (rev 31144) +++ trunk/phase3/includes/Parser.php 2008-02-21 10:25:44 UTC (rev 31145) @@ -4443,6 +4443,8 @@ $params['frame']['alt'] = $alt; $params['frame']['caption'] = $caption;
+ wfRunHooks( 'ParserMakeImageParams', array( $title, $file, &$params ) ); + # Linker does the rest $ret = $sk->makeImageLink2( $title, $file, $params['frame'], $params['handler'] );
Can someone, who is aware of the discussion behind adding this hook, update docs/hooks.txt please?
Huji wrote:
Revision: 31145 Author: tstarling Date: 2008-02-21 10:25:44 +0000 (Thu, 21 Feb 2008)
Log Message:
Hook suggested on IRC.
Modified Paths:
trunk/phase3/includes/Parser.php
Modified: trunk/phase3/includes/Parser.php
--- trunk/phase3/includes/Parser.php 2008-02-21 10:06:48 UTC (rev 31144) +++ trunk/phase3/includes/Parser.php 2008-02-21 10:25:44 UTC (rev 31145) @@ -4443,6 +4443,8 @@ $params['frame']['alt'] = $alt; $params['frame']['caption'] = $caption;
wfRunHooks( 'ParserMakeImageParams', array( $title, $file, &$params ) );
- # Linker does the rest $ret = $sk->makeImageLink2( $title, $file, $params['frame'],
$params['handler'] );
Can someone, who is aware of the discussion behind adding this hook, update docs/hooks.txt please?
What is there to know? It's one line of code.
-- Tim Starling
Dear Tim,
Almost every hook is run in one line of code. What they exactly do and description of the parameters should be added to the documentation, so that people can understand their usage more easily. That's what I'm thinking.
Best regards,
Hojjat
On Fri, Feb 22, 2008 at 12:27 PM, Tim Starling tstarling@wikimedia.org wrote:
Huji wrote:
Revision: 31145 Author: tstarling Date: 2008-02-21 10:25:44 +0000 (Thu, 21 Feb 2008)
Log Message:
Hook suggested on IRC.
Modified Paths:
trunk/phase3/includes/Parser.php
Modified: trunk/phase3/includes/Parser.php
--- trunk/phase3/includes/Parser.php 2008-02-21 10:06:48 UTC (rev
+++ trunk/phase3/includes/Parser.php 2008-02-21 10:25:44 UTC (rev
@@ -4443,6 +4443,8 @@ $params['frame']['alt'] = $alt; $params['frame']['caption'] = $caption;
wfRunHooks( 'ParserMakeImageParams', array( $title, $file,
&$params ) );
# Linker does the rest $ret = $sk->makeImageLink2( $title, $file,
$params['frame'],
$params['handler'] );
Can someone, who is aware of the discussion behind adding this hook, update docs/hooks.txt please?
What is there to know? It's one line of code.
-- Tim Starling
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wfRunHooks( 'ParserMakeImageParams', array( $title, $file, &$params ) );
What is there to know? It's one line of code.
You need to know what $title, $file and $params are, and where exactly in the process the line of code appears. Sure, anyone can read the code and work that out fairly easily, but the person that just added the hook already knows and can do it without looking it up.
wikitech-l@lists.wikimedia.org