PO::read_line() public WP 1.0
{} It's a method of the class: PO{}
No Hooks.
Return
true|false
. Null. Nothing.
Usage
$PO = new PO(); $PO->read_line( $f, $action );
- $f(resource) (required)
- -
- $action(string)
- -
Code of PO::read_line() PO::read line WP 5.7
function read_line( $f, $action = 'read' ) {
static $last_line = '';
static $use_last_line = false;
if ( 'clear' === $action ) {
$last_line = '';
return true;
}
if ( 'put-back' === $action ) {
$use_last_line = true;
return true;
}
$line = $use_last_line ? $last_line : fgets( $f );
$line = ( "\r\n" === substr( $line, -2 ) ) ? rtrim( $line, "\r\n" ) . "\n" : $line;
$last_line = $line;
$use_last_line = false;
return $line;
}