<?xml version="1.0"?>
<!--
		Bluefish HTML Editor
		php.bflang2 $Revision: 5532 $

		P15 Olivier Sessink

		This program is free software; you can redistribute it and/or modify
		it under the terms of the GNU General Public License as published by
		the Free Software Foundation; either version 2 of the License, or
		(at your option) any later version.

		This program is distributed in the hope that it will be useful,
		but WITHOUT ANY WARRANTY; without even the implied warranty of
		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
		GNU General Public License for more details.

		You should have received a copy of the GNU General Public License
		along with this program; if not, write to the Free Software
		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-->
<!DOCTYPE bflang [
	<!ENTITY univ "dir,lang,class,id,style,title">
	<!ENTITY evnt "onload,onclick,ondblclick,onmousedown,onmouseup,onmouseover,onmousemove,onmouseout,onkeypress,onkeydown,onkeyup">
	<!ENTITY css-selectors SYSTEM "css-selectors.bfinc">
	<!ENTITY css-rules SYSTEM "css-rules.bfinc">
	<!ENTITY all-javascript SYSTEM "all-javascript.bfinc">
	<!ENTITY JQuery SYSTEM "JQuery.bfinc">
	<!ENTITY all-html SYSTEM "all-html.bfinc">
	<!ENTITY all-php SYSTEM "all-php.bfinc">
	<!ENTITY all-wordpress SYSTEM "wordpress.bfinc">
]>
<bflang name="Wordpress" version="3" contexts="140" matches="8437">
<header>
	<mime type="application/x-wordpress"/>
	<option name="load_reference" default="1"/>
	<option name="load_completion" default="1"/>
	<option name="show_in_menu" default="0"/>
	<option name="load_php_functions" default="1" description="All php functions" />
	<option name="load_wordpress_functions" default="1" description="All wordpress functions" />
	<option name="php_short_open_tag" default="0" />
	<option name="autocomplete_tags" default="1" />
	<option name="Parentheses block_foldable" default="0" description="Allow folding of the Parentheses block" />
	<option name="attribute_string_is_block" default="0" description="Show tag attributes as block"/>
	<option name="javascript_object_methods" default="1" description="Autocomplete Javascript object methods" />
	<option name="autocomplete_PHP_variable" default="1" description="Auto-complete PHP variables" />
	<option name="autocomplete_PHP_function" default="1" description="Auto-complete PHP functions" />
	<option name="sql-in-php-string" default="1" description="scan for sql in php strings" />
	<option name="javascript_css_properties" default="1" description="CSS properties" />
	<option name="autocomplete-html-entities" default="0" description="HTML entities" />
	<option name="JQuery" default="0" description="include JQuery syntax" />
	<highlight name="attribute-string" style="string-no-spell-check" />
	<highlight name="php-block-tag" style="special-value"  />
	<highlight name="string" style="string"   />
	<highlight name="brackets" style="brackets"  />
	<highlight name="php-keyword" style="keyword"  />
	<highlight name="php-value" style="value" />
	<highlight name="php-function" style="function"  />
	<highlight name="php-comment" style="comment"  />
	<highlight name="php-variable" style="variable"  />
	<highlight name="php-string-sql-keyword" style="special-keyword"  />

	<highlight name="html-tag" style="tag"  />
	<highlight name="html-comment" style="comment"  />
	<highlight name="html-entity" style="value"  />
	<highlight name="html-attribute" style="attribute" />
	<highlight name="html-reference-external-tag" style="special-tag" />
	<highlight name="html-table-tag" style="special-tag2" />
	<highlight name="html-form-tag" style="special-tag3" />
	<highlight name="html-deprecated-tag" style="warning" />

	<highlight name="js-keyword" style="keyword"  />
	<highlight name="js-brackets" style="brackets"  />
	<highlight name="js-type" style="type"  />
	<highlight name="js-comment" style="comment"  />
	<highlight name="js-string" style="string"  />
	<highlight name="js-value" style="value"  />
	<highlight name="js-variable" style="variable"  />
	<highlight name="js-function" style="function"  />
	<highlight name="js-property" style="special-function"  />
	<highlight name="js-css-property" style="function" />
	<highlight name="css-html-media" style="special-tag" />
	<highlight name="css-brackets" style="brackets"  />
	<highlight name="css-comment" style="comment" />
	<highlight name="css-html-tag" style="tag"  />
	<highlight name="css-html-classid" style="tag" />
	<highlight name="css-keyword" style="keyword"  />
	<highlight name="css-property" style="special-keyword"  />
	<highlight name="css-draft-property" style="special-tag3" />
	<highlight name="css-string" style="string" />
	<highlight name="css-value" style="value"   />
	<highlight name="css-pseudo-element" style="keyword" />
	<highlight name="css-operator" style="operator" />
