Method: Wpxf::DataFile#php_content

Defined in:
lib/wpxf/core/data_file.rb

#php_contentString

Returns the contents of a PHP data file without the surrounding <?php ?> tags.

Returns:

  • (String)

    the contents of a PHP data file without the surrounding <?php ?> tags.



14
15
16
# File 'lib/wpxf/core/data_file.rb', line 14

def php_content
  content.strip.sub(/^<\?php/i, '').sub(/\?>$/i, '')
end