burconsult/Get Joomla language locale for use with Facebook js/fbml etc. on multilingual sites ( PHP)
$lang =& JFactory::getLanguage();
$locales = $lang->getLocale();
$locale = str_replace('-','_',substr($locales[0],0,5)); //This will get you "en_US" etc.
You can use this in Joomla extensions where you need to get the current language locale for example to use with Facebook Connect/Like plugins etc. in the "en_US" format. With facebooj JS, all you have to do is replace the default locale with the resulting variable something like this:
e.src = document.location.protocol +'//connect.facebook.net//all.js';
derebus/AutoComplete functionality to textbox using AJAX autocomplete extender ( Visual Basic)
Imports System.Collections.Generic
Imports System.Web.Services
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Data
<WebService> _
<WebServiceBinding(ConformsTo := WsiProfiles.BasicProfile1_1)> _
<System.Web.Script.Services.ScriptService> _
Public Class AutoComplete
Inherits WebService
Public Sub New()
End Sub
<WebMethod> _
Public Function GetCompletionList(prefixText As String, count As Integer) As String()
If count = 0 Then
count = 10
End If
Dim dt As DataTable = GetRecords(prefixText)
Dim items As New List(Of String)(count)
For i As Integer = 0 To dt.Rows.Count - 1
Dim strName As String = dt.Rows(i)(0).ToString()
items.Add(strName)
Next
Return items.ToArray()
End Function
Public Function GetRecords(strName As String) As DataTable
Dim strConn As String = ConfigurationManager.ConnectionStrings("DatabaseConnectionString").ConnectionString
Dim con As New SqlConnection(strConn)
Dim cmd As New SqlCommand()
cmd.Connection = con
cmd.CommandType = System.Data.CommandType.Text
cmd.Parameters.AddWithValue("@Name", strName)
cmd.CommandText = "Select Name from Test where Name like '%'+@Name+'%'"
Dim objDs As New DataSet()
Dim dAdapter As New SqlDataAdapter()
dAdapter.SelectCommand = cmd
con.Open()
dAdapter.Fill(objDs)
con.Close()
Return objDs.Tables(0)
End Function
End Class
'------------------------------------------------------------------------------
'If u want to use Sessions, u have to change <WebService> _ for
'<WebMethod(EnableSession:=True)> _
'------------------------------------------------------------------------------
'--------------------------ASP.NET CODE ----------------------------------------------------
<asp:TextBox ID="txtName" runat="server" Text='<%#Bind("Name") %>' ></asp:TextBox>
<ajaxToolkit:AutoCompleteExtender runat="server" ID="autoComplete1" TargetControlID="txtName" ServicePath="AutoComplete.asmx" ServiceMethod="GetCompletionList" MinimumPrefixLength="1" CompletionInterval="10" EnableCaching="true" CompletionSetCount="12" />
In this example i am implementing the AutoComplete functionality to textbox using AJAX autocomplete extender, for this we need to create a web service which calls the method to fetch data from database and display results as suggestions for textbox
Andrew Konstantaras/Auto Generation of SQL Insert Statement Columns and Values from Object ( python)
import types
# Andrew Konstantaras
# konsta@speakeasy.org
# 12 May 2008
# Feel free to use with attribution where appropriate. If you find any errors or make any improvements, please make those freely available
# (again, where appropriate).
#
# These functions are designed to make SQL insert statements from user defined objects. An object is passed to the main
# function makeObjInsertStrings along with a tuple of the valid object names and the function will return a 3 value tuple.
# If the object is not an instance of the types listed in the passed tuple of valid object names, the 3 value tuple returned is None, None, None
# If a valid object is returned, the returned tuple contains:
#
# strCols a string of the the attribute names of the object that are of type Boolean, Int, Long,
# Float, StringType, StringTypes, None
# strVals a string of the corresponding values of the above object separated by commas (each string
# surrounded with dblquotes, numbers are not)
# lstExcludedAttrib a list of attributes that were excluded from the list because they were not of a valid type
#
# Current expects a tuple containing all the valid objects.
#
# If the default blnUseParens is set to False, the strCols and strVals will not be surrounded with parens, otherwise
# parens will be included
#
# ***To be implemented****
# I'd like to create code that will identify all the user defined objects that exist at the time this function is called, but
#I kept running into a snags, so I made the list passed parameter with a default of none to allow for the code to be added nicely.
#
# If the default blnGetAllAttrib is set to False, then only valid attributes with values (i.e., empty strings and None not included)
#will appear in the strCols and strVals
def makeObjInsertStrings( obj, tplObjects = None, blnUseParens=True, blnGetAllAttrib=True ):
# Returns a 3 val tuple, the first two of which are strings which can be dropped into a MySQL Insert statement for (1) column names and (2) values
if not tplObjects:
return None, None, None
if isinstance( obj, tplObjects ): #find out what got passed - valid objects must be included in tuple tplObjects
strDblQuote = '"'
lstCols = list()
lstVals = list()
lstExcludedAttrib = list()
dctObj = vars( obj )
lstObjVarNames = dctObj.keys()
if blnGetAllAttrib:
tplValidTypes = ( types.BooleanType, types.FloatType, types.IntType, types.LongType, types.StringType, types.StringTypes, types.NoneType )
for varName in lstObjVarNames:
val = dctObj[ varName ]
if isinstance( val, tplValidTypes ):
lstCols.append( varName )
if val or val == 0:
lstVals.append( dctObj[ varName ] )
else:
lstVals.append('')
else:
lstExcludedAttrib.append( varName )
if blnUseParens:
strCols = joinListItems( lstCols )
strVals = joinListItems( lstVals )
else:
strCols = joinListItems( lstCols, blnUseParens=False )
strCols = joinListItems( lstVals, blnUseParens=False )
strCols = strCols.replace('"', '')
return strCols, strVals, lstExcludedAttrib
else:
print 'No object passed.'
return None, None, None
def getValueStrings( val, blnUgly=True ):
#Used by joinWithComma function to join list items for SQL queries.
#Expects to receive 'valid' types, as this was designed specifically for joining object attributes and nonvalid attributes were pulled.
#If the default blnUgly is set to false, then the nonvalid types are ignored and the output will be pretty, but the SQL Insert statement will
#probably be wrong.
tplStrings = (types.StringType, types.StringTypes )
tplNums = ( types.FloatType, types.IntType, types.LongType, types.BooleanType )
if isinstance( val, tplNums ):
return '#num#'+ str( val ) + '#num#'
elif isinstance( val, tplStrings ):
strDblQuote = '"'
return strDblQuote + val + strDblQuote
else:
if blnUgly == True:
return "Error: nonconvertable value passed - value type: %s" % type(val )
else:
return None
def joinListItems( lstStart, strDelim = ',', strNumDelim='#num#', blnUseParens = True ):
#Replicates the join function associated with arrays in other languages, allowing for strings and numbers to be joined without converting the nums to strings
#Created specifically for SQL Insert Statement generation. Currently only allows for items to be separated by a comma.
#
# ***To be implemented:
# Allow for additional delimiters to join the list items.
if strDelim == ',':
strResult = reduce( joinWithComma, lstStart )
strResult = strResult.replace(strNumDelim+'"', '')
strResult = strResult.replace(strNumDelim, '')
strResult = '(' + strResult + ')'
strResult = strResult.replace('", ")', '", "")')
strResult = strResult.replace(', ",', ', "",')
strResult = strResult.replace('"", ",', '"", "",')
if strResult[0:3] == '(",':
strResult = '("",' + strResult[3:]
if not blnUseParens:
strResult = strResult[1:len(strResult)-1]
return strResult
def joinWithComma( x, y ):
strX = getValueStrings( x )
strY = getValueStrings( y )
if strX:
if strY:
strResult = strX + ', ' + strY
strResult = strResult.replace('""', '"')
else:
strResult = x
else:
if strY:
strResult = y
else:
strResult = ""
return strResult
####Main with simple test
if __name__ == '__main__':
class simple():
def __init__(self):
self.Name = ""
self.Codes = list()
self.NumCodes = 0
self.EntryType = None
self.OtherValue = 0
self.Comment = None
t = simple()
t.Name = "MyName"
t.Comment = ""
t.NumCodes = 1
t.OtherValue = 0
tplObjects = ( simple ) #I've only defined one class, so that's all I'm passing to the makeObjInsertStrings function
strCols, strVals, lstExcluded = makeObjInsertStrings( t, tplObjects )
print 'Columns: %s\nValues: %s' % (strCols, strVals )
print 'List of Attributes ignored:'
for attr in lstExcluded:
print " Name of attribute in t: ", attr, ' - which is of type ', type( eval("t."+attr) )
Automates the creation of SQL INSERT statements for the "simple" attributes in a python object by creating a string of an object's attribute names and a corresponding string of that object's attribute values. Simple attributes are those that are one of the following types: string, int, long, float, boolean, None.
mindshare/WordPress API Code Hints (Auto Completion) for Adobe Dreamweaver ( XML)
<!--
---------------------------------------------------------------
WordPress Code Hinting for Dreamweaver
Version: 0.2.5
$Revision$
$Date$
$Id$
Copyright: Mindshare Studios, Inc.
Contributors:
Damian Taggart
Bryce Corkins
http://mind.sh/are/
Project Home: http://code.google.com/p/wordpress-codehints/
Donate: http://mind.sh/are/donate/
$HeadURL$
Support/bugs: http://code.google.com/p/wordpress-codehints/issues/list
---------------------------------------------------------------
Changelog:
0.2.4 - bugfixes, added query_posts
0.2.4 - bugfix for WP menus
0.2.3 - another bloginfo bugfix
0.2.2 - bloginfo bugfix, combined all "wp..." menus into one
0.2.1 - bugfix added missing DOCTYPE attributes to menu tags
0.2 ~ first release includes API up to WordPress API 3.3.1, ready for external testing, first commit
0.1 ~ first release includes API up to WordPress API 3.3
Usage:
This file provides code hinting (auto-completion) for the
WordPress API in Dreamweaver's code view.
- Step 1 -
Copy this XML file into your Dreamweaver configuration
folder into the appropriate location for your OS, replacing
<USERNAME> with your own username, <VERSION> with your
Dreamweaver version (e.g. 'CS5'), and <LANGUAGE> with your
language code (e.g. 'en_US'): NOTE: On Windows you may need
to enable viewing of hidden folders to find the Dreamweaver
config folder.
Windows XP:
C:\Documents and Settings\<USERNAME>\Application Data\Adobe\Dreamweaver <VERSION>\Configuration\CodeHints
Windows Vista/7:
C:\Users\<USERNAME>\AppData\Roaming\Adobe\Dreamweaver <VERSION>\<LANGUAGE>\Configuration\CodeHints
Macintosh:
<DRIVE>/Users/<USERNAME>/Library/Application Support/Adobe/Dreamweaver <VERSION>/Configuration/CodeHints
- Step 2 -
Start Dreamweaver > go to Edit > Preferences > Code Hints
and make sure the checkbox next to "WordPress Code Hints" is
enabled, press OK to save your changes. That's it!
TODO:
- package as a Dreamweaver extension
- add extract_from_markers(); insert_with_markers();
fix value attributes
add secondary menus -> orderby, etc
add filters/hooks API?
- add variables from codex ($post, $etc)
---------------------------------------------------------------
GNU PUBLIC LICENSE
---------------------------------------------------------------
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 3 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, see http://www.gnu.org/licenses
---------------------------------------------------------------
-->
<codehints xmlns:MMString="http://www.macromedia.com/schemes/data/string/">
<menugroup MMString:name="codehints_wordpressapi" id="CodeHints_WordPressAPI" name="WordPress Code Hints ($Revision$)" enabled="true">
<description>
<![CDATA[ WordPress Code Hinting for Dreamweaver ($Revision$) ]]>
</description>
<function pattern="addslashes_gpc($gpc)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_action($tag, $function_to_add, $priority, $accepted_args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_blog_option($id, $key, $value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_custom_background($header_callback, $admin_header_callback, $admin_image_div_callback)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_custom_image_header($header_callback, $admin_header_callback, $admin_image_div_callback)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_existing_user_to_blog($blog_id, $user_id, $role)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_filter($tag, $function_to_add, $priority, $accepted_args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_magic_quotes($array)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_meta_box($id, $title, $callback, $page, $context, $priority, $callback_args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_new_user_to_blog($blog_id, $user_id, $role)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_object_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_option($name, $value, $deprecated, $autoload)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_ping($post_id, $uri)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_post_meta($post_id, $meta_key, $meta_value, $unique)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_post_type_support($post_type, $supports)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_query_arg($param1, $param2, $old_query_or_uri)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_role($role, $display_name, $capabilities)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_shortcode($tag , $func)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_submenu_page($parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_theme_support($feature)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_user_meta($user_id, $meta_key, $meta_value, $unique)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_user_to_blog($blog_id, $user_id, $role)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_utility_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="admin_notice_feed()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="admin_url($path, $scheme)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="allowed_tags()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="antispambot($emailaddy, $mailto)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="apply_filters($tag, $value, $var)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="attribute_escape($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="author_can($post, $capability)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="auth_redirect()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="avoid_blog_page_permalink_collision()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="backslashit($string)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="balanceTags($text, $force)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="bloginfo($show)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="bloginfo_rss($show)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="body_class($class)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="bool_from_yn($yn)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="cache_javascript_headers()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="calendar_week_mod()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="cancel_comment_reply_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="category_description()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="cat_is_ancestor_of($cat1, $cat2)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="check_admin_referer($action, $query_arg)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="check_ajax_referer($action, $query_arg, $die)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="check_import_new_users()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="check_upload_mimes()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="check_upload_size($file)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="choose_primary_blog()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="clean_pre($matches)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="clean_url($url, $protocols, $context)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comments_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comments_number($zero, $one, $more)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comments_open($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comments_popup_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comments_popup_script()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comments_rss_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comments_template($file, $separate_comments)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_author($comment_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_author_email()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_author_email_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_author_IP()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_author_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_author_rss()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_author_url()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_author_url_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_class($class)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_date('d', $comment_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_excerpt()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_form($args, $post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_form_title()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_ID()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_id_fields()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_reply_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_text($comment_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_text_rss()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_time('d')" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="comment_type()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="confirm_delete_users()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="content_url($path)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="convert_chars($content, $deprecated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="convert_smilies($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="count_many_users_posts($users)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="count_users($strategy)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="count_user_posts($userid)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="create_empty_blog($domain, $path, $weblog_title, $site_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="current_filter()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="current_theme_supports($feature)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="current_time($type, $gmt = 0)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="current_user_can($capability)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="current_user_can_for_blog($blog_id, $capability)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="dashboard_quota()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="date_i18n($dateformatstring, $unixtimestamp, $gmt)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="delete_blog_option($id, $key)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="delete_get_calendar_cache()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="delete_option($name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="delete_post_meta($post_id, $meta_key, $meta_value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="delete_user_meta($user_id, $meta_key, $meta_value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="did_action($tag)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="discover_pingback_server_uri($url, $deprecated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="display_space_usage()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="domain_exists($domain, $path, $site_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_action($tag, $arg)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_action_ref_array($tag, $arg)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_all_pings()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_enclose($content, $post_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_feed()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_feed_atom($for_comments)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_feed_rdf()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_feed_rss()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_feed_rss2($for_comments)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_robots()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_shortcode($content)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_shortcode_tag($m)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="do_trackbacks($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="dynamic_sidebar($index)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="edit_bookmark_link($link, $before, $after, $bookmark)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="edit_comment_link($link, $before, $after)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="edit_post_link($link, $before, $after, $id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="edit_tag_link($link, $before, $after, $tag)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="email_exists($email)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="ent2ncr($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="esc_attr($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="esc_html($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="esc_js($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="esc_textarea($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="esc_url($url, (array) $protocols = null)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="extract_from_markers($filename, $marker)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="fetch_feed($uri)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="filter_SSL($url)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="fix_import_form_size($size)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="fix_phpmailer_messageid($phpmailer)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="force_balance_tags($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="force_ssl_content($force)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="format_code_lang($code)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="format_to_edit($content, $richedit)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="format_to_post($content)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="form_option($option)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="add_cap($role, $cap, $grant)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_cap($role, $cap)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="funky_javascript_fix($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="generic_ping($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_404_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_active_blog_for_user($user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_adjacent_post($in_same_cat, $excluded_categories, $previous)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_admin_url()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_admin_users_for_domain($sitedomain, $path)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_alloptions()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_all_category_ids()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_all_page_ids()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_ancestors($object_id, $object_type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_approved_comments($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_archives_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_archive_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_attached_file($attachment_id, $unfiltered)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_attachment_link($id, $size, $permalink, $icon, $text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_attachment_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_author_feed_link($author_id, $feed)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_author_posts_url($author_id, $author_nicename)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_author_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_avatar($id_or_email, $size, $default, $alt)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blogaddress_by_domain($domain, $path)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blogaddress_by_id($blog_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blogaddress_by_name($blogname)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_bloginfo($show, $filter)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_bloginfo_rss($show)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blogs_of_user($user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blog_count($id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blog_details($blog_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blog_id_from_url($domain, $path)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blog_option($blog_id, $setting , $default)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blog_permalink($_blog_id, $post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blog_post($blog_id, $post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_blog_status($id, $pref)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_bookmark($bookmark, $output, $filter)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_bookmarks($args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_bookmark_field()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_boundary_post($in_same_cat, $excluded_categories, $start)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_calendar($initial, $echo)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_categories($args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_category($category, $output, $filter)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_category_by_path($category_path, $full_match, $output)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_category_by_slug($slug)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_category_feed_link($cat_id, $feed)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_category_link($category_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_category_parents($category, $display_link, $separator, $nice_name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_category_template|get_category_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_cat_ID($cat_name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_cat_name($cat_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_children($args, $output)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_comment($id, $output)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_comments($args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_comments_popup_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_comment_author_rss()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_comment_link($comment, $args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_comment_text($comment_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_currentuserinfo()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_current_blog_id()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_current_site()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_current_site_name($current_site)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_current_theme()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_dashboard_blog()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_date_from_gmt($string, $format)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_date_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_day_link($year, $month, $day)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_dirsize($directory)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_edit_post_link($id, $context)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_enclosed($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_extended($post)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_footer($name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_gmt_from_date()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_header($string)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_header_image()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_header_textcolor()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_home_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_home_url()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_id_from_blogname($name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_lastcommentmodified($timezone)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_lastpostdate($timezone)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_lastpostmodified($timezone)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_last_updated($depreciated, $start, $quantity)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_locale_stylesheet_uri()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_month_link($year, $month)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_most_recent_post_of_user($user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_next_post($in_same_cat, $excluded_categories)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_num_queries()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_option($show, $default)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_page($page_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_paged_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_pages($args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_page_by_path($page_path, $output, $post_type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_page_by_title($page_title, $output, $post_type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_page_children($page_id, $pages)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_page_hierarchy($posts, $parent)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_page_link($id, $leavename, $sample)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_page_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_page_uri($page_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_permalink($id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post($post_id, $output)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_posts($args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_ancestors($post)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_comments_feed_link($post_id, $feed)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_custom($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_custom_keys($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_custom_values($key, $post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_meta($post_id, $key, $single)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_mime_type($ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_permalink()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_status($ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_thumbnail_id()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_type($post)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_type_capabilities($args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_type_labels($post_type_object)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_type_object($post_type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_post_types($args, $output, $operator)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_previous_post($in_same_cat, $excluded_categories)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_profile($field, $user)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_pung($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_query_template($type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_query_var($var)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_role($role)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_search_comments_feed_link($search_query, $feed)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_search_feed_link($search_query, $feed)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_search_form($echo)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_search_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_search_query()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_search_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_shortcode_regex()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_sidebar($name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_single_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_sitestats()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_site_allowed_themes()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_site_option($option, $default , $use_cache)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_site_url($blog_id, $path, $scheme)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_space_allowed()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_stylesheet()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_stylesheet_directory()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_stylesheet_directory_uri()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_stylesheet_uri()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_super_admins()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_tag($tag, $output, $filter)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_tags($orderby, $order, $hide_empty, $exclude, $include, $number, $offset, $fields, $slug, $hierarchical, $search, $name__like)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_tag_link($tag_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_tag_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_taxonomies($args, $output, $operator)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_taxonomy_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_template()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_template_directory()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_template_directory_uri()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_template_part($slug, $name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_term($term, $taxonomy, $output, $filter)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_terms($taxonomies, $args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_term_by($field, $value, $taxonomy, $output, $filter)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_term_children($term, $taxonomy)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_term_link($term, $taxonomy)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_theme($theme)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_themes()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_theme_data($theme_filename)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_theme_mod($name, $default)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_theme_root()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_theme_root_uri()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_author()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_author_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_category($id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_category_by_ID($cat_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_category_rss($type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_content($more_link_text, $stripteaser, $more_file)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_date()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_excerpt($deprecated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_ID()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_post_thumbnail($post_id, $size, $attr)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_tags($id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_tag_list($before, $sep, $after)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_terms($id, $taxonomy)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_term_list($id, $taxonomy, $before, $sep, $after)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_time($d, $post)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_title($ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_the_title_rss()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_to_ping($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_upload_space_available()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_userdata($userid)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_userdatabylogin($user_login)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_usernumposts($userid)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_users($args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_users_of_blog()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_user_count()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_user_id_from_string($string)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_user_meta($user_id, $key, $single)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_user_option($option, $user)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_weekstartend($mysqlstring, $start_of_week)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="get_year_link($year)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="global_terms($term_id, $deprecated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="grant_super_admin($user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="has_action($tag, $function_to_check)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="has_filter($tag, $function_to_check)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="has_nav_menu($location)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="has_post_thumbnail()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="has_tag($tag)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="have_comments()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="header_image()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="header_textcolor()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="home_url($path, $scheme)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="htmlentities2($myHTML)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="human_time_diff($from, $to)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="includes_url($path)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="insert_blog($domain, $path, $site_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="insert_with_markers($filename, $marker, $insertion)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="install_blog($blog_id, $blog_title)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="install_blog_defaults($blog_id, $user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="in_category($category, $_post)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="iso8601_timezone_to_offset($timezone)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="iso8601_to_datetime($date_string, $timezone)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_404()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_admin()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_archive()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_archived()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_attachment()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_author($author)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_blog_installed()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_blog_user($blog_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_category($category)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_comments_popup()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_date()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_day()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_email($email)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_email_address_unsafe($user_email)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_feed()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_front_page()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_home()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_local_attachment($url)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_main_site($blog_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_month()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_new_day()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_page($page)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_paged()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_page_template($template)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_post_type_archive($post_types)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_post_type_hierarchical($post_type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_preview()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_search()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_serialized($data)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_serialized_string($data)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_single($post)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_singular($post_types)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_ssl()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_sticky($post_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_subdomain_install()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_super_admin($user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_tag($slug)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_tax($taxonomy, $term)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_taxonomy_hierarchical($taxonomy)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_time()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_trackback()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_upload_space_available()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_user_logged_in()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_user_member_of_blog()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_user_option_local($key, $user_id, $blog_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_user_spammy($username)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="is_year()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="load_template($_template_file)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="locale_stylesheet()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="locate_template($template_names, $load, $require_once)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="log_app($label, $msg)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="make_clickable($ret)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="map_meta_cap($cap, $user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="maybe_add_existing_user_to_blog()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="maybe_redirect_404()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="maybe_serialize($data)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="maybe_unserialize($original)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="menu_page_url($menu_slug, $echo)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="merge_filters($tag)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="ms_cookie_constants()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="ms_deprecated_blogs_file()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="ms_file_constants()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="ms_not_installed()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="ms_site_check()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="ms_subdomain_constants()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="ms_upload_constants()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="mu_dropdown_languages($lang_files, $current)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="mysql2date($dateformatstring, $mysqlstring, $translate = true)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="newblog_notify_siteadmin($blog_id, $deprecated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="newuser_notify_siteadmin($user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="new_user_email_admin_notice()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="next_comments_link($label, $max_page)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="next_image_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="next_posts_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="next_post_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="nocache_headers()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="page_uri_index()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="paginate_comments_links($args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="permalink_anchor()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="permalink_comments_rss()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="permalink_single_rss($file)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="pingback($content, $post_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="pings_open($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="plugins_url($path, $plugin)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="plugin_basename($file)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="popuplinks($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="posts_nav_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="post_class()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="post_comments_feed_link($link_text, $post_id, $feed)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="post_password_required()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="post_permalink()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="post_type_archive_title($prefix, $display)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="post_type_supports($post_type, $supports)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="preview_theme()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="preview_theme_ob_filter($content)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="preview_theme_ob_filter_callback($matches)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="previous_comments_link($label)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="previous_image_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="previous_posts_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="previous_post_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="privacy_ping_filter($sites)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="recurse_dirsize($directory)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="redirect_mu_dashboard()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="redirect_this_site($deprecated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="redirect_user_to_blog()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="refresh_blog_details($blog_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="refresh_user_details($id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_activation_hook($file, $function)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_deactivation_hook($file, $function)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_nav_menu($location, $description)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_nav_menus($locations)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_post_type($post_type, $args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_setting($option_group, $option_name, $sanitize_callback)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_taxonomy($taxonomy, $object_type, $args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_taxonomy_for_object_type($taxonomy, $object_type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="register_theme_directory($directory)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_accents($string)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_action($tag, $function_to_remove, $priority, $accepted_args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_all_actions($tag, $priority)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_all_filters($tag, $priority)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_all_shortcodes()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_filter($tag, $function_to_remove, $priority, $accepted_args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_meta_box($id, $page, $context)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_post_type_support($post_type, $supports)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_query_arg($key, $query)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_role($role)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_shortcode($tag)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_theme_mod($name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_theme_mods()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="remove_user_from_blog($user_id, $blog_id, $reassign)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="require_if_theme_supports($feature, $include)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="restore_current_blog()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="revoke_super_admin($user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="rss_enclosure()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="sanitize_comment_cookies()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="sanitize_email($email)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="sanitize_file_name($name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="sanitize_title($title, $fallback_title)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="sanitize_title_with_dashes($title)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="sanitize_user($username, $strict)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="search_theme_directories()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="secret_salt_warning()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="seems_utf8($str)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="send_confirmation_on_profile_email()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="settings_fields($option_group)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="set_current_user($id, $name)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="set_post_type($post_id, $post_type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="set_theme_mod($name, $value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="shortcode_atts($pairs , $atts)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="shortcode_parse_atts($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="show_post_thumbnail_warning()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="signup_nonce_check($result)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="signup_nonce_fields()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="single_cat_title()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="single_month_title()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="single_post_title()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="single_tag_title()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="single_term_title()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="site_admin_notice()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="site_url($path, $scheme)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="spawn_cron($local_time)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="status_header($header)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="sticky_class()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="stripslashes_deep($value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="strip_shortcodes($content)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="switch_theme($template, $stylesheet)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="switch_to_blog($new_blog, $validate)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="sync_category_tag_slugs($term, $taxonomy)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="tag_description()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="taxonomy_exists($taxonomy)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="term_description()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="term_exists($term, $taxonomy, $parent)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_attachment_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_author()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_author_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_author_meta()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_author_posts()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_author_posts_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_category()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_category_rss($type)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_content()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_content_rss($more_link_text, $stripteaser, $more_file, $cut, $encode_html)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_date($format, $before, $after, $echo)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_date_xml()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_excerpt()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_excerpt_rss()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_feed_link()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_ID()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_meta()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_modified_author()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_modified_date()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_modified_time()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_permalink()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_post_thumbnail()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_search_query()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_shortlink()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_tags()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_taxonomies()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_terms()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_time()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_title()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_title_attribute()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="the_title_rss()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="trackback($trackback_url, $title, $excerpt, $ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="trackback_url()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="trackback_url_list($tb_list, $post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="trailingslashit($string)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="unregister_nav_menu($location)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="unregister_setting($option_group, $option_name, $sanitize_callback)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="untrailingslashit($string)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_archived($id, $archived)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_attached_file($attachment_id, $file)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_blog_details($blog_id, $details)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_blog_option($id, $key, $value, $depreciated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_blog_public($old_value, $value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_blog_status($blog_id, $pref, $value, $refresh)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_option($option_name, $newvalue)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_option_new_admin_email($old_value, $value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_posts_count($deprecated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_post_meta($post_id, $meta_key, $meta_value, $prev_value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_user_meta($user_id, $meta_key, $meta_value, $prev_value)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_user_option($user_id, $option_name, $newvalue, $global)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="update_user_status($id, $pref, $value, $deprecated)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="upload_is_file_too_big($upload)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="upload_is_user_over_quota($echo)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="upload_size_limit_filter($size)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="upload_space_setting($id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="url_shorten($url)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="username_exists($username)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="users_can_register_signup_filter()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="user_can($user, $capability)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="user_pass_ok($user_login, $user_pass)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="user_trailingslashit()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="utf8_uri_encode($utf8_string, $length)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="validate_current_theme()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="validate_username($username)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="walk_nav_menu_tree()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="weblog_ping($server, $path)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="welcome_user_msg_filter($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wordpressmu_wp_mail_from()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp($query_vars)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpautop($foo, $br)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_activate_signup($key)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_admin_redirect_add_updated_param()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_create_blog($domain, $path, $title, $user_id, $meta, $site_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_create_user($user_name, $password, $email)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_current_site()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_delete_blog($blog_id, $drop)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_delete_user($id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_get_blog_allowedthemes($blog_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_log_new_registrations($blog_id, $user_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_signup_user($user, $user_email, $meta)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_signup_user_notification($user, $user_email, $key, $meta)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_update_blogs_date()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_validate_blog_signup($blogname, $blog_title, $user)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_validate_user_signup($user_name, $user_email)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_welcome_notification($blog_id, $user_id, $password, $title, $meta)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wpmu_welcome_user_notification($user_id, $password, $meta)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wptexturize($text)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_ajaxurl()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_allow_comment($commentdata)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_attachment_is_image($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_category_checklist()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_check_filetype($filename, $mimes)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_check_for_changed_slugs($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_clearcookie()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_clear_scheduled_hook($hook, $args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_count_comments($post_id)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_count_posts($type, $perm)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_create_category($cat_name, $parent)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_create_nonce($action)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_create_user($username, $password, $email)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_cron()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_delete_attachment()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_delete_category($cat_ID)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_delete_comment($attachmentid, $force_delete = false)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_delete_post($postid, $force_delete)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_delete_term($term_id, $taxonomy, $args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_delete_user($id, $reassign)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_die($message, $title, $args)" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_dropdown_categories()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern="wp_dropdown_users()" DOCTYPES="PHP_MySQL" casesensitive="true" />
<function pattern=
This file provides code hinting (auto-completion) for the WordPress API in Dreamweaver's code view. There are currently 1422 functions and keywords from the WordPress API supported!
Grab the latest version from the repo: http://code.google.com/p/wordpress-codehints/
alexeihidalgo/Home / Tricks / How To Automatically add Twitter and Facebook buttons to your posts How To Automatically add Twitter and Faceboo ( PHP)
function share_please($content){
if(!is_feed() && !is_home()) {
$content .= '<div class="share-this">
<a href="<a href="http://twitter.com/share&quot" rel="nofollow">http://twitter.com/share&quot</a>;
class="twitter-share-button"
data-count="horizontal">Tweet</a>
<script type="text/javascript"
src="<a href="http://platform.twitter.com/widgets.js%22%3E%3C/script&gt" rel="nofollow">http://platform.twitter.com/widgets.js"></script&gt</a>;
<div class="facebook-share-button">
<iframe
src="<a href="http://www.facebook.com/" rel="nofollow">http://www.facebook.com/</a><a title="plugins" href="http://wptricks.net/category/plugins/">plugins</a>/like.php?href='.
urlencode(get_permalink($post->ID))
.'&amp;layout=button_count&amp;show_faces=false&amp;width=200&amp;action=like&amp;colorscheme=light&amp;height=21"
scrolling="no" frameborder="0" style="border:none;
overflow:hidden; width:200px; height:21px;"
allowTransparency="true"></iframe>
</div>
</div>';
}
return $content;
}
add_action('the_content', 'share_please');
Wensheng Wang/An ActiveRecord like ORM (object relation mapper) under 200 lines ( python)
# this is storm.py
import string, new, MySQLdb
from types import *
from MySQLdb.cursors import DictCursor
bag_belongs_to, bag_has_many = [],[]
def belongs_to(what): bag_belongs_to.append(what)
def has_many(what): bag_has_many.append(what)
class Mysqlwrapper:
def __init__(self,**kwds):
self.conn = MySQLdb.connect(cursorclass=DictCursor,**kwds)
self.cursor = self.conn.cursor()
self.escape = self.conn.escape_string
self.insert_id = self.conn.insert_id
self.commit = self.conn.commit
self.q = self.cursor.execute
def qone(self,query):
self.q(query)
return self.cursor.fetchone()
def qall(self,query):
self.q(query)
return self.cursor.fetchall()
class MetaRecord(type):
def __new__(cls, name, bases, dct):
global bag_belongs_to, bag_has_many
if name in globals(): return globals()[name]
else:
Record = type.__new__(cls, name, bases, dct)
for i in bag_belongs_to: Record.belongs_to(i)
for i in bag_has_many: Record.has_many(i)
bag_belongs_to = []
hag_has_many = []
return Record
class Storm(dict):
__metaclass__ = MetaRecord
__CONN = None
@classmethod
def belongs_to(cls, what):
def dah(self):
belong_cls = globals().get(what,None)
if not belong_cls:
belong_cls = type(what,(Storm,),{})
return belong_cls.selectone(self[what+'_id'])
setattr(cls,what,new.instancemethod(dah,None,cls))
@classmethod
def has_many(cls, what):
def dah(self):
hasmany_cls = globals().get(what,None)
if not hasmany_cls:
hasmany_cls = type(what,(Storm,),{})
dct={}
dct[string.lower(cls.__name__)+'_id']=self['id']
return hasmany_cls.select(**dct)
setattr(cls,what,new.instancemethod(dah,None,cls))
@classmethod
def conn(cls, **kwds):
if not cls.__CONN: cls.__CONN = Mysqlwrapper(**kwds)
@classmethod
def exe(cls,s):
if not cls.__CONN: raise "Database not connected"
return cls.__CONN.qall(s)
@classmethod
def insert(cls,**kwds):
vs = [[k,cls.__CONN.escape(str(kwds[k]))] for k in kwds]
if vs:
s = "insert into %s (%s) values ('%s')" % (
string.lower(cls.__name__), ','.join([v[0] for v in vs]),
"','".join([v[1] for v in vs]))
cls.__CONN.q(s)
cls.__CONN.commit()
return cls.__CONN.insert_id()
else: raise "nothing to insert"
@classmethod
def select(cls,*args, **kwds):
if len(args)==1 and (type(args[0])==IntType or type(args[0])==LongType):
q = "select * from %s where id='%s'"%(string.lower(cls.__name__),args[0])
where = "where id='%s'"%args[0]
else:
if args: s = ",".join(args)
else: s = "*"
if kwds:
c,limit,orderby = [],'',''
for k in kwds:
if k == 'limit': limit = "limit "+str(kwds[k])
elif k == 'order': orderby = "order by "+str(kwds[k])
else: c.append(k+"='"+str(kwds[k])+"'")
where = " and ".join(c)
if where: where = "where %s"%where
where = "%s %s %s"%(where,orderby,limit)
else: where = ""
q = " ".join(['select',s,'from',string.lower(cls.__name__),where])
r = cls.__CONN.qall(q)
list = []
for i in r:
list.append(cls(i))
list[-1].__dict__['where'] = where
return list
@classmethod
def selectone(cls,*args, **kwds):
r = cls.select(*args,**kwds)
if r: return r[0]
else: return {}
@classmethod
def update(cls,cond,**kwds):
if not cond or not kwds: raise "Update What?!"
if type(cond) == IntType: w = "id='%d'" % cond
else: w = cond
vs = [[k,cls.__CONN.escape(str(kwds[k]))] for k in kwds]
if vs:
s = "UPDATE %s SET %s WHERE %s" % ( string.lower(cls.__name__),
','.join(["%s='%s'"%(v[0],v[1]) for v in vs]), w)
cls.__CONN.q(s)
cls.__CONN.commit()
@classmethod
def delete(cls,id):
if type(id) == IntType:
cls.__CONN.q("delete from %s where id='%d'"%
(string.lower(cls.__name__),id))
cls.__CONN.commit()
else: raise "Only accept integer argument"
def __init__(self,dct={}):
if not self.__class__.__CONN: raise "Database not connected"
dict.__init__(self,dct)
self.__dict__['cur_table']= string.lower(self.__class__.__name__)
self.__dict__['where']= ''
self.__dict__['sql_buff']={}
def sql(self,sql): self.__class__.__CONN.q(sql)
def save(self):
s = ""
if self.where:
f = []
for v in self.sql_buff:
f.append("%s='%s'"%(v,self.sql_buff[v]))
s = "UPDATE %s SET %s %s" % (
self.cur_table, ','.join(f), self.where)
else:
f,i=[],[]
for v in self.sql_buff:
f.append(v)
i.append(self.sql_buff[v])
if f and i:
s = "INSERT INTO %s (%s) VALUES ('%s')" % (
self.cur_table, ','.join(f), "','".join(i))
if s:
self.__class__.__CONN.q(s)
self.__class__.__CONN.commit()
else: raise "nothing to insert"
def __setattr__(self,attr,value):
if attr in self.__dict__: self.__dict__[attr]=value
else:
v = self.__class__.__CONN.escape(str(value))
self.__dict__['sql_buff'][attr] = v
self[attr] = v
def __getattr__(self,attr):
if attr in self.__dict__: return self.__dict__[attr]
try: return self[attr]
except KeyError: pass
raise AttributeError
__all__ = ['Storm', 'belongs_to', 'has_many']
#----------------- end of storm.py ----------------
Below is a session screenshot of using this ORM(Storm):
-------------------------------------------------------------
wang@dapper-03:~/spark/lib$ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 46 to server version: 5.0.22-Debian_0ubuntu6.06-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database teststorm;
Query OK, 1 row affected (0.00 sec)
mysql> use teststorm;
Database changed
mysql> create table author(id int auto_increment primary key,name varchar(50));
Query OK, 0 rows affected (0.06 sec)
mysql> create table book(id int auto_increment primary key,author_id int,title varchar(100));
Query OK, 0 rows affected (0.01 sec)
mysql> describe author;
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(50) | YES | | NULL | |
+-------+-------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
mysql> describe book;
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| author_id | int(11) | YES | | NULL | |
| title | varchar(100) | YES | | NULL | |
+-----------+--------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)
mysql> Bye
wang@dapper-03:~/spark/lib$ python
Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from storm import *
>>> class Author(Storm):
... has_many('book')
...
>>> class Book(Storm):
... belongs_to('author')
...
>>> Storm.conn(user='root',db='teststorm')
>>> a = Author()
>>> a.name = 'Tolstoy'
>>> a.save()
>>> Author.insert(name='Charles Dickens')
0L
>>> a.name, a['name']
('Tolstoy', 'Tolstoy')
>>> o = Author.selectone(2)
>>> o
{'id': 2L, 'name': 'Charles Dickens'}
>>> o.id, o.name, o['id'], o['name']
(2L, 'Charles Dickens', 2L, 'Charles Dickens')
>>> b = Book()
>>> b.author_id = 1
>>> b.title = 'Anna Karenina'
>>> b.save()
>>> b.title = 'War and Peace'
>>> b.save()
>>> b.author_id = 2
>>> b.title = 'Great Expectations'
>>> b.save()
>>> Book.insert(author_id=2,title='A Tale of Two Cities')
0L
>>> Book.insert(author_id=2,title='David Copperfield')
0L
>>> all = Book.select()
>>> all
[{'author_id': 1L, 'id': 1L, 'title': 'Anna Karenina'}, {'author_id': 1L, 'id': 2L, 'title': 'War and Peace'},
{'author_id': 2L, 'id': 3L, 'title': 'Great Expectations'}, {'author_id': 2L, 'id': 4L, 'title':
'A Tale of Two Cities'}, {'author_id': 2L, 'id': 5L, 'title': 'David Copperfield'}]
>>> o = Book.selectone(4)
>>> a = o.author()
>>> a
{'id': 2L, 'name': 'Charles Dickens'}
>>> a = Author.selectone(name='Tolstoy')
>>> a
{'id': 1L, 'name': 'Tolstoy'}
>>> b = a.book()
>>> b
[{'author_id': 1L, 'id': 1L, 'title': 'Anna Karenina'}, {'author_id': 1L, 'id': 2L, 'title': 'War and Peace'}]
>>> b[0].title, b[1].title
('Anna Karenina', 'War and Peace')
>>>
wang@dapper-03:~/spark/lib$
There're quite a few python ORM's. However, most are not easy to use. In Ruby on Rails's ActiveRecord ORM, you don't have to define schema, just specify the relationship like "belongs_to" and "has_many", and ORM do rest of the work, it's very easy to learn and easy to use. This recipe provide a python ORM that behave like ActiveRecord.
rvachere/iPhone View Auto Rotate With View Updates - Header & Implementation ( Objective C)
// Source @ http://www.jailbyte.ca/safari/files/SpinView.zip
//
// UntitledViewController.h
// SpinView
//
// Created by Richard Vacheresse on 10-05-20.
// Copyfright jailByte.ca 2010. Use it anyway you like.
//
#import <UIKit/UIKit.h>
@interface UntitledViewController : UIViewController
{
//-view (the image) used for manipulation by the accelerometer
UIImageView *imageView;
}
@property (nonatomic, retain) UIImageView *imageView;
- (IBAction) actionBtnOne;
@end
---------------------------------------------------------------------------
//
// UntitledViewController.m
//
// SpinView - this is an example of how to deal with the rotation of views via the accelerometer and the
// overridden method shouldAutorotateToInterfaceOrientation. this example uses an image view as the view
// that is being rotated; this imageview is created with the press of a button, the resulting action is to
// simply show the layer in the view. from there you start to spin the device and the updates follow. to reset
// the view you must press the home key and then restart the app; sorry, just too lazy to add anymore.
//
// **note: there is a bug to this solution, and it becomes apparent when using the device and the user rotates
// the phone quickly 180 degrees. i believe it may have something to do with when the floats that are used
// to hold the x and y values are updated while rotating; like it grabs the coordinates while spinnning past 90
// degrees. the next time you rotate the view, the view will correct itself.
//
// Created by Richard Vacheresse on 10-05-20.
// Copyfright jailByte.ca 2010. Use it anyway you like.
//
#import "UntitledViewController.h"
@implementation UntitledViewController
@synthesize imageView;
- (void)viewDidLoad
{
[super viewDidLoad];
//-create a button
UIButton *btnOne = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnOne setTitle: @"btnOne" forState: UIControlStateNormal];
[btnOne setFrame:CGRectMake(0.0f, 0.0f, 105.0f, 55.0f)];
[btnOne setCenter:CGPointMake(160.0f, 55.0f)];
[btnOne addTarget:self action:@selector(actionBtnOne) forControlEvents:UIControlEventTouchUpInside];
//-add it to the display
[self.view addSubview: btnOne];
}
//
// actionBtnOne - initializes a UIImageView, sets the initial properties, add it to the display, then releases it.
//
- (IBAction) actionBtnOne
{
imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];
[imageView setImage:[UIImage imageNamed:@"image.png"]];
[imageView setAutoresizesSubviews: YES];
[self.view addSubview:imageView];
[imageView release];
}
//
// shouldAutorotateToInterfaceOrientation - used to interact with the accelerometer; this is an overriden method.
//
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if ( interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
//-set the center of the image from the dimensions of the display
//-x value is +10 due to status bar
[UIView beginAnimations: nil context: NULL];
[UIView setAnimationDuration: 0.25];
CGFloat x = self.view.bounds.size.height / 2 + 10;
CGFloat y = self.view.bounds.size.width / 2;
CGPoint center = CGPointMake( x, y);
[imageView setCenter: center];
[UIView commitAnimations];
[UIView beginAnimations: nil context: NULL];
[UIView setAnimationDuration: 0.25];
//-this will keep it in the same position - always standing up
//CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI / 0.5);
//this will keep it standing up as in portrait however it will turn it upsidedown
//CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI / 1.0);
//this will change the view to be upside-down but in proper alignment with the landscape mode
//CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI / 2.0);
//this will change the view to be rightside-up in proper alignment with landscape mode
CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI / -2.0);
imageView.transform = transform;
[UIView commitAnimations];
}
else
{
//-set the center of the image from the dimensions of the display
//-x value is +10 due to status bar
[UIView beginAnimations: nil context: NULL];
[UIView setAnimationDuration: 0.25];
CGFloat x = self.view.bounds.size.height / 2 + 10;
CGFloat y = self.view.bounds.size.width / 2;
CGPoint center = CGPointMake( x, y);
[imageView setCenter: center];
[UIView commitAnimations];
[UIView beginAnimations: nil context: NULL];
[UIView setAnimationDuration: 0.25];
CGAffineTransform move = CGAffineTransformMakeTranslation(0.0f, 0.0f);
imageView.transform = move;
CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI * 2);
imageView.transform = transform;
[UIView commitAnimations];
}
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
}
- (void)dealloc
{
[imageView release];
[super dealloc];
}
//-the
@end
this was just an exercise to learn about updating a UIImageView to the desired orientation;the accelerometer was used to detect the movements through the overridden method shouldAutorotateToInterfaceOrientation. wurd.
Jamie/Round Large Numbers to a Letter Abbreviation eg: 25,000 to 25K ( PHP)
function abbr_number($size) {
$size = preg_replace('/[^0-9]/','',$size);
$sizes = array("", "K", "M");
if ($size == 0) { return('n/a'); } else {
return (round($size/pow(1000, ($i = floor(log($size, 1000)))), 0) . $sizes[$i]); }
}
function format_size($size) {
$sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
if ($size == 0) { return('n/a'); } else {
return (round($size/pow(1024, ($i = floor(log($size, 1024)))), $i > 1 ? 2 : 0) . $sizes[$i]); }
}
A little restrictive, but should work for simple implementations. I\'m using this to replicate Facebook\'s \"35K people like this\" button format.\r\nThe original code is included below my modification.
manocreative/Wordpress Content From Separate Page Without ID ( PHP)
<?php
//PERFORMS MYSQL QUERY TO GET THE POST ID
//note: 'about' is the name of the page, you can use any named, ex: 'web services'
$about_page_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = 'about'");
$post_id = get_post($about_id);
$content = $post_id->post_content;
//applies wordpress filter (includes <p> tags)
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
?>
Working with Wordpress 3.04, pretty URLs in permalink settings must be enabled.
Allows you to get content from a different wordpress page. If you liked this, please like my facebook page http://bit.ly/manocreativeinc
Richard Harris/Robust Textual Tables ( python)
import string
from textwrap import wrap
MIN = 1
UNBIASED = 2
def display_table(rows, # List of tuples of data
headings=[], # Optional headings for columns
col_widths=[], # Column widths
col_justs=[], # Column justifications (str.ljust, etc)
screen_width=80, # Width of terminal
col_spacer=2, # Space between columns
fill_char=' ', # Fill character
col_sep='=', # Separator char
row_term='\n', # row terminator (could be <br />)
norm_meth=MIN, # Screen width normailization method
):
_col_justs = list(col_justs)
_col_widths = list(col_widths)
# String-ify everything
rows = [tuple((str(col) for col in row)) for row in rows]
# Compute appropriate col_widths if not given
if not col_widths:
if headings:
_col_widths = [max(row) for row in (map(len, col)
for col in zip(headings, *rows))]
else:
_col_widths = [max(row) for row in (map(len, col)
for col in zip(*rows))]
num_cols = len(_col_widths)
col_spaces = col_spacer * (num_cols - 1)
# Compute the size a row in our table would be in chars
def _get_row_size(cw):
return sum(cw) + col_spaces
row_size = _get_row_size(_col_widths)
def _unbiased_normalization():
""" Normalize keeping the ratio of column sizes the same """
__col_widths = [int(col_width *
(float(screen_width - col_spaces) / row_size))
for col_width in _col_widths]
# Distribute epsilon underage to the the columns
for x in xrange(screen_width - _get_row_size(__col_widths)):
__col_widths[x % num_cols] += 1
return __col_widths
def _min_normalization():
""" Bring all columns up to the minimum """
__col_widths = _unbiased_normalization()
# A made up heuristic -- hope it looks good
col_min = int(0.5 * min(row_size, screen_width) / float(num_cols))
# Bring all the columns up to the minimum
norm_widths = []
for col_width, org_width in zip(__col_widths, _col_widths):
if col_width < col_min:
col_width = min(org_width, col_min)
norm_widths.append(col_width)
# Distribute epsilon overage to the the columns
count = _get_row_size(norm_widths) - screen_width
x = 0
while count > 0:
if norm_widths[x % num_cols] > col_min:
norm_widths[x % num_cols] -= 1
count -= 1
x += 1
return norm_widths
if not col_widths:
# Normalize columns to screen size
if row_size > screen_width:
if norm_meth is UNBIASED:
_col_widths = _unbiased_normalization()
else:
_col_widths = _min_normalization()
row_size = _get_row_size(_col_widths)
# If col_justs are not specified then guess the justification from
# the appearence of the first row of data
# Numbers and money are right justified, alpha beginning strings are left
if not _col_justs:
for col_datum in rows[0]:
if isinstance(col_datum, str):
if col_datum.startswith(tuple(string.digits + '$')):
_col_justs.append(str.rjust)
else:
_col_justs.append(str.ljust)
else:
_col_justs.append(str.rjust)
# Calculate the minimum screen width needed based on col_spacer and number
# of columns
min_screen_width = num_cols + col_spaces
assert screen_width >= min_screen_width, "Screen Width is set too small, must be >= %d" % min_screen_width
row_size = _get_row_size(_col_widths)
def _display_wrapped_row(row, heading=False):
""" Take a row, wrap it, and then display in proper tabular format
"""
wrapped_row = [wrap(col_datum, col_width)
for col_datum, col_width in zip(row, _col_widths)]
row_lines = []
for cols in map(None, *wrapped_row):
if heading:
partial = (str.center((partial_col or ''), col_width, fill_char)
for partial_col, col_width in zip(cols, _col_widths))
else:
partial = (col_just((partial_col or ''), col_width, fill_char)
for partial_col, col_width, col_just in zip(cols,
_col_widths,
_col_justs))
row_lines.append((fill_char * col_spacer).join(partial))
print row_term.join(row_lines)
if headings:
# Print out the headings
_display_wrapped_row(headings, heading=True)
# Print separator
print col_sep * row_size
# Print out the rows of data
for row in rows:
_display_wrapped_row(row)
This function will display a nicely formatted textual table for you. Features include: auto-sizing of columns, auto-alignment based on column-type (which it sniffs from the first row), nicely formated centered headings, and most importantly wrapping of cells. Of course, you can manually override pretty much everything in case you don't like the defaults.
jink/ASP.net: Update SQL from a DropDownList dynamically created in a GridView. ( C#)
protected void DropDownSelectedIndexChanged(object sender, EventArgs e)
{
//http://programming.top54u.com/post/GridView-DropDownList-Update-SelectedValue-All-At-Once.aspx
//http://www.codeproject.com/KB/webservices/db_values_dropdownlist.aspx
DropDownList d = sender as DropDownList;
if (d == null) return;
//grab row that contains the drop down list
GridViewRow row = (GridViewRow)d.NamingContainer;
//pull data needed from the row (in this case we want the ID for the row)
object ID = gridEntries.DataKeys[row.RowIndex].Values["tableID"];
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SiteSqlServer"].ConnectionString);
conn.Open();
SqlCommand c = new SqlCommand("UPDATE table SET value = @v WHERE tableID = @id", conn);
SqlParameter p = c.Parameters.Add("@id", SqlDbType.Int);
p.Value = Convert.ToInt32(ID);
p = c.Parameters.Add("@v", SqlDbType.Int);
p.Value = Convert.ToInt32(d.SelectedValue);
c.ExecuteNonQuery();
//databind the gridview to reflect new data.
gridEntries.DataBind();
}
Bind the DropDownList like normal (set DataSourceID, DataTextField, DataValueField), and the SelectedValue field. AutoPostBack should be enabled. In the OnSelectedIndexChanged:
sarmanu/Basic word highlighter in a Console Application. ( C++)
#include <iostream>
#include <string>
#include <windows.h>
// These words will be highlighted. Of course, you can add your own words.
// You can make the "keywords" array smaller/bigger.
const size_t number_of_keywords = 62;
const std::string keywords[number_of_keywords] =
{
"auto", "break", "case", "char",
"const", "continue", "default", "do",
"double", "else", "enum", "extern",
"float", "for", "goto", "if",
"int", "long", "register", "return",
"short", "signed", "sizeof", "static",
"struct", "switch", "typedef", "union",
"unsigned", "void", "volatile", "while",
"asm", "bool", "catch", "class",
"const_cast", "delete", "dynamic_cast", "explicit",
"false", "friend", "inline", "mutable",
"namespace", "new", "operator", "private",
"public", "protected", "reinterpret_cast", "static_cast",
"template", "this", "throw", "true",
"try", "typeid", "typename", "using",
"virtual", "wchar_t"
};
// I think the fields from the below enum are self
// explanatory. BLACK - black color, BLUE - blue color, etc...
// L_ prefix stands for "light". (L_BLUE - light blue, etc ...)
enum colors
{
BLACK,
BLUE,
GREEN,
AQUA,
RED,
PURPLE,
YELLOW,
WHITE,
GRAY,
L_BLUE,
L_GREEN,
L_AQUA,
L_RED,
L_PURPLE,
L_YELLOW,
L_WHITE
};
// ASCII code for Enter, Space, Backspace and TAB
enum important_keys
{
KEY_ENTER = 13,
KEY_SPACE = 32,
KEY_BACKSPACE = 8,
KEY_TAB = 9
};
// Set the color of console text.
void set_color(const colors col)
{
HANDLE outHandle = GetStdHandle(STD_OUTPUT_HANDLE);
if (!outHandle)
exit(EXIT_FAILURE);
SetConsoleTextAttribute(outHandle, col);
}
// Put the keyboard into non-buffered state. (gets characters
// without echoing them).
void keyboard_nbuff()
{
HANDLE hConsole = GetStdHandle(STD_INPUT_HANDLE);
if (!hConsole)
exit(EXIT_FAILURE);
DWORD Mode = 0;
SetConsoleMode(hConsole, Mode & ~ENABLE_ECHO_INPUT);
}
// Check if the paramter of this function is a keyword.
bool is_keyword(const std::string &word)
{
// Loop through "keywords" array and compare individual elements with the
// parameter.
for (size_t i = 0; i < number_of_keywords; i++)
if (keywords[i] == word)
return true;
return false;
}
// Alternative to old Borland C gotoxy()
void GotoXY(SHORT const x, SHORT const y)
{
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
// This is the "brain".
void read_text()
{
keyboard_nbuff(); // Firstly, put keyboard into non-buffered state.
std::string buffer; // Holds the input until SPACE was pressed.
char x; // Holds individual character.
SHORT cursor_position = 0; // Cursor position - X
SHORT cursor_pos_y = 0; // Cursor position - Y
do
{
x = getchar(); // Get a char
// If it's TAB, then exit (as you can see, we get input until
// TAB is pressed).
if (x == KEY_TAB)
break;
// If the key pressed was entered, we need to insert a newline, and
// increase the Y position with one position. Also, the X position of the
// cursor is reset.
if (x == KEY_ENTER)
{
putchar('\n');
cursor_pos_y++;
cursor_position = -1;
}
// x is backspace, that means we want to delete characters:
if (x == KEY_BACKSPACE)
{
// The following if assures that when we are at the beginning of a line and there are
// no more characters, backspace is ignored:
if (cursor_position > 0)
{
if (!buffer.empty())
buffer.erase(buffer.length() - 1); // Delete character at the end of the buffer
cursor_position--; // Obviously we have to decrease the X position
// Deals with the good looking output.
putchar(KEY_BACKSPACE);
putchar(KEY_SPACE);
putchar(KEY_BACKSPACE);
}
}
else
{
// Key is not backspace, that means we have a normal character.
cursor_position++; // Increas the position.
// We are at the maximum width of the screen (I'm using 80 since
// this is the default value for most of consoles):
if (cursor_position == 80)
{
// Simply step over to the next line
std::cout << "\n";
cursor_pos_y++;
cursor_position = 1;
}
if (x != KEY_ENTER)
{
// Append the character to the temp buffer, and print it:
buffer.push_back(x);
std::cout << x;
// Only when SPACE was pressed we check if the buffer is a 'keyword'. So, if you enter
// a keyword, you have to press space to be highlighted.
if (x == KEY_SPACE)
{
// Check if buffer is a keyword. We ignore the space character appended to
// the end of buffer.
if (is_keyword(buffer.substr(0, buffer.length() - 1)))
{
// Set the color. I have chosen L_BLUE.
// You can of course use whatever color you want (see colors enum).
set_color(L_BLUE);
// Put the cursor in front of the word.
GotoXY(cursor_position - buffer.length(), cursor_pos_y);
std::cout << buffer; // Overwrite, but with blue color
// Put the cursor in it's original position.
GotoXY(cursor_position, cursor_pos_y);
set_color(WHITE); // Set the color back
buffer.clear(); // And clear the buffer.
}
else
buffer.clear(); // Not a keyword? Clear the buffer then.
}
}
}
} while (true);
}
int main()
{
read_text();
std::cin.ignore();
std::cin.get();
return 0;
}
Specific words from a text will be 'highlighted' (written with a different color). It's like a Compiler: it highlights the keywords (like MSVC highlighting "int", "extern", etc ...).
LuckyShot/PHP - Relative date function (2 minutes ago, 3 days ago...) ( PHP)
function relativedate($secs) {
$second = 1;
$minute = 60;
$hour = 60*60;
$day = 60*60*24;
$week = 60*60*24*7;
$month = 60*60*24*7*30;
$year = 60*60*24*7*30*365;
if ($secs <= 0) { $output = "now";
}elseif ($secs > $second && $secs < $minute) { $output = round($secs/$second)." second";
}elseif ($secs >= $minute && $secs < $hour) { $output = round($secs/$minute)." minute";
}elseif ($secs >= $hour && $secs < $day) { $output = round($secs/$hour)." hour";
}elseif ($secs >= $day && $secs < $week) { $output = round($secs/$day)." day";
}elseif ($secs >= $week && $secs < $month) { $output = round($secs/$week)." week";
}elseif ($secs >= $month && $secs < $year) { $output = round($secs/$month)." month";
}elseif ($secs >= $year && $secs < $year*10) { $output = round($secs/$year)." year";
}else{ $output = " more than a decade ago"; }
if ($output <> "now"){
$output = (substr($output,0,2)<>"1 ") ? $output."s" : $output;
}
return $output;
}
echo relativedate(60); // 1 minute
Gets seconds and returns it like Facebook/Twitter style: "2 minutes ago", "9 hours ago", etc... The script actually returns "1 minute", "17 days"... so that you can customize it: "3 seconds ago", "in 1 minute", "will take 4 days", etc.
Ian Eloff/Automatic ref-count management in C++ using a smart ptr ( python)
#include <memory>
typedef std::auto_ptr<PyObject> auto_py_base;
class auto_py : public auto_py_base {
public:
auto_py(PyObject * obj = NULL) : auto_py_base(obj) {
}
~auto_py() {
reset();
}
void reset(PyObject * obj = NULL) {
if(obj != get()) {
PyObject * old = release(); // Avoid the delete call
Py_XDECREF(old);
auto_py_base::reset(obj);
}
}
void inc() {
PyObject * ptr = get();
if(ptr)
Py_INCREF(ptr);
}
};
Managing ref-counting is a complex and error prone business. If you choose C++ to extend or embed Python, you can simply use a modification on std::auto_ptr. Instead of calling delete on the managed pointer, it will decref it.
So now you can do:
auto_py str = PyStr_FromString("Hello World!");
and forget about having to decref it altogether! Just like auto_ptr you can get the PyObject * with get(), release it from managed control with release(), and rebind it with reset(new_ptr). You can also incref it by calling inc(), but be cautious as you can easily create a leak by increfing once to much.
tgbdad/Fix screwy URL aliases for project_issue nodes ( MySQL)
UPDATE url_alias SET dst = REPLACE(src,'node/','issues/issue') WHERE src IN (SELECT CONCAT('node/', CAST(nid as CHAR)) FROM node WHERE type = 'project_issue') AND dst NOT LIKE 'issues/issue%';
I currently have project_issue nodes set for replacement pattern issues/issue[nid] in Drupal 5.x PathAuto. This query fixes all of the URL aliases for entries created before this was set correctly.