</header>
<properties>
	<comment id="cm.htmlcomment" type="block" start="&lt;!--" end="--&gt;" />
	<comment id="cm.cblockcomment" type="block" start="/*" end="*/" />
	<comment id="cm.cpplinecomment" type="line" start="//" />
	<comment id="cm.scriptcomment" type="line" start="#" />
	<smartindent characters="{" />
	<smartoutdent characters="{" />
	<default_spellcheck enabled="1" />
	<auto_re_use_attributes enabled="1" />
</properties>
<definition>
<context symbols="&gt;&lt;&amp;; &#9;&#10;&#13;/">


&all-html;

<group class="php_short_open_tag">
<element id="e.php.short.open" pattern="&lt;(\?|\?php)" is_regex="1" starts_block="1" highlight="php-block-tag">
<context symbols="'&#34;(){}[];#:.,/?!$^*-+=&gt;&lt;&amp; &#9;&#10;&#13;">
&all-wordpress;
&all-php;
<element id="e.php.short.lbrace" pattern="{" starts_block="1" highlight="brackets" />
<element pattern="}" ends_block="1" blockstartelement="e.php.short.lbrace" highlight="brackets" />
<element id="e.php.short.lbracket" pattern="[" starts_block="1" highlight="brackets" />
<element pattern="]" ends_block="1" blockstartelement="e.php.short.lbracket" highlight="brackets" />
<element id="e.php.short.lparen" pattern="(" starts_block="1" highlight="brackets" block_name="Parentheses block" />
<element pattern=")" ends_block="1" blockstartelement="e.php.short.lparen" highlight="brackets" />
<element id="e.php.short.lcomment" pattern="/*" starts_block="1" highlight="php-comment">
	<context symbols="*/&#9;&#10;&#13;" highlight="php-comment">
		<element pattern="*/" ends_block="1" blockstartelement="e.php.short.lcomment" highlight="php-comment" ends_context="1" />
	</context>
</element>
<element id="e.php.short.variable" pattern="$[a-zA-Z_][a-zA-Z0-9_]*" is_regex="1" case_insens="1" highlight="php-variable"/>
<element pattern="&#34;" highlight="string">
	<context symbols="\&#34;$ &#9;&#10;&#13;' -&lt;&gt;{}[]" highlight="string">
		<element pattern="\\." highlight="string" is_regex="1" />
		<element pattern="\$" highlight="string" />
		<element idref="e.php.short.variable" />
		<group class="sql-in-php-string" highlight="php-string-sql-keyword" case_insens="1">
			<element pattern="SELECT" />
			<element pattern="FROM" />
			<element pattern="WHERE" />
			<element pattern="ON" />
			<element pattern="AS" />
			<element pattern="ORDER" />
			<element pattern="LEFT" />
			<element pattern="INNER" />
			<element pattern="JOIN" />
			<element pattern="UPDATE" />
			<element pattern="INSERT" />
			<element pattern="DELETE" />
		</group>
		<element pattern="&#34;" highlight="string" ends_context="1" />
	</context>
</element>
<element pattern="//" highlight="php-comment">
	<context id="c.php.short.linecomment" symbols="?&gt;&#10;&#13;" highlight="php-comment">
<!-- dos has \r\n -> we should never end a pattern between these two chars  -->
		<element pattern="(&#10;|&#13;|&#13;&#10;)" is_regex="1" ends_context="1" />
		<element pattern="?&gt;" ends_context="2" ends_block="1" blockstartelement="e.php.short.open" highlight="php-block-tag" />
	</context>
</element>
<!-- there is a bug in the scanning engine such that a regex style pattern like (#|//) won't work. The reason is that
there is special code if a pattern ends on a symbol. That code fails on the above pattern because both # and / are ends
for this pattern and both of them are a symbol. That's why we have a separate entry for # and for // -->
<element pattern="#" highlight="php-comment">
	<context idref="c.php.short.linecomment"/>
</element>
<element pattern="?&gt;" ends_block="1" blockstartelement="e.php.short.open" highlight="php-block-tag" ends_context="1" />
</context></element>
</group>
<group notclass="php_short_open_tag">
<element id="e.php.open" pattern="&lt;?php" starts_block="1" highlight="php-block-tag">
<context symbols="'&#34;(){}[];#:.,/?!$^*-+=&gt;&lt;&amp; &#9;&#10;&#13;">
<!-- unfortunately we cannot refer the context as previously used, because if option php_short_open_tag
was disabled, this whole section is not parsed by the language manager, so the context does not yet exist..  -->
&all-wordpress;
&all-php;
<element id="e.php.lbrace" pattern="{" starts_block="1" highlight="brackets" />
<element pattern="}" ends_block="1" blockstartelement="e.php.lbrace" highlight="brackets" />
<element id="e.php.lbracket" pattern="[" starts_block="1" highlight="brackets" />
<element pattern="]" ends_block="1" blockstartelement="e.php.lbracket" highlight="brackets" />
<element id="e.php.lparen" pattern="(" starts_block="1" highlight="brackets" />
<element pattern=")" ends_block="1" blockstartelement="e.php.lparen" highlight="brackets" />
<element id="e.php.lcomment" pattern="/*" starts_block="1" highlight="php-comment">
	<context symbols="*/&#9;&#10;&#13;" highlight="php-comment">
		<element pattern="*/" ends_block="1" blockstartelement="e.php.lcomment" highlight="php-comment" ends_context="1" />
	</context>
</element>
<element id="e.php.variable" pattern="$[a-zA-Z_][a-zA-Z0-9_]*" is_regex="1" case_insens="1" highlight="php-variable"/>
<element pattern="&#34;" highlight="string">
	<context symbols="\&#34;$ &#9;&#10;&#13;' -&lt;&gt;{}[]" highlight="string">
		<element pattern="\\." highlight="string" is_regex="1" />
		<element pattern="\$" highlight="string" />
		<element idref="e.php.variable" />
		<group class="sql-in-php-string" highlight="php-string-sql-keyword" case_insens="1">
			<element pattern="SELECT" />
			<element pattern="FROM" />
			<element pattern="WHERE" />
			<element pattern="ON" />
			<element pattern="AS" />
			<element pattern="ORDER" />
			<element pattern="LEFT" />
			<element pattern="INNER" />
			<element pattern="JOIN" />
			<element pattern="UPDATE" />
			<element pattern="INSERT" />
			<element pattern="DELETE" />
		</group>
		<element pattern="&#34;" highlight="string" ends_context="1" />
	</context>
</element>
<element pattern="//" highlight="php-comment">
	<context id="c.php.linecomment" symbols="?&gt;&#10;&#13;" highlight="php-comment">
		<element pattern="(&#10;|&#13;|&#13;&#10;)" is_regex="1" ends_context="1" />
		<element pattern="?&gt;" ends_context="2" ends_block="1" blockstartelement="e.php.open" highlight="php-block-tag" />
	</context>
</element>
<!-- there is a bug in the scanning engine such that a regex style pattern like (#|//) won't work. The reason is that
there is special code if a pattern ends on a symbol. That code fails on the above pattern because both # and / are ends
for this pattern and both of them are a symbol. That's why we have a separate entry for # and for // -->
<element pattern="#" highlight="php-comment">
	<context idref="c.php.linecomment"/>
</element>
<element pattern="?&gt;" ends_block="1" blockstartelement="e.php.open" highlight="php-block-tag" ends_context="1" />
</context></element>
</group>

</context>
</definition>
</bflang>