100+ results results for 'php str_replace' (356 ms)
1<?php 2# 4# 5# PHP Markdown & Extra 6# Copyright (c) 2004-2008 Michel Fortin 6# Copyright (c) 2004-2008 Michel Fortin 7# <http://www.michelf.com/projects/php-markdown/> 8# 21 # Regex to match balanced [brackets]. 22 # Needed to insert a maximum bracked depth while converting to PHP. 23 public $nested_brackets_depth = 6; 244 $nested_tags_level); 245 $content2 = str_replace('\2', '\3', $content); 246 305 306 | # PHP and ASP-style processor instructions (<? and <%) 307yiilite.php https://github.com/joshuaswarren/weatherhub.git | PHP | 1622 lines
1<?php 2/** 8 * 9 * By using this file instead of yii.php, an Yii application may 10 * improve performance due to the reduction of PHP parsing time. 10 * improve performance due to the reduction of PHP parsing time. 11 * The performance improvement is especially obvious when PHP APC extension 12 * is enabled. 19 * @license http://www.yiiframework.com/license/ 20 * @version $Id: yiilite.php 3322 2011-06-26 17:38:50Z qiang.xue $ 21 * @since 1.0 100 $class=new ReflectionClass($type); 101 // Note: ReflectionClass::newInstanceArgs() is available for PHP 5.1.3+ 102 // $object=$class->newInstanceArgs($args); 117 return self::$_imports[$alias]=$alias; 118 if(($pos=strrpos($alias,'\\'))!==false) // a class name in PHP 5.3 namespace format 119 {ProfileFieldController.php https://github.com/joshuaswarren/weatherhub.git | PHP | 524 lines
1<?php 2 90 91 var listWidgets = jQuery.parseJSON('".str_replace("'","\'",CJavaScript::jsonEncode($widgets[0]))."'); 92 var widgets = jQuery.parseJSON('".str_replace("'","\'",CJavaScript::jsonEncode($widgets[1]))."'); 92 var widgets = jQuery.parseJSON('".str_replace("'","\'",CJavaScript::jsonEncode($widgets[1]))."'); 93 var wgByType = jQuery.parseJSON('".str_replace("'","\'",CJavaScript::jsonEncode($wgByTypes))."'); 94 491 public function fieldType($type) { 492 $type = str_replace('UNIX-DATE','INTEGER',$type); 493 return $type;xml.php https://github.com/quarkness/piwik.git | PHP | 647 lines
1<?php 2/** 5 * @subpackage UnitTester 6 * @version $Id: xml.php 1723 2008-04-08 00:34:10Z lastcraft $ 7 */ 11 */ 12require_once(dirname(__FILE__) . '/scorer.php'); 13/**#@-*/ 57 function toParsedXml($text) { 58 return str_replace( 59 array('&', '<', '>', '"', '\''),unit_tester.php https://github.com/quarkness/piwik.git | PHP | 420 lines
1<?php 2/** 5 * @subpackage UnitTester 6 * @version $Id: unit_tester.php 1723 2008-04-08 00:34:10Z lastcraft $ 7 */ 11 */ 12require_once(dirname(__FILE__) . '/test_case.php'); 13require_once(dirname(__FILE__) . '/dumper.php'); 17 * Standard unit test class for day to day testing 18 * of PHP code XP style. Adds some useful standard 19 * assertions. 53 * Will be true on false and vice versa. False 54 * is the PHP definition of false, so that null, 55 * empty strings, zero and an empty array all count 409 return new EqualExpectation( 410 is_string($expected) ? str_replace('%', '%%', $expected) : $expected); 411 }parser.php https://github.com/quarkness/piwik.git | PHP | 764 lines
1<?php 2/** 5 * @subpackage MockObjects 6 * @version $Id: parser.php 1723 2008-04-08 00:34:10Z lastcraft $ 7 */ 98 for ($i = 0, $count = count($this->_patterns); $i < $count; $i++) { 99 $this->_patterns[$i] = '(' . str_replace( 100 array('/', '(', ')'), 173 * Some optimisation to make the sure the 174 * content is only scanned by the PHP regex 175 * parser once. Lexer modes must not startAPI.php https://github.com/quarkness/piwik.git | PHP | 1115 lines
1<?php 2/** 68 $htmlEncoded = Piwik::getJavascriptCode($idSite, $piwikUrl); 69 $htmlEncoded = str_replace(array('<br>','<br />','<br/>'), '', $htmlEncoded); 70 return $htmlEncoded; 335 { 336 $urlBis = str_replace('www.', '', $url); 337 } 339 { 340 $urlBis = str_replace('://', '://www.', $url); 341 }Container.php https://github.com/quarkness/piwik.git | PHP | 487 lines
1<?php 2/** 4 * 5 * PHP version 5 6 * 8 * 9 * Copyright (c) 2006-2010, Alexey Borzov <avb@php.net>, 10 * Bertrand Mansion <golgote@mamasam.com> 38 * @package HTML_QuickForm2 39 * @author Alexey Borzov <avb@php.net> 40 * @author Bertrand Mansion <golgote@mamasam.com> 40 * @author Bertrand Mansion <golgote@mamasam.com> 41 * @license http://opensource.org/licenses/bsd-license.php New BSD License 42 * @version SVN: $Id: Container.php 300722 2010-06-24 10:15:52Z mansion $ 42 * @version SVN: $Id: Container.php 300722 2010-06-24 10:15:52Z mansion $ 43 * @link http://pear.php.net/package/HTML_QuickForm2 44 */GoalManager.php https://github.com/quarkness/piwik.git | PHP | 835 lines
1<?php 2/** 159 { 160 $pattern = str_replace('/', '\\/', $pattern); 161 }FilesystemTest.php https://github.com/Exercise/symfony.git | PHP | 556 lines
1<?php 2 18 */ 19class FilesystemTest extends \PHPUnit_Framework_TestCase 20{ 467 foreach ($pathItems as $k => $path) { 468 $paths[$i][$k] = str_replace('/', DIRECTORY_SEPARATOR, $path); 469 }Crawler.php https://github.com/Exercise/symfony.git | PHP | 695 lines
1<?php 2 166 $current = libxml_use_internal_errors(true); 167 @$dom->loadXML(str_replace('xmlns', 'ns', $content)); 168 libxml_use_internal_errors($current);XmlFileLoader.php https://github.com/Exercise/symfony.git | PHP | 505 lines
103 $this->setCurrentDir(dirname($file)); 104 $this->import((string) $import['resource'], null, (Boolean) $import->getAttributeAsPhp('ignore-errors'), $file); 105 } 136 if (isset($service['public'])) { 137 $public = $service->getAttributeAsPhp('public'); 138 } 151 if (isset($service[$key])) { 152 $method = 'set'.str_replace('-', '', $key); 153 $definition->$method((string) $service->getAttributeAsPhp($key)); 160 161 $definition->setArguments($service->getArgumentsAsPhp('argument')); 162 $definition->setProperties($service->getArgumentsAsPhp('property')); 310 if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) { 311 $path = str_replace($extension->getNamespace(), str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]); 312PhpDumper.php https://github.com/Exercise/symfony.git | PHP | 1137 lines
1<?php 2 25/** 26 * PhpDumper dumps a service container as a PHP class. 27 * 32 */ 33class PhpDumper extends Dumper 34{ 65 /** 66 * Dumps the service container as a PHP class. 67 * 74 * 75 * @return string A PHP class representing of the service container 76 * 244 } else { 245 $code .= sprintf(" \$%s = new \\%s(%s);\n", $name, substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments)); 246 }ApplicationTest.php https://github.com/Exercise/symfony.git | PHP | 470 lines
1<?php 2 21 22class ApplicationTest extends \PHPUnit_Framework_TestCase 23{ 28 self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); 29 require_once self::$fixturesPath.'/FooCommand.php'; 30 require_once self::$fixturesPath.'/Foo1Command.php'; 30 require_once self::$fixturesPath.'/Foo1Command.php'; 31 require_once self::$fixturesPath.'/Foo2Command.php'; 32 require_once self::$fixturesPath.'/Foo3Command.php'; 36 { 37 return str_replace(PHP_EOL, "\n", $text); 38 } 47 foreach ($application->all() as $command) { 48 $command->setHelp(str_replace('%command.full_name%', 'app/console %command.name%', $command->getHelp())); 49 }InputDefinition.php https://github.com/Exercise/symfony.git | PHP | 533 lines
1<?php 2 196 { 197 return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments); 198 } 433 434 $description = str_replace("\n", "\n".str_pad('', $max + 2, ' '), $argument->getDescription()); 435 452 $multiple = $option->isArray() ? '<comment> (multiple values allowed)</comment>' : ''; 453 $description = str_replace("\n", "\n".str_pad('', $max + 2, ' '), $option->getDescription()); 454Command.php https://github.com/Exercise/symfony.git | PHP | 612 lines
1<?php 2 473 $name, 474 $_SERVER['PHP_SELF'].' '.$name 475 ); 476 477 return str_replace($placeholders, $replacements, $this->getHelp()); 478 } 562 $messages[] = '<comment>Help:</comment>'; 563 $messages[] = ' '.str_replace("\n", "\n ", $help)."\n"; 564 }code_coverage_manager.php https://github.com/cgajardo/repositorium.git | PHP | 804 lines
8 * 9 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> 10 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 16 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests 17 * @package cake 100 $testCaseFile = str_replace(DS . DS, DS, $testCaseFile); 101 $thisFile = str_replace('.php', '.test.php', basename(__FILE__)); 102 501 $testManager =& new TestManager(); 502 $testFile = str_replace(array('/', $testManager->_testExtension), array(DS, '.php'), $file); 503 545 $file = str_replace(DS . 'tests' . DS . 'cases' . DS, DS, $file); 546 $file = str_replace('.test.php', '.php', $file); 547 $file = str_replace(DS . DS, DS, $file);time.test.php https://github.com/cgajardo/repositorium.git | PHP | 803 lines
4 * 5 * PHP versions 4 and 5 6 * 6 * 7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> 8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests 15 * @package cake 16 * @subpackage cake.tests.cases.libs.view.helpers 17 * @since CakePHP(tm) v 1.2.0.4206 18 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License 19 */ 20if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { 21 define('CAKEPHP_UNIT_TEST_EXECUTION', 1);paginator.test.php https://github.com/cgajardo/repositorium.git | PHP | 1315 lines
1<?php 2/** 4 * 5 * PHP versions 4 and 5 6 * 6 * 7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> 8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests 15 * @package cake 16 * @subpackage cake.tests.cases.libs.view.helpers 17 * @since CakePHP(tm) v 1.2.0.4206 18 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License 24if (!defined('FULL_BASE_URL')) { 25 define('FULL_BASE_URL', 'http://cakephp.org'); 26}javascript.test.php https://github.com/cgajardo/repositorium.git | PHP | 911 lines
6 * 7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> 8 * Copyright 2006-2010, Cake Software Foundation, Inc. 13 * @copyright Copyright 2006-2010, Cake Software Foundation, Inc. 14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests 15 * @package cake 16 * @subpackage cake.tests.cases.libs.view.helpers 17 * @since CakePHP(tm) v 1.2.0.4206 18 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License 96 * @subpackage test_suite.cases.libs 97 * @since CakePHP Test Suite v 1.0.0.0 98 */ 326 327 $result = $this->Javascript->value('CakePHP' . "\r\n" . 'Rapid Development Framework' . "\r" . 'For PHP'); 328 $expected = '"CakePHP\\nRapid Development Framework\\nFor PHP"';ajax.test.php https://github.com/cgajardo/repositorium.git | PHP | 910 lines
6 * 7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> 8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests 15 * @package cake 221 $this->assertPattern('/<div[^<>]+class="auto_complete"[^<>]*><\/div>/', $result); 222 $this->assertPattern('/<\/div>\s+<script type="text\/javascript">\s*' . str_replace('/', '\\/', preg_quote('//<![CDATA[')) . '\s*' . str_replace('/', '\\/', preg_quote('new Ajax.Autocompleter(\'PostAjaxTestTitle\', \'PostAjaxTestTitle_autoComplete\', \'/posts\',')) . '/', $result); 223 $this->assertPattern('/' . str_replace('/', '\\/', preg_quote('new Ajax.Autocompleter(\'PostAjaxTestTitle\', \'PostAjaxTestTitle_autoComplete\', \'/posts\', {minChars:2});')) . '/', $result); 237 $this->assertPattern('/<div[^<>]+class="auto_complete"[^<>]*><\/div>/', $result); 238 $this->assertPattern('/<\/div>\s+<script type="text\/javascript">\s*' . str_replace('/', '\\/', preg_quote('//<![CDATA[')) . '\s*' . str_replace('/', '\\/', preg_quote('new Ajax.Autocompleter(\'PostAjaxTestTitle\', \'PostAjaxTestTitle_autoComplete\', \'/posts\',')) . '/', $result); 239 $this->assertPattern('/' . str_replace('/', '\\/', preg_quote('new Ajax.Autocompleter(\'PostAjaxTestTitle\', \'PostAjaxTestTitle_autoComplete\', \'/posts\', {paramName:\'parameter\', updateElement:elementUpdated, afterUpdateElement:function (input, element) { alert("updated"); }});')) . '/', $result); 245 $this->assertPattern('/<div[^<>]+class="auto_complete"[^<>]*><\/div>/', $result); 246 $this->assertPattern('/<\/div>\s+<script type="text\/javascript">\s*' . str_replace('/', '\\/', preg_quote('//<![CDATA[')) . '\s*' . str_replace('/', '\\/', preg_quote('new Ajax.Autocompleter(\'PostAjaxTestTitle\', \'PostAjaxTestTitle_autoComplete\', \'/posts\',')) . '/', $result); 247 $this->assertPattern('/' . str_replace('/', '\\/', preg_quote('new Ajax.Autocompleter(\'PostAjaxTestTitle\', \'PostAjaxTestTitle_autoComplete\', \'/posts\', {callback:function (input, queryString) { alert("requesting"); }});')) . '/', $result);view.test.php https://github.com/cgajardo/repositorium.git | PHP | 1008 lines
1<?php 2/** 4 * 5 * PHP versions 4 and 5 6 * 6 * 7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> 8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests 15 * @package cake 16 * @subpackage cake.tests.cases.libs 17 * @since CakePHP(tm) v 1.2.0.4206 18 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License 400 $result = $View->getViewFileName('does_not_exist'); 401 $expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean()); 402email.test.php https://github.com/cgajardo/repositorium.git | PHP | 1310 lines
6 * 7 * PHP versions 4 and 5 8 * 8 * 9 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> 10 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 16 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests 17 * @package cake 18 * @subpackage cake.cake.tests.cases.libs.controller.components 19 * @since CakePHP(tm) v 1.2.0.5347 20 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License 281 function __osFix($string) { 282 return str_replace(array("\r\n", "\r"), "\n", $string); 283 }cake.test.php https://github.com/cgajardo/repositorium.git | PHP | 939 lines
6 * 7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> 8 * Copyright 2005-2010, Cake Software Foundation, Inc. 13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. 14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests 15 * @package cake 16 * @subpackage cake.tests.cases.console 17 * @since CakePHP(tm) v 1.2.0.5432 18 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License 222 223 $params = array('cake.php'); 224 $expected = array( 260 'webroot' => 'webroot', 261 'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'), 262 'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)time.php https://github.com/cgajardo/repositorium.git | PHP | 744 lines
6 * 7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @link http://cakephp.org CakePHP(tm) Project 15 * @package cake 16 * @subpackage cake.cake.libs.view.helpers 17 * @since CakePHP(tm) v 0.10.0.1076 18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 278 * @access public 279 * @link http://book.cakephp.org/view/1471/Formatting 280 */ 304 * @access public 305 * @link http://book.cakephp.org/view/1472/Testing-Time 306 */helper.php https://github.com/cgajardo/repositorium.git | PHP | 912 lines
6 * 7 * PHP versions 4 and 5 8 * 8 * 9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 10 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 16 * @link http://cakephp.org CakePHP(tm) Project 17 * @package cake 18 * @subpackage cake.cake.libs.view 19 * @since CakePHP(tm) v 0.2.9 20 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 28/** 29 * Abstract base class for all other Helpers in CakePHP. 30 * Provides common methods and features.cake_schema.php https://github.com/cgajardo/repositorium.git | PHP | 698 lines
4 * 5 * PHP versions 4 and 5 6 * 6 * 7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @link http://cakephp.org CakePHP(tm) Project 15 * @package cake 123 if ($key === 'name' && $val !== $this->name && !isset($data['file'])) { 124 $file = Inflector::underscore($val) . '.php'; 125 } 176 require_once($path . DS . $file); 177 } elseif (file_exists($path . DS . 'schema.php') && is_file($path . DS . 'schema.php')) { 178 require_once($path . DS . 'schema.php');i18n.php https://github.com/cgajardo/repositorium.git | PHP | 568 lines
1<?php 2/** 4 * 5 * PHP versions 4 and 5 6 * 6 * 7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @link http://cakephp.org CakePHP(tm) Project 15 * @package cake 16 * @subpackage cake.cake.libs 17 * @since CakePHP(tm) v 1.2.0.4116 18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 109/** 110 * Used by the translation functions in basics.php 111 * Can also be used like I18n::translate(); but only if the App::import('I18n'); has been used to load the class.cake_session.php https://github.com/cgajardo/repositorium.git | PHP | 794 lines
11 * 12 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 13 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 18 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 19 * @link http://cakephp.org CakePHP(tm) Project 20 * @package cake 21 * @subpackage cake.cake.libs 22 * @since CakePHP(tm) v .0.10.0.1222 23 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 185 if (strpos($base, 'index.php') !== false) { 186 $this->path = str_replace('index.php', '', $base); 187 } 188 if (strpos($base, '?') !== false) { 189 $this->path = str_replace('?', '', $base); 190 }basics.php https://github.com/cgajardo/repositorium.git | PHP | 1026 lines
8 * 9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 10 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 16 * @link http://cakephp.org CakePHP(tm) Project 17 * @package cake 34/** 35 * Patch for PHP < 5.0 36 */ 109 $calledFrom = debug_backtrace(); 110 echo '<strong>' . substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1) . '</strong>'; 111 echo ' (line <strong>' . $calledFrom[0]['line'] . '</strong>)'; 116 if ($showHtml) { 117 $var = str_replace('<', '<', str_replace('>', '>', $var)); 118 }languagefilter.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 635 lines
1<?php 2/** 11 12JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php'); 13 168 { 169 $parts['query'] = str_replace('&', '&', $parts['query']); 170 } 268 $path = $uri->toString(array('path', 'query', 'fragment')); 269 $app->redirect($uri->base().'index.php'.($path ? ('/' . $path) : '')); 270 } 287 $path = $uri->toString(array('path', 'query', 'fragment')); 288 $app->redirect($uri->base().'index.php'.($path ? ('/' . $path) : '')); 289 } 306 $path = $uri->toString(array('path', 'query', 'fragment')); 307 $app->redirect($uri->base().'index.php'.($path ? ('/' . $path) : '')); 308 }sample.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 745 lines
1<?php 2/** 53 $fileUrl = 'http://www.joomlashine.com/joomla-templates/'; 54 $fileUrl .= str_replace('_', '-', $this->template['name']) . '-sample-data-j' . $sampleVersion . '.zip'; 55 132 $fileUrl = 'http://www.joomlashine.com/joomla-templates/'; 133 $fileUrl .= str_replace('_', '-', $this->template['name']) . '-sample-data-j' . $sampleVersion . '.zip'; 134 $tmpPath = $config->get('tmp_path'); 282 // $action = JUri::root(); 283 // $action.= sprintf('administrator/index.php?widget=sample&action=install-extension-file&id=%s', $id); 284 // $action.= sprintf('&%s=%s', $this->session->getName(), $this->session->getId());helper.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 659 lines
1<?php 2/** 26 'logoFile' => '', 27 'logoLink' => 'index.php', 28 'logoSlogan' => '', 161 if ($type == 'string') { 162 $this->_defaultParams[$name] = str_replace('{templateUrl}', $templateUrl, $this->_defaultParams[$name]); 163 } 456 // Load custom css that declared by the template 457 if (is_file(JPATH_ROOT . "/templates/{$this->_document->template}/template_custom.php")) { 458 include_once JPATH_ROOT . "/templates/{$this->_document->template}/template_custom.php";easyTags.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 1409 lines
1<?php 2/** 33 { 34 $easyTag = str_replace($key1, '', $easyTag); 35 $easyTag = str_replace($key2, '', $easyTag); 48 { 49 $params[$i] = str_replace('"', '', $params[$i]); 50 if (strpos($params[$i], '=') === false && $i > 0)articleContent.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 474 lines
1<?php 2/** 150 { 151 require_once(JPATH_SITE . '/components/com_content/helpers/route.php'); 152 165 { 166 require_once(JPATH_SITE . '/components/com_k2/helpers/route.php'); 167 $url = K2HelperRoute::getItemRoute($article->id . ":" . urlencode($article->alias), $article->catid); 213 { 214 $articleText = str_replace('{K2Splitter}', '', $text, $count); 215 $text = $fbText . $articleText; 221 { 222 $articleText = str_replace('{K2Splitter}', '', $text, $count); 223 $text = $articleText . $fbText; 229 { 230 $newFbText = str_replace('scsocialbuttons', 'scsocialbuttons '. $className, $fbText); 231 return $newFbText;Mssql.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 407 lines
1<?php 2/* 2/* 3 * $Id: Mssql.php 48519 2012-02-03 23:18:52Z btowles $ 4 * 26 * @subpackage Connection 27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 28 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 99 100 return '[' . str_replace(']', ']]', $identifier) . ']'; 101 } 341 * 342 * Workaround for http://bugs.php.net/36561 343 *uri.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 818 lines
1<?php 2/** 165 * Since we are assigning the URI from the server variables, we first need 166 * to determine if we are running on apache or IIS. If PHP_SELF and REQUEST_URI 167 * are present, we will assume we are running on apache. 169 170 if (!empty($_SERVER['PHP_SELF']) && !empty($_SERVER['REQUEST_URI'])) 171 { 194 // Check for quotes in the URL to prevent injections through the Host header 195 if ($theURI !== str_replace(array("'", '"', '<', '>'), '', $theURI)) 196 { 245 246 if (strpos(php_sapi_name(), 'cgi') !== false && !ini_get('cgi.fix_pathinfo') && !empty($_SERVER['REQUEST_URI'])) 247 { 247 { 248 // PHP-CGI on Apache with "cgi.fix_pathinfo = 0" 249language.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 1328 lines
1<?php 2/** 187 // Look for a language specific localise class 188 $class = str_replace('-', '_', $lang . 'Localise'); 189 $paths = array(); 192 // Note: Manual indexing to enforce load order. 193 $paths[0] = JPATH_SITE . "/language/overrides/$lang.localise.php"; 194 $paths[2] = JPATH_SITE . "/language/$lang/$lang.localise.php"; 199 // Note: Manual indexing to enforce load order. 200 $paths[1] = JPATH_ADMINISTRATOR . "/language/overrides/$lang.localise.php"; 201 $paths[3] = JPATH_ADMINISTRATOR . "/language/$lang/$lang.localise.php"; 280 /** 281 * Translate function, mimics the php gettext (alias _) function. 282 * 345 // Interpret \n and \t characters 346 $string = str_replace(array('\\\\', '\t', '\n'), array("\\", "\t", "\n"), $string); 347 }select.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 723 lines
1<?php 2/** 120 $id = $options['id'] !== false ? $options['id'] : $name; 121 $id = str_replace(array('[', ']'), '', $id); 122 195 $id = $options['id'] !== false ? $options['id'] : $name; 196 $id = str_replace(array('[', ']'), '', $id); 197folder.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 676 lines
1<?php 2/** 97 // Translate path for the FTP account 98 $dfid = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $dfid), '/'); 99 if (!$ftp->store($sfid, $dfid)) 209 // Translate path to FTP path 210 $path = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $path), '/'); 211 $ret = $ftp->mkdir($path); 358 // Translate path and delete 359 $path = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $path), '/'); 360 418 // Translate path for the FTP account 419 $src = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $src), '/'); 420 $dest = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $dest), '/');html.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 687 lines
1<?php 2/** 255 * ('rev' refers to reverse relation, 'rel' indicates normal, forward relation.) 256 * Typical tag: <link href="index.php" rel="Start"> 257 * 292 { 293 $href = str_replace('\\', '/', $href); 294 $this->addHeadLink($href, $relation, 'rel', array('type' => $type)); 572 { 573 $path = str_replace(JPATH_BASE . '/', '', $dir); 574 $path = str_replace('\\', '/', $path);sqlsrv.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 994 lines
1<?php 2/** 123 124 // Make sure the SQLSRV extension for PHP is installed and enabled. 125 if (!function_exists('sqlsrv_connect')) 126 { 127 throw new RuntimeException('PHP extension sqlsrv_connect is not available.'); 128 } 202 { 203 $this->setQuery('sp_rename ' . $constraint . ',' . str_replace($prefix, $backup, $constraint)); 204 $this->execute(); 223 $result = addslashes($text); 224 $result = str_replace("\'", "''", $result); 225 $result = str_replace('\"', '"', $result); 225 $result = str_replace('\"', '"', $result); 226 $result = str_replace('\/', '/', $result); 227file.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 690 lines
1<?php 2/** 39 40 // NOTE: raw php calls are up to 100 times faster than JFile or JFolder 41 66 // Remove the initial die() statement 67 $data = str_replace('<?php die("Access Denied"); ?>#x#', '', $data); 68 } 124 $path = $this->_getFilePath($id, $group); 125 $die = '<?php die("Access Denied"); ?>#x#'; 126 391 } 392 return $dir . '/' . $name . '.php'; 393 }template.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 664 lines
1<?php 2/** 138 139 $element = strtolower(str_replace(" ", "_", $name)); 140 $this->set('name', $name);file.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 815 lines
1<?php 2/** 37 $this->manifest = $this->parent->getManifest(); 38 $extension = 'files_' . str_replace('files_', '', strtolower(JFilterInput::getInstance()->clean((string) $this->manifest->name, 'cmd'))); 39 $lang = JFactory::getLanguage();tags.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 905 lines
1<?php 2/** 191 // Remove the #new# prefix that identifies new tags 192 $tagText = str_replace('#new#', '', $tag); 193 if ($tagText == $tag)search.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 1237 lines
1<?php 2/** 13define('FINDER_PATH_INDEXER', JPATH_ADMINISTRATOR . '/components/com_finder/helpers/indexer'); 14JLoader::register('FinderIndexerHelper', FINDER_PATH_INDEXER . '/helper.php'); 15JLoader::register('FinderIndexerQuery', FINDER_PATH_INDEXER . '/query.php'); 15JLoader::register('FinderIndexerQuery', FINDER_PATH_INDEXER . '/query.php'); 16JLoader::register('FinderIndexerResult', FINDER_PATH_INDEXER . '/result.php'); 17JLoader::register('FinderIndexerStemmer', FINDER_PATH_INDEXER . '/stemmer.php'); 231 $nullDate = $db->quote($db->getNullDate()); 232 $nowDate = $db->quote(substr_replace(JFactory::getDate()->toSQL(), '00', -2)); 233htmlawed.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 709 lines
1<?php 2 6LGPL v3 license 7A PHP Labware internal utility; www.bioinformatics.org/phplabware/internal_utilities/htmLawed 8 23} 24$x = !empty($C['elements']) ? str_replace(array("\n", "\r", "\t", ' '), '', $C['elements']) : '*'; 25if($x == '-*'){$e = array();} 38// config attrs 39$x = !empty($C['deny_attribute']) ? str_replace(array("\n", "\r", "\t", ' '), '', $C['deny_attribute']) : ''; 40$x = array_flip((isset($x[0]) && $x[0] == '*') ? explode('-', $x) : explode(',', $x. (!empty($C['safe']) ? ',on*' : ''))); 48$C['schemes'] = array(); 49foreach(explode(';', str_replace(array(' ', "\t", "\r", "\n"), '', $x)) as $v){ 50 $x = $x2 = null; list($x, $x2) = explode(':', $v, 2); 95if($C['cdata'] or $C['comment']){$t = preg_replace_callback('`<!(?:(?:--.*?--)|(?:\[CDATA\[.*?\]\]))>`sm', 'hl_cmtcd', $t);} 96$t = preg_replace_callback('`&([A-Za-z][A-Za-z0-9]{1,30}|#(?:[0-9]{1,8}|[Xx][0-9A-Fa-f]{1,7}));`', 'hl_ent', str_replace('&', '&', $t)); 97if($C['unique_ids'] && !isset($GLOBALS['hl_Ids'])){$GLOBALS['hl_Ids'] = array();}router.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 1336 lines
1<?php 2/** 4 * @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved. 5 * @license GNU/GPL, see LICENSE.php 6 * 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 17 18require_once( JPATH_ROOT. DIRECTORY_SEPARATOR .'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'constants.php' ); 19require_once( EBLOG_HELPERS . DIRECTORY_SEPARATOR . 'helper.php' ); 44 // check if anything return or not. If not, then we give a date as the alias. 45 if(trim(str_replace('-','',$permalink)) == '') 46 { 90 91 $str = str_replace('-', ' ', $str); 92parameter.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 606 lines
1<?php 2 14// Register the element class with the loader. 15JLoader::register('WFElement', dirname(__FILE__) . '/element.php'); 16 201 202 if ((isset($this->elements[$signature]) && !($this->elements[$signature] instanceof __PHP_Incomplete_Class)) && $new === false) { 203 return $this->elements[$signature]; 214 215 $file = JFilterInput::getInstance()->clean(str_replace('_', '/', $type) . '.php', 'path'); 216validator.test.php https://bitbucket.org/Maron1/taqman.git | PHP | 711 lines
1<?php 2 2 3class ValidatorTest extends PHPUnit_Framework_TestCase { 4 374 375 $_FILES['photo']['tmp_name'] = path('app').'routes.php'; 376 $this->assertFalse(Validator::make($_FILES, $rules)->valid()); 430 { 431 $_FILES['file']['tmp_name'] = path('app').'routes.php'; 432 $rules = array('file' => 'mimes:php,txt'); 514 { 515 $lang = require path('app').'language/en/validation.php'; 516 522 $this->assertInstanceOf('Laravel\\Messages', $messages); 523 $this->assertEquals(str_replace(':attribute', 'name', $lang['required']), $messages->first('name')); 524 $this->assertEquals(str_replace(':attribute', 'email', $lang['email']), $messages->first('email'));router.php https://bitbucket.org/Maron1/taqman.git | PHP | 599 lines
1<?php namespace Laravel\Routing; 2 212 213 $uri = ltrim(str_replace('(:bundle)', static::$bundle, $uri), '/'); 214 278 // If the action is a Closure, we will manually put it in an array 279 // to work around a bug in PHP 5.3.2 which causes Closures cast 280 // as arrays to become null. We'll remove this. 318 // root URI for the controller's bundle. 319 $controller = str_replace('.', '/', $controller); 320 526 // back on when we know the replacement count. 527 $key = str_replace($search, $replace, $key, $count); 528validator.php https://bitbucket.org/Maron1/taqman.git | PHP | 1239 lines
1<?php namespace Laravel; use Closure; 2 582 { 583 $url = str_replace(array('http://', 'https://', 'ftp://'), '', Str::lower($value)); 584markdown.php https://bitbucket.org/Maron1/taqman.git | PHP | 1793 lines
1<?php 2# 4# 5# PHP Markdown & Extra 6# Copyright (c) 2004-2012 Michel Fortin 6# Copyright (c) 2004-2012 Michel Fortin 7# <http://michelf.com/projects/php-markdown/> 8# 71Plugin Name: Markdown Extra 72Plugin URI: http://michelf.com/projects/php-markdown/ 73Description: <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a> allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by <a href="http://daringfireball.net/">John Gruber</a>. <a href="http://michelf.com/projects/php-markdown/">More...</a> 153 global $mdwp_hidden_tags, $mdwp_placeholders; 154 return str_replace($mdwp_hidden_tags, $mdwp_placeholders, $text); 155 } 157 global $mdwp_hidden_tags, $mdwp_placeholders; 158 return str_replace($mdwp_placeholders, $mdwp_hidden_tags, $text); 159 }generate.php https://bitbucket.org/Maron1/taqman.git | PHP | 854 lines
95 * php artisan generate:controller Admin 96 * php artisan generate:controller Admin index edit 97 * php artisan generate:controller Admin index index:post restful 109 // Name of the class and file 110 $class_name = str_replace('.', '/', ucwords(array_shift($args))); 111 194 * php artisan generate:migration create_users_table id:integer email:string:unique age:integer:nullable 195 * php artisan generate:migration add_user_id_to_posts_table user_id:integer 196 * php artisan generate:migration delete_active_from_users_table active:boolean 243 foreach( $paths as $path ) { 244 $file_path = $this->path('views') . str_replace('.', '/', $path) . '.blade.php'; 245 self::$content = "This is the $file_path view"; 338 // Begin building up the file's content 339 Template::new_class($class_name . '_Test', 'PHPUnit_Framework_TestCase'); 340lib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 728 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 25 */ 26require_once($CFG->dirroot . '/repository/lib.php'); 27require_once(dirname(__FILE__).'/locallib.php'); 83 84 $callbackurl = new moodle_url($CFG->wwwroot.'/repository/repository_callback.php', array( 85 'callback'=>'yes', 174 } 175 $encoded_path = str_replace("%2F", "/", rawurlencode($path)); 176 240 if ($file->thumb_exists) { 241 $thumburl = new moodle_url('/repository/dropbox/thumbnail.php', 242 array('repo_id' => $this->id,edit_calculatedmulti_form.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 351 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 58 if (preg_match('~#\{([^[:space:]]*)#~', $question->name , $regs)) { 59 $question->name = str_replace($regs[0], '', $question->name); 60 }; 238 foreach ($possibledatasets as $name => $value) { 239 $qtextremaining = str_replace('{'.$name.'}', '1', $qtextremaining); 240 } 285 foreach ($possibledatasets as $name => $value) { 286 $qanswerremaining = str_replace('{'.$name.'}', '1', $qanswerremaining); 287 }xmlformat_test.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1438 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 29global $CFG; 30require_once($CFG->libdir . '/questionlib.php'); 31require_once($CFG->dirroot . '/question/format/xml/format.php'); 31require_once($CFG->dirroot . '/question/format/xml/format.php'); 32require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); 33 42 public function assert_same_xml($expectedxml, $xml) { 43 $this->assertEquals(str_replace("\r\n", "\n", $expectedxml), 44 str_replace("\r\n", "\n", $xml));format.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 665 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 46 "'&(copy|#169);'i", 47 "'&#(\d+);'e"); // Evaluate like PHP 48 $replace = array ("", 70 // Remove empty space, as it would cause problems otherwise: 71 $formula = str_replace(' ', '', $formula); 72 74 while (preg_match('~[0-9.](e|E|\\*10\\*\\*)\\([+-]?[0-9]+\\)~', $formula, $regs)) { 75 $formula = str_replace( 76 $regs[0], preg_replace('/[)(]/', '', $regs[0]), $formula); 81 $formula, $regs)) { 82 $formula = str_replace( 83 $regs[0], str_replace('*10**', 'e', $regs[0]), $formula); 87 while (preg_match('~(^|[^0-9.eE])10\\*\\*[+-]?[0-9]+([^0-9.eE]|$)~', $formula, $regs)) { 88 $formula = str_replace( 89 $regs[0], str_replace('10**', '1e', $regs[0]), $formula);giftformat_test.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1074 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 29global $CFG; 30require_once($CFG->libdir . '/questionlib.php'); 31require_once($CFG->dirroot . '/question/format.php'); 31require_once($CFG->dirroot . '/question/format.php'); 32require_once($CFG->dirroot . '/question/format/gift/format.php'); 33require_once($CFG->dirroot . '/question/engine/tests/helpers.php'); 43 public function assert_same_gift($expectedtext, $text) { 44 $this->assertEquals(str_replace("\r\n", "\n", $expectedtext), 45 str_replace("\r\n", "\n", $text)); 51::Q8:: How are you? {}'; 52 $lines = preg_split('/[\\n\\r]/', str_replace("\r\n", "\n", $gift)); 53 120}'; 121 $lines = preg_split('/[\\n\\r]/', str_replace("\r\n", "\n", $gift)); 122format.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 775 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 118 119 $string = str_replace("\\\\", "&&092;", $string); 120 $string = str_replace($escapedcharacters, $placeholders, $string); 120 $string = str_replace($escapedcharacters, $placeholders, $string); 121 $string = str_replace("&&092;", "\\", $string); 122 return $string; 128 $characters = array(":", "#", "=", "{", "}", "~", "\n" ); //dlnsk 129 $string = str_replace($placeholders, $characters, $string); 130 return $string; 240 // No blank line if answers follow question, outside of closing punctuation. 241 $questiontext = substr_replace($text, "", $answerstart, $answerlength + 1); 242 } else { 243 // Inserts blank line for missing word format. 244 $questiontext = substr_replace($text, "_____", $answerstart, $answerlength + 1); 245 }walkthrough_test.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 747 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 31global $CFG; 32require_once(dirname(__FILE__) . '/../../../engine/lib.php'); 33require_once(dirname(__FILE__) . '/../../../engine/tests/helpers.php'); 50 $penaltyinfo = get_string('gradingdetailspenalty', 'qbehaviour_adaptive', 'XXXXX'); 51 $penaltypattern = '/'.str_replace('XXXXX', '\\w*', preg_quote($penaltyinfo, '/')).'/'; 52 return new question_no_pattern_expectation($penaltypattern); 62 $penaltyinfo = get_string('gradingdetailspenaltytotal', 'qbehaviour_adaptive', 'XXXXX'); 63 $penaltypattern = '/'.str_replace('XXXXX', '\\w*', preg_quote($penaltyinfo, '/')).'/'; 64 return new question_no_pattern_expectation($penaltypattern);locallib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 566 lines
1<?php 2 29require_once("$CFG->libdir/filelib.php"); 30require_once("$CFG->libdir/resourcelib.php"); 31require_once("$CFG->dirroot/mod/url/lib.php"); 97 // encode special chars only 98 $fullurl = str_replace('"', '%22', $fullurl); 99 $fullurl = str_replace('\'', '%27', $fullurl); 99 $fullurl = str_replace('\'', '%27', $fullurl); 100 $fullurl = str_replace(' ', '%20', $fullurl); 101 $fullurl = str_replace('<', '%3C', $fullurl); 101 $fullurl = str_replace('<', '%3C', $fullurl); 102 $fullurl = str_replace('>', '%3E', $fullurl); 103 } 356 if (strpos($url->externalurl, $CFG->wwwroot) === 0) { 357 if (strpos($url->externalurl, 'file.php') === false and strpos($url->externalurl, '.php') !== false ) { 358 // most probably our moodle page with navigationlib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1351 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 76 * Given an object containing all the necessary data, 77 * (defined by the form in mod_form.php) this function 78 * will create a new instance and return the id number 94 95 require_once($CFG->dirroot.'/mod/scorm/locallib.php'); 96 109 $scorm = scorm_option2text($scorm); 110 $scorm->width = (int)str_replace('%', '', $scorm->width); 111 $scorm->height = (int)str_replace('%', '', $scorm->height); 165 * Given an object containing all the necessary data, 166 * (defined by the form in mod_form.php) this function 167 * will update an existing instance with new data. 182 183 require_once($CFG->dirroot.'/mod/scorm/locallib.php'); 184shortanswer.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 372 lines
1<?php 2 52 global $USER, $CFG, $PAGE; 53 $mform = new lesson_display_answer_form_shortanswer($CFG->wwwroot.'/mod/lesson/continue.php', array('contents'=>$this->get_contents(), 'lessonid'=>$this->lesson->id)); 54 $data = new stdClass; 66 67 $mform = new lesson_display_answer_form_shortanswer($CFG->wwwroot.'/mod/lesson/continue.php', array('contents'=>$this->get_contents())); 68 $data = $mform->get_data(); 92 } else { 93 $expectedanswer = str_replace('*', '#####', $expectedanswer); 94 $expectedanswer = preg_quote($expectedanswer, '/'); 94 $expectedanswer = preg_quote($expectedanswer, '/'); 95 $expectedanswer = str_replace('#####', '.*', $expectedanswer); 96 } 142 } 143 $studentanswer = str_replace($original, $marked, $studentanswer); 144 }search.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 466 lines
1<?php 2 23 24require_once('../../config.php'); 25require_once('lib.php'); 114 115add_to_log($course->id, "forum", "search", "search.php?id=$course->id&search=".urlencode($search), $search); 116 123 124 $PAGE->navbar->add($strforums, new moodle_url('/mod/forum/index.php', array('id'=>$course->id))); 125 $PAGE->navbar->add(get_string('advancedsearch', 'forum')); 137 138$searchterms = str_replace('forumid:', 'instance:', $search); 139$searchterms = explode(' ', $searchterms); 142 143$PAGE->navbar->add($strsearch, new moodle_url('/mod/forum/search.php', array('id'=>$course->id))); 144$PAGE->navbar->add($strsearchresults);lib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 553 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 17defined('MOODLE_INTERNAL') OR die('not allowed'); 18require_once($CFG->dirroot.'/mod/feedback/item/feedback_item_class.php'); 19 40 global $DB, $CFG; 41 require_once('numeric_form.php'); 42 60 if (isset($range_from_to[0]) AND is_numeric($range_from_to[0])) { 61 $range_from = str_replace(FEEDBACK_DECIMAL, 62 $this->sep_dec, 68 if (isset($range_from_to[1]) AND is_numeric($range_from_to[1])) { 69 $range_to = str_replace(FEEDBACK_DECIMAL, 70 $this->sep_dec, 92 93 $this->item_form = new feedback_numeric_form('edit_item.php', $customdata); 94 }Wsdl.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 666 lines
1<?php 2/** 24 */ 25require_once "Zend/Soap/Wsdl/Strategy/Interface.php"; 26 29 */ 30require_once "Zend/Soap/Wsdl/Strategy/Abstract.php"; 31 100 if (!$this->_dom->loadXML($wsdl)) { 101 require_once 'Zend/Server/Exception.php'; 102 throw new Zend_Server_Exception('Unable to create DomDocument'); 126 $xml = $this->_dom->saveXML(); 127 $xml = str_replace($oldUri, $uri, $xml); 128 $this->_dom = new DOMDocument(); 144 if($strategy === true) { 145 require_once "Zend/Soap/Wsdl/Strategy/DefaultComplexType.php"; 146 $strategy = new Zend_Soap_Wsdl_Strategy_DefaultComplexType();Server.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 616 lines
1<?php 2/** 25 */ 26require_once 'Zend/Server/Interface.php'; 27 30 */ 31require_once 'Zend/Server/Reflection.php'; 32 35 */ 36require_once 'Zend/Server/Abstract.php'; 37 68 /** 69 * @var array PHP's Magic Methods, these are ignored 70 */ 205 if (substr($key, 0, 3) == 'arg') { 206 $key = str_replace('arg', '', $key); 207 $calling_args[$key] = $value;xhprof_lib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 942 lines
1<?php 2// Copyright (c) 2009 Facebook 89 if (!empty($rep_symbol)) { 90 $sort_col = str_replace("excl_", "", $sort_col); 91 } 293 * 294 * Suppose you have run:5 corresponding to page1.php, 295 * run:6 corresponding to page2.php, 295 * run:6 corresponding to page2.php, 296 * and run:7 corresponding to page3.php 297 * 320function xhprof_aggregate_runs($xhprof_runs_impl, $runs, 321 $wts, $source="phprof", 322 $use_script_name=false) {behat_general.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 364 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 25 26// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php. 27 27 28require_once(__DIR__ . '/../../behat/behat_base.php'); 29 172 $nocontainerexception = new ElementNotFoundException($this->getSession(), '"' . $tablerowtext . '" row text '); 173 $tablerowtext = str_replace("'", "\'", $tablerowtext); 174 $rownode = $this->find('xpath', "//tr[contains(., '" . $tablerowtext . "')]", $nocontainerexception);Entities.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 617 lines
1<?php 2/** 4 * 5 * A PHP-Based RSS and Atom Feed Framework. 6 * Takes the hard work out of managing a complete RSS/Atom solution. 41 * @link http://simplepie.org/ SimplePie 42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 43 */ 223 $consumed_length = strlen($this->consumed); 224 $this->data = substr_replace($this->data, $replacement, $this->position - $consumed_length, $consumed_length); 225 $this->position += strlen($replacement) - $consumed_length;TextData.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 598 lines
22 * @package PHPExcel_Calculation 23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) 24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../'); 35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); 36} 338 if (is_bool($value)) { 339 $value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); 340 } 416 if (is_bool($value)) { 417 $value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); 418 } 485 if (is_bool($mixedCaseString)) { 486 $mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); 487 }Database.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 725 lines
20 * 21 * @category PHPExcel 22 * @package PHPExcel_Calculation 22 * @package PHPExcel_Calculation 23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) 24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../'); 35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); 36} 43 * @package PHPExcel_Calculation 44 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) 45 */ 45 */ 46class PHPExcel_Calculation_Database { 47Worksheet.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1930 lines
1<?php 2/** 2/** 3 * PHPExcel 4 * 4 * 5 * Copyright (c) 2006 - 2012 PHPExcel 6 * 22 * @package PHPExcel_Worksheet 23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) 24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 33 * @package PHPExcel_Worksheet 34 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) 35 */ 35 */ 36class PHPExcel_Worksheet implements PHPExcel_IComparable 37{RuleRegistry.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 336 lines
1<?php 2/* vim: set expandtab tabstop=4 shiftwidth=4: */ 3// +----------------------------------------------------------------------+ 4// | PHP version 4.0 | 5// +----------------------------------------------------------------------+ 5// +----------------------------------------------------------------------+ 6// | Copyright (c) 1997-2003 The PHP Group | 7// +----------------------------------------------------------------------+ 7// +----------------------------------------------------------------------+ 8// | This source file is subject to version 2.0 of the PHP license, | 9// | that is bundled with this package in the file LICENSE, and is | 10// | available at through the world-wide-web at | 11// | http://www.php.net/license/2_02.txt. | 12// | If you did not receive a copy of the PHP license and are unable to | 13// | obtain it through the world-wide-web, please send a note to | 14// | license@php.net so we can mail you a copy immediately. | 15// +----------------------------------------------------------------------+zip_archive.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 814 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 26 27require_once("$CFG->libdir/filestorage/file_archive.php"); 28 62 63 /** @var bool ugly hack for broken empty zip handling in < PHP 5.3.10 */ 64 protected $emptyziphack = false; 93 case file_archive::OPEN: $flags = 0; break; 94 case file_archive::OVERWRITE: $flags = ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE; break; //changed in PHP 5.2.8 95 case file_archive::CREATE: 101 if ($flags == 0 and $result === ZIPARCHIVE::ER_NOZIP and filesize($archivepathname) === 22) { 102 // Legacy PHP versions < 5.3.10 can not deal with empty zip archives. 103 if (file_get_contents($archivepathname) === base64_decode(self::$emptyzipcontent)) { 146 protected function mangle_pathname($localname) { 147 $result = str_replace('\\', '/', $localname); // no MS \ separators 148 $result = preg_replace('/\.\.+/', '', $result); // prevent /.../iCalendar_rfc2445.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 801 lines
1<?php 2 3/** 4 * BENNU - PHP iCalendar library 5 * (c) 2005-2006 Ioannis Papaioannou (pj@moodle.org). All rights reserved. 92 for($i = 0; $i < strlen(RFC2445_WSP); ++$i) { 93 $string = str_replace(RFC2445_CRLF.substr(RFC2445_WSP, $i, 1), '', $string); 94 }iCalendar_properties.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1481 lines
1<?php 2 3/** 4 * BENNU - PHP iCalendar library 5 * (c) 2005-2006 Ioannis Papaioannou (pj@moodle.org). All rights reserved. 157 // TODO: what if this invalidates an already-set value? 158 $this->val_type = constant('RFC2445_TYPE_'.str_replace('-', '_', $value)); 159 }iCalendar_components.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 699 lines
1<?php 2 3/** 4 * BENNU - PHP iCalendar library 5 * (c) 2005-2006 Ioannis Papaioannou (pj@moodle.org). All rights reserved. 62 else { 63 $classname = 'iCalendar_property_'.strtolower(str_replace('-', '_', $name)); 64 $property = new $classname; 168 if(($propdata & RFC2445_REQUIRED) && empty($this->properties[$property])) { 169 $classname = 'iCalendar_property_'.strtolower(str_replace('-', '_', $property)); 170 $object = new $classname;adodb-active-recordx.inc.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1421 lines
1<?php 2/* 67 foreach($_ADODB_ACTIVE_DBS as $k => $d) { 68 if (PHP_VERSION >= 5) { 69 if ($d->db === $db) return $k; 116 { 117 $name = str_replace(' ', '_', $name); 118 $this->$name = $value; 120 121 // php5 constructor 122 // Note: if $table is defined, then we will use it as our table nameadodb-active-record.inc.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1002 lines
1<?php 2/* 46// $index = name of index - can be associative, for an example see 47// http://phplens.com/lens/lensforum/msgs.php?id=17790 48// returns index into $_ADODB_ACTIVE_DBS 53 foreach($_ADODB_ACTIVE_DBS as $k => $d) { 54 if (PHP_VERSION >= 5) { 55 if ($d->db === $db) return $k; 107 { 108 $name = str_replace(' ', '_', $name); 109 $this->$name = $value; 111 112 // php5 constructor 113 function __construct($table = false, $pkeyarr=false, $db=false) 470 $s = serialize($activetab); 471 if (!function_exists('adodb_write_file')) include(ADODB_DIR.'/adodb-csvlib.inc.php'); 472 adodb_write_file($fname,$s);weblib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1437 lines
1<?php 2 20 * 21 * Library of all general-purpose Moodle PHP functions and constants 22 * that produce HTML output 24 * Other main libraries: 25 * - datalib.php - functions that access the database. 26 * - moodlelib.php - general-purpose Moodle functions. 129 if (is_string($var)) { 130 $var = str_replace('\\', '\\\\', $var); 131 $var = str_replace(array('\'', '"', "\n", "\r", "\0"), array('\\\'', '\\"', '\\n', '\\r', '\\0'), $var); 131 $var = str_replace(array('\'', '"', "\n", "\r", "\0"), array('\\\'', '\\"', '\\n', '\\r', '\\0'), $var); 132 $var = str_replace('</', '<\/', $var); // XHTML compliance 133 } else if (is_array($var)) { 184 * 185 * This function is necessary because PHP_SELF and REQUEST_URI and SCRIPT_NAME 186 * return different things depending on a lot of things like your OS, Webtextlib.class.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 917 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 32 * become necessary. The name of the methods is exactly the 33 * same than their PHP originals. 34 * 71 // Required files 72 require_once($CFG->libdir.'/typo3/class.t3lib_cs.php'); 73 require_once($CFG->libdir.'/typo3/class.t3lib_div.php'); 73 require_once($CFG->libdir.'/typo3/class.t3lib_div.php'); 74 require_once($CFG->libdir.'/typo3/interface.t3lib_singleton.php'); 75 require_once($CFG->libdir.'/typo3/class.t3lib_l10n_locales.php'); 99 define('PATH_site', str_replace('\\','/',$CFG->tempdir.'/')); 100 define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':''); 101 } 359 * This function seems to be 100% compliant with RFC1342. Credits go to: 360 * paravoid (http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283). 361 *medialib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1209 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 39 // more intelligent such as use real video width. 40 // May be defined in config.php if required. 41 define('CORE_MEDIA_VIDEO_WIDTH', 400); 43if (!defined('CORE_MEDIA_VIDEO_HEIGHT')) { 44 // Default video height. May be defined in config.php if required. 45 define('CORE_MEDIA_VIDEO_HEIGHT', 300); 48 // Default audio width if no width is specified. 49 // May be defined in config.php if required. 50 define('CORE_MEDIA_AUDIO_WIDTH', 300); 137 // Trim from URL. 138 $url = str_replace($matches[0], '', $url); 139 } 210 * (players cannot have their own settings, database tables, capabilities, etc). 211 * These classes are used only by core_media_renderer in outputrenderers.php. 212 * If you add a new class here (in core code) you must modify thelexer.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 413 lines
1<?php 2 3/** 4 * PHP lexer code snarfed from the CVS tree for the lamplib project at 5 * http://sourceforge.net/projects/lamplib 104 for ($i = 0; $i < count($this->_patterns); $i++) { 105 $this->_patterns[$i] = '(' . str_replace( 106 array('/', '(', ')'), 181 * Some optimisation to make the sure the 182 * content is only scanned by the PHP regex 183 * parser once. Lexer modes must not startfilterlib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1394 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 45 * Class to manage the filtering of strings. It is intended that this class is 46 * only used by weblib.php. Client code should probably be using the 47 * format_text and format_string functions. 143 global $CFG; 144 $path = $CFG->dirroot .'/filter/'. $filtername .'/filter.php'; 145 if (!is_readable($path)) { 206 // <nolink> tags removed for XHTML compatibility 207 $text = str_replace(array('<nolink>', '</nolink>'), '', $text); 208 return $text;filelib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1291 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 36 37require_once("$CFG->libdir/filestorage/file_exceptions.php"); 38require_once("$CFG->libdir/filestorage/file_storage.php"); 38require_once("$CFG->libdir/filestorage/file_storage.php"); 39require_once("$CFG->libdir/filestorage/zip_packer.php"); 40require_once("$CFG->libdir/filebrowser/file_browser.php"); 76 if ($https) { 77 $return = str_replace('http://', 'https://', $return); 78 }renderer.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 498 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 123 124 $criteriontemplate = str_replace('{NAME}', $elementname, $criteriontemplate); 125 $criteriontemplate = str_replace('{CRITERION-id}', $criterion['id'], $criteriontemplate); 218 219 $leveltemplate = str_replace('{NAME}', $elementname, $leveltemplate); 220 $leveltemplate = str_replace('{CRITERION-id}', $criterionid, $leveltemplate); 220 $leveltemplate = str_replace('{CRITERION-id}', $criterionid, $leveltemplate); 221 $leveltemplate = str_replace('{LEVEL-id}', $level['id'], $leveltemplate); 222 return $leveltemplate;algebradebug.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 354 lines
1<?php 2 // This function fetches math. images from the data directory 7 8 require_once("../../config.php"); 9 13 14 require_once($CFG->libdir.'/filelib.php'); 15 require_once($CFG->dirroot.'/filter/tex/lib.php'); 79 global $CFG; 80 $algebra = str_replace('<','<',$algebra); 81 $algebra = str_replace('>','>',$algebra); 81 $algebra = str_replace('>','>',$algebra); 82 $algebra = str_replace('<>','#',$algebra); 83 $algebra = str_replace('<=','%',$algebra); 95 96 if ( (PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows") ) { 97 $cmd = "cd $CFG->dirroot\\filter\\algebra & algebra2tex.pl x/2";renderer.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 726 lines
1<?php 2 29 * Can be retrieved with the following code: 30 * <?php 31 * $renderer = $PAGE->get_renderer('core','backup'); 112 } 113 $html .= $this->backup_detail_pair(get_string('rootsetting'.str_replace('_','',$label), 'backup'), $value?$yestick:$notick); 114 } 226 global $CFG, $PAGE; 227 require_once($CFG->dirroot.'/course/lib.php'); 228cc_utils.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 470 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 23 24require_once 'xmlbase.php'; 25 91 foreach ($list as $filelink) { 92 $rvalue = str_replace($search, '', $filelink->nodeValue); 93 if (!empty($customslash)) { 93 if (!empty($customslash)) { 94 $rvalue = str_replace($customslash, '/', $rvalue); 95 } 114 $result1 = self::process_embedded_files($doc, $attributes, '@@PLUGINFILE@@'); 115 $result2 = self::process_embedded_files($doc, $attributes, '$@FILEPHP@$', '$@SLASH@$'); 116 $result = array_merge($result1, $result2); 275 //for the legacy stuff 276 $content = str_replace('$@FILEPHP@$'.str_replace('/','$@SLASH@$',$filename), 277 $replaceprefix.'../'.$files[$lfile][1],entity.quiz.class.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 974 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 152 153 $node_question_mod = str_replace($find_tags, $replace_values, $sheet_question_mod); 154 196 $replace_values = array($question['id'] , $question['id']); 197 $node_course_module_mod_quiz_questions_instances .= str_replace($find_tags, $replace_values, $sheet_question_mod_instance); 198 } 199 200 $node_course_module_mod_quiz_questions_instances = str_replace($find_tags, $replace_values, $node_course_module_mod_quiz_questions_instances); 201 } 235 236 $node_course_question_categories = str_replace($find_tags, $replace_values, $sheet_question_categories); 237 } 262 263 $node_question_categories = str_replace($find_tags, $replace_values, $sheet_question_categories_quetion_category); 264client.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1585 lines
40// include PGT storage classes 41include_once(dirname(__FILE__).'/PGTStorage/pgt-main.php'); 42 83 $str = str_replace('__CAS_VERSION__',$this->getServerVersion(),$str); 84 $str = str_replace('__PHPCAS_VERSION__',phpCAS::getVersion(),$str); 85 $str = str_replace('__SERVER_BASE_URL__',$this->getServerBaseURL(),$str); 109 { 110 $this->HTMLFilterOutput(str_replace('__TITLE__', 111 $title, 138 $this->HTMLFilterOutput(empty($this->_output_footer) 139 ?('<hr><address>phpCAS __PHPCAS_VERSION__ '.$this->getString(CAS_STR_USING_SERVER).' <a href="__SERVER_BASE_URL__">__SERVER_BASE_URL__</a> (CAS __CAS_VERSION__)</a></address></body></html>') 140 :$this->_output_footer); 187 /** 188 * This method returns the language used by phpCAS. 189 *view_table_php.class.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 921 lines
23/** 24 * This class will show the PHP needed (upgrade block) to perform 25 * the desired DDL action with the specified field/key/index 108 $b = ' <p class="centerpara buttons">'; 109 $b .= '<a href="index.php?action=edit_table&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&table=' . $tableparam . '">[' . $this->str['back'] . ']</a>'; 110 $b .= '</p>'; 136 foreach ($commands as $command) { 137 $popcommands[str_replace($optionspacer, '', $command)] = str_replace('_', ' ', $command); 138 } 232 if ($fieldkeyindexinitial == 'k') { // Only if we have got one key 233 $o.= s($this->add_key_php($structure, $tableparam, $fieldkeyindexparam)); 234 } else { 239 if ($fieldkeyindexinitial == 'k') { // Only if we have got one key 240 $o.= s($this->drop_key_php($structure, $tableparam, $fieldkeyindexparam)); 241 } else {main_view.class.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 308 lines
182 !empty($dbdir->xml_loaded)) { 183 $b .= '<a href="index.php?action=edit_xml_file&dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '">[' . $this->str['edit'] . ']</a>'; 184 } else { 194 !empty($dbdir->xml_changed)) { 195 $b .= '<a href="index.php?action=save_xml_file&sesskey=' . sesskey() . '&dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&time=' . time() . '&postaction=main_view#lastused">[' . $this->str['save'] . ']</a>'; 196 // Check if the file has been manually edited while being modified in the editor 209 is_readable($key)) { 210 $b .= '<a href="index.php?action=generate_documentation&dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '">[' . $this->str['doc'] . ']</a>'; 211 } else { 218 is_readable($key . '/install.xml')) { 219 $b .= '<a href="index.php?action=view_xml&file=' . urlencode(str_replace($CFG->dirroot, '', $key) . '/install.xml') . '">[' . $this->str['viewxml'] . ']</a>'; 220 } else { 241 empty($dbdir->xml_changed)) { 242 $b .= '<a href="index.php?action=unload_xml_file&dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&time=' . time() . '&postaction=main_view#lastused">[' . $this->str['unload'] . ']</a>'; 243 } else {edit_table.class.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 357 lines
158 if ($table->hasChanged()) { 159 $b .= ' <a href="index.php?action=view_table_xml&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&select=edited&table=' . $tableparam . '">[' . $this->str['viewedited'] . ']</a>'; 160 } else { 174 // The view php code button 175 $b .= ' <a href="index.php?action=view_table_php&table=' . $tableparam . '&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['viewphpcode'] . ']</a>'; 176 // The save button (if possible) 177 if ($cansavenow) { 178 $b .= ' <a href="index.php?action=save_xml_file&sesskey=' . sesskey() . '&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&time=' . time() . '&unload=false&postaction=edit_table&table=' . $tableparam . '&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['save'] . ']</a>'; 179 } 259 if (!$structure->getKeyUses($table->getName(), $key->getName())) { 260 $k = '<a href="index.php?action=edit_key&key=' .$key->getName() . '&table=' . $table->getName() . '&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">' . $key->getName() . '</a>'; 261 } else { 267 if (!$structure->getKeyUses($table->getName(), $key->getName())) { 268 $b .= '<a href="index.php?action=edit_key&key=' .$key->getName() . '&table=' . $table->getName() . '&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['edit'] . ']</a>'; 269user.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 391 lines
1<?php 2 2 3 require_once('../config.php'); 4 require_once($CFG->libdir.'/adminlib.php'); 4 require_once($CFG->libdir.'/adminlib.php'); 5 require_once($CFG->libdir.'/authlib.php'); 6 require_once($CFG->dirroot.'/user/filters/lib.php'); 42 } else { 43 $securewwwroot = str_replace('http:','https:',$CFG->wwwroot); 44 } 45 46 $returnurl = new moodle_url('/admin/user.php', array('sort' => $sort, 'dir' => $dir, 'perpage' => $perpage, 'page'=>$page)); 47 187 } 188 $$column = "<a href=\"user.php?sort=$column&dir=$columndir\">".$string[$column]."</a>$columnicon"; 189 }renderer.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 1183 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 27 28require_once($CFG->libdir . '/pluginlib.php'); 29 44 $copyrightnotice = text_to_html(get_string('gpl3')); 45 $copyrightnotice = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $copyrightnotice); // extremely ugly validation hack 46 46 47 $continue = new single_button(new moodle_url('/admin/index.php', array('lang'=>$CFG->lang, 'agreelicense'=>1)), get_string('continue'), 'get'); 48 61 * Display page explaining proper upgrade process, 62 * there can not be any PHP file leftovers... 63 * 65 */ 66 public function upgrade_stale_php_files_page() { 67 $output = '';Request.php https://github.com/ivebeenlinuxed/Boiler.git | PHP | 638 lines
1<?php 2 166 return trim($this->method . ' ' . $this->getResource()) . ' ' 167 . strtoupper(str_replace('https', 'http', $this->url->getScheme())) 168 . '/' . $protocolVersion . "\r\n" . implode("\r\n", $this->getHeaderLines());theme.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1629 lines
1<?php 2/** 345 if ( 0 === strpos( $theme_root, WP_CONTENT_DIR ) ) 346 $relative_theme_roots[ str_replace( WP_CONTENT_DIR, '', $theme_root ) ] = $theme_root; 347 elsepost.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1493 lines
1<?php 2/** 25 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 26 '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 27 'capability_type' => 'post', 42 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 43 '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 44 'capability_type' => 'page', 63 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 64 '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 65 'capability_type' => 'post', 84 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 85 '_edit_link' => 'revision.php?revision=%d', /* internal use only. don't use this when registering your own post type. */ 86 'capability_type' => 'post', 234 if ( 0 === strpos( $new_path, $uploads['basedir'] ) ) { 235 $new_path = str_replace( $uploads['basedir'], '', $new_path ); 236 $new_path = ltrim( $new_path, '/' );post-template.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1460 lines
1<?php 2/** 166 $content = apply_filters('the_content', $content); 167 $content = str_replace(']]>', ']]>', $content); 168 echo $content; 450 $classes[] = 'attachmentid-' . $post_id; 451 $classes[] = 'attachment-' . str_replace( $mime_prefix, '', $mime_type ); 452 } 503 $classes[] = 'page-template'; 504 $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_page_template_slug( $page_id ) ) ); 505 } else {media.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1439 lines
1<?php 2/** 152 if ( $intermediate = image_get_intermediate_size($id, $size) ) { 153 $img_url = str_replace($img_url_basename, $intermediate['file'], $img_url); 154 $width = $intermediate['width']; 160 if ( ($thumb_file = wp_get_attachment_thumb_file($id)) && $info = getimagesize($thumb_file) ) { 161 $img_url = str_replace($img_url_basename, wp_basename($thumb_file), $img_url); 162 $width = $info[0]; 316 * @param bool $crop Optional, default is false. Whether to crop image or resize. 317 * @return bool|array False on failure. Returned array matches parameters for imagecopyresampled() PHP function. 318 */link-template.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1674 lines
1<?php 2/** 159 ); 160 $permalink = home_url( str_replace($rewritecode, $rewritereplace, $permalink) ); 161 $permalink = user_trailingslashit($permalink, 'single'); 197 $slug = get_page_uri($id); 198 $post_link = str_replace("%$post->post_type%", $slug, $post_link); 199 } 274 if ( ! $leavename ) { 275 $link = str_replace('%pagename%', get_page_uri( $post ), $link); 276 } 320 if ( ! $leavename ) 321 $link = str_replace( '%postname%', $name, $link ); 322 } 343 if ( !empty($yearlink) ) { 344 $yearlink = str_replace('%year%', $year, $yearlink); 345 return apply_filters('year_link', home_url( user_trailingslashit($yearlink, 'year') ), $year);feed.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 549 lines
1<?php 2/** 149 $content = apply_filters('the_content', get_the_content()); 150 $content = str_replace(']]>', ']]>', $content); 151 return apply_filters('the_content_feed', $content, $feed_type); 444 * 445 * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1 446 * 526function fetch_feed($url) { 527 require_once (ABSPATH . WPINC . '/class-feed.php'); 528deprecated.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1758 lines
1<?php 2/** 153 $string .= '</a>'; 154 $format = str_replace('%', $string, $format); 155 echo $format; 189 $string .= '</a>'; 190 $format = str_replace('%', $string, $format); 191 echo $format;comment-template.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1517 lines
1<?php 2/** 247 $display = ($linktext != '') ? $linktext : $url; 248 $display = str_replace( 'http://www.', '', $display ); 249 $display = str_replace( 'http://', '', $display );class-wp.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 645 lines
1<?php 2/** 148 $pathinfo_array = explode('?', $pathinfo); 149 $pathinfo = str_replace("%", "%25", $pathinfo_array[0]); 150 $req_uri = $_SERVER['REQUEST_URI']; 152 $req_uri = $req_uri_array[0]; 153 $self = $_SERVER['PHP_SELF']; 154 $home_path = parse_url(home_url()); 164 // requested permalink. 165 $req_uri = str_replace($pathinfo, '', $req_uri); 166 $req_uri = trim($req_uri, '/'); 237 // If req_uri is empty or if it is a request for ourself, unset error. 238 if ( empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) { 239 unset( $error, $_GET['error'] ); 240 241 if ( isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) 242 unset( $perma_query_vars );class-wp-customize-control.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 819 lines
192 protected function render() { 193 $id = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) ); 194 $class = 'customize-control customize-control-' . $this->type; 195 196 ?><li id="<?php echo esc_attr( $id ); ?>" class="<?php echo esc_attr( $class ); ?>"> 197 <?php $this->render_content(); ?> 240 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 241 <input type="text" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> /> 242 </label> 264 <label> 265 <input type="radio" value="<?php echo esc_attr( $value ); ?>" name="<?php echo esc_attr( $name ); ?>" <?php $this->link(); checked( $this->value(), $value ); ?> /> 266 <?php echo esc_html( $label ); ?><br/> 386 <div class="customize-control-content"> 387 <input class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value' ); ?>"<?php echo $default_attr ?> /> 388 </div>class-simplepie.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1773 lines
6require ABSPATH . WPINC . '/SimplePie/Cache.php'; 7require ABSPATH . WPINC . '/SimplePie/File.php'; 8require ABSPATH . WPINC . '/SimplePie/Sanitize.php'; 9require ABSPATH . WPINC . '/SimplePie/Registry.php'; 10require ABSPATH . WPINC . '/SimplePie/IRI.php'; 11require ABSPATH . WPINC . '/SimplePie/Locator.php'; 11require ABSPATH . WPINC . '/SimplePie/Locator.php'; 12require ABSPATH . WPINC . '/SimplePie/Content/Type/Sniffer.php'; 13require ABSPATH . WPINC . '/SimplePie/XML/Declaration/Parser.php'; 27 28 $file = ABSPATH . WPINC . '/' . str_replace( '_', '/', $class ) . '.php'; 29 include $file; 42} else { 43 require ABSPATH . WPINC . '/SimplePie/Cache/Base.php'; 44 require ABSPATH . WPINC . '/SimplePie/Cache/DB.php';misc.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 563 lines
1<?php 2/** 159 160 // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP 161 if ( iis7_supports_permalinks() && ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) ) { 222function url_shorten( $url ) { 223 $short_url = str_replace( 'http://', '', stripslashes( $url )); 224 $short_url = str_replace( 'www.', '', $short_url ); 332 $map_option = $option; 333 $type = str_replace('edit_', '', $map_option); 334 $type = str_replace('_per_page', '', $type); 339 else 340 $option = str_replace('-', '_', $option); 341 539foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> 540<div class="color-option"><input name="admin_color" id="admin_color_<?php echo esc_attr( $color ); ?>" type="radio" value="<?php echo esc_attr( $color ); ?>" class="tog" <?php checked($color, $current_color); ?> /> 541 <table class="color-palettemedia.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1524 lines
1<?php 2/** 147 148 $caption = str_replace( array("\r\n", "\r"), "\n", $caption); 149 $caption = preg_replace_callback( '/<[a-zA-Z0-9]+(?: [^<>]+>)*/', '_cleanup_image_add_caption', $caption ); 185var win = window.dialogArguments || opener || parent || top; 186win.send_to_editor('<?php echo addslashes($html); ?>'); 187/* ]]> */ 188</script> 189<?php 190 exit; 329?> 330<title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?></title> 331<?php 342addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 343var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time(); ?>'}; 344var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',file.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1071 lines
1<?php 2/** 20 'footer.php' => __( 'Footer' ), 21 'header.php' => __( 'Header' ), 22 'sidebar.php' => __( 'Sidebar' ), 22 'sidebar.php' => __( 'Sidebar' ), 23 'archive.php' => __( 'Archives' ), 24 'author.php' => __( 'Author Template' ), 33 'functions.php' => __( 'Theme Functions' ), 34 'attachment.php' => __( 'Attachment Template' ), 35 'image.php' => __('Image Attachment Template'), 38 'application.php' => __('Application Attachment Template'), 39 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), 40 '.htaccess' => __( '.htaccess (for rewrite rules )' ), 292 else 293 $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); 294 return call_user_func($upload_error_handler, $file, $error_msg);export.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 436 lines
342<?php foreach ( $cats as $c ) : ?> 343 <wp:category><wp:term_id><?php echo $c->term_id ?></wp:term_id><wp:category_nicename><?php echo $c->slug; ?></wp:category_nicename><wp:category_parent><?php echo $c->parent ? $cats[$c->parent]->slug : ''; ?></wp:category_parent><?php wxr_cat_name( $c ); ?><?php wxr_category_description( $c ); ?></wp:category> 344<?php endforeach; ?> 345<?php foreach ( $tags as $t ) : ?> 346 <wp:tag><wp:term_id><?php echo $t->term_id ?></wp:term_id><wp:tag_slug><?php echo $t->slug; ?></wp:tag_slug><?php wxr_tag_name( $t ); ?><?php wxr_tag_description( $t ); ?></wp:tag> 347<?php endforeach; ?> 348<?php foreach ( $terms as $t ) : ?> 349 <wp:term><wp:term_id><?php echo $t->term_id ?></wp:term_id><wp:term_taxonomy><?php echo $t->taxonomy; ?></wp:term_taxonomy><wp:term_slug><?php echo $t->slug; ?></wp:term_slug><wp:term_parent><?php echo $t->parent ? $terms[$t->parent]->slug : ''; ?></wp:term_parent><?php wxr_term_name( $t ); ?><?php wxr_term_description( $t ); ?></wp:term> 350<?php endforeach; ?> 371 <link><?php the_permalink_rss() ?></link> 372 <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate> 373 <dc:creator><?php echo get_the_author_meta( 'login' ); ?></dc:creator> 407 <wp:comment_id><?php echo $c->comment_ID; ?></wp:comment_id> 408 <wp:comment_author><?php echo wxr_cdata( $c->comment_author ); ?></wp:comment_author> 409 <wp:comment_author_email><?php echo $c->comment_author_email; ?></wp:comment_author_email>class-wp-plugins-list-table.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 437 lines
1<?php 2/** 126 127 $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ), 999 ); 128 223 $status_links[$type] = sprintf( "<a href='%s' %s>%s</a>", 224 add_query_arg('plugin_status', $type, 'plugins.php'), 225 ( $type == $status ) ? ' class="current"' : '', 274 elseif ( 'top' == $which && 'mustuse' == $status ) 275 echo '<p>' . sprintf( __( 'Files in the <code>%s</code> directory are executed automatically.' ), str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) ) . '</p>'; 276 elseif ( 'top' == $which && 'dropins' == $status ) 276 elseif ( 'top' == $which && 'dropins' == $status ) 277 echo '<p>' . sprintf( __( 'Drop-ins are advanced plugins in the <code>%s</code> directory that replace WordPress functionality when present.' ), str_replace( ABSPATH, '', WP_CONTENT_DIR ) ) . '</p>'; 278 328 $is_active = false; 329 $description = '<p><strong>' . $dropins[ $plugin_file ][0] . ' <span class="attention">' . __('Inactive:') . '</span></strong> ' . sprintf( __( 'Requires <code>%s</code> in <code>wp-config.php</code>.' ), "define('" . $dropins[ $plugin_file ][1] . "', true);" ) . '</p>'; 330 }ajax-actions.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1634 lines
1<?php 2/** 65 if ( ',' !== $comma ) 66 $s = str_replace( $comma, ',', $s ); 67 if ( false !== strpos( $s, ',' ) ) { 132 133 include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); 134 if ( ! stream_preview_image($post_id) ) 190function wp_ajax_dashboard_widgets() { 191 require_once ABSPATH . 'wp-admin/includes/dashboard.php'; 192 318 'id' => $cat_id, 319 'data' => str_replace( array("\n", "\t"), '', $data), 320 'position' => -1 341 'id' => $term_id, 342 'data' => str_replace( array("\n", "\t"), '', $data), 343 'position' => -1press-this.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 654 lines
155 <a href="#" class="select"> 156 <img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr(__('Click to insert.')); ?>" title="<?php echo esc_attr(__('Click to insert.')); ?>" /> 157 </a> 221 type: "GET", 222 url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>", 223 cache : false, 290 291 jQuery('#extra-fields').html('<div class="postbox"><h2><?php _e( 'Add Photos' ); ?> <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="button button-small"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>'); 292 jQuery('#img_container').html(strtoappend); 306var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'}; 307var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'press-this', isRtl = <?php echo (int) is_rtl(); ?>; 308var photostorage = false; 349 case 'video' : 350 jQuery('#extra-fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() { 351 <?phpplugins.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 437 lines
57 if ( isset($_GET['from']) && 'import' == $_GET['from'] ) { 58 wp_redirect( self_admin_url("import.php?import=" . str_replace('-importer', '', dirname($plugin))) ); // overrides the ?error=true one above and redirects to the Imports page, stripping the -importer suffix 59 } else { 98 99 wp_redirect( self_admin_url("plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s") ); 100 exit; 224 225 $parent_file = 'plugins.php'; 226 231 <div class="wrap"> 232 <?php 233 $files_to_delete = $plugin_info = array(); 265 <?php if ( $have_non_network_plugins && is_network_admin() ) : ?> 266 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo _n( 'This plugin may be active on other sites in the network.', 'These plugins may be active on other sites in the network.', $plugins_to_delete ); ?></p></div> 267 <?php endif; ?>Validations.php https://github.com/rosianesrocha/nanico.git | PHP | 833 lines
1<?php 2/** 4 * this piece can be considered a straight port. The reason for this is that the vaildation process is 5 * tricky due to order of operations/events. The former combined with PHP's odd typecasting means 6 * that it was easier to formulate this piece base on the rails code. 39 * @see Errors 40 * @link http://www.phpactiverecord.org/guides/validations 41 */ 235 236 $message = str_replace('%s', $var, $options['message']); 237 329 330 $message = str_replace('%d', $option_value, $message); 331 483 484 $too_short = str_replace('%d', $range[0], $too_short); 485 $too_long = str_replace('%d', $range[1], $too_long);NestedSetBehaviorObjectBuilderModifier.php https://github.com/1989gaurav/Propel.git | PHP | 1591 lines
1<?php 2 14 * @author François Zaninotto 15 * @author heltem <heltem@o2php.com> 16 * @package propel.generator.behavior.nestedset 37 38 protected function getColumnPhpName($name) 39 { 39 { 40 return $this->behavior->getColumnForParameter($name)->getPhpName(); 41 } 53 { 54 $script = str_replace('implements Persistent', 'implements Persistent, NodeObject', $script); 55 } 152 153 if ($this->getColumnPhpName('left_column') != 'LeftValue') { 154 $this->addGetLeft($script);rewrite.php https://github.com/muskmelon/Greemo.git | PHP | 1720 lines
1<?php 2/** 280 if ( false !== strpos(home_url(), '://www.') && false === strpos($url, '://www.') ) 281 $url = str_replace('://', '://www.', $url); 282 284 if ( false === strpos(home_url(), '://www.') ) 285 $url = str_replace('://www.', '://', $url); 286 286 287 // Strip 'index.php/' if we're not using path info permalinks 288 if ( !$wp_rewrite->using_index_permalinks() ) 288 if ( !$wp_rewrite->using_index_permalinks() ) 289 $url = str_replace('index.php/', '', $url); 290 297 $home_path = isset( $home_path['path'] ) ? $home_path['path'] : '' ; 298 $url = str_replace($home_path, '', $url); 299 }post.php https://github.com/muskmelon/Greemo.git | PHP | 1374 lines
1<?php 2/** 25 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 26 '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 27 'capability_type' => 'post', 41 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 42 '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 43 'capability_type' => 'page', 57 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 58 '_edit_link' => 'media.php?attachment_id=%d', /* internal use only. don't use this when registering your own post type. */ 59 'capability_type' => 'post', 74 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 75 '_edit_link' => 'revision.php?revision=%d', /* internal use only. don't use this when registering your own post type. */ 76 'capability_type' => 'post', 220 if ( 0 === strpos($new_path, $uploads['basedir']) ) { 221 $new_path = str_replace($uploads['basedir'], '', $new_path); 222 $new_path = ltrim($new_path, '/');post-template.php https://github.com/muskmelon/Greemo.git | PHP | 1440 lines
1<?php 2/** 167 $content = apply_filters('the_content', $content); 168 $content = str_replace(']]>', ']]>', $content); 169 echo $content; 445 $classes[] = 'attachmentid-' . $post_id; 446 $classes[] = 'attachment-' . str_replace( $mime_prefix, '', $mime_type ); 447 } 490 $classes[] = 'page-template'; 491 $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_post_meta( $page_id, '_wp_page_template', true ) ), '' ); 492 } else {media.php https://github.com/muskmelon/Greemo.git | PHP | 1438 lines
1<?php 2/** 147 if ( $intermediate = image_get_intermediate_size($id, $size) ) { 148 $img_url = str_replace($img_url_basename, $intermediate['file'], $img_url); 149 $width = $intermediate['width']; 155 if ( ($thumb_file = wp_get_attachment_thumb_file($id)) && $info = getimagesize($thumb_file) ) { 156 $img_url = str_replace($img_url_basename, wp_basename($thumb_file), $img_url); 157 $width = $info[0]; 234/** 235 * Load an image from a string, if PHP supports it. 236 * 331 * @param bool $crop Optional, default is false. Whether to crop image or resize. 332 * @return bool|array False, on failure. Returned array matches parameters for imagecopyresampled() PHP function. 333 */ 390 * 391 * Some functionality requires API to exist, so some PHP version may lose out 392 * support. This is not the fault of WordPress (where functionality islink-template.php https://github.com/muskmelon/Greemo.git | PHP | 1706 lines
1<?php 2/** 157 ); 158 $permalink = home_url( str_replace($rewritecode, $rewritereplace, $permalink) ); 159 $permalink = user_trailingslashit($permalink, 'single'); 195 $slug = get_page_uri($id); 196 $post_link = str_replace("%$post->post_type%", $slug, $post_link); 197 } 279 if ( ! $leavename ) { 280 $link = str_replace('%pagename%', get_page_uri($id), $link); 281 } 346 if ( !empty($yearlink) ) { 347 $yearlink = str_replace('%year%', $year, $yearlink); 348 return apply_filters('year_link', home_url( user_trailingslashit($yearlink, 'year') ), $year); 370 if ( !empty($monthlink) ) { 371 $monthlink = str_replace('%year%', $year, $monthlink); 372 $monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink);formatting.php https://github.com/muskmelon/Greemo.git | PHP | 1427 lines
1<?php 2/** 80 // This is not a tag, nor is the texturization disabled static strings 81 $curl = str_replace($static_characters, $static_replacements, $curl); 82 // regular expressions 148 149 $text = str_replace('<br />', '', $text); 150 $text = str_replace('<p>', "\n", $text); 150 $text = str_replace('<p>', "\n", $text); 151 $text = str_replace('</p>', '', $text); 152 179 $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 180 $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines 181 if ( strpos($pee, '<object') !== false ) { 195 $pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee); 196 $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee); 197 $pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)!', "$1", $pee);class-wp.php https://github.com/muskmelon/Greemo.git | PHP | 599 lines
1<?php 2/** 145 $pathinfo_array = explode('?', $pathinfo); 146 $pathinfo = str_replace("%", "%25", $pathinfo_array[0]); 147 $req_uri = $_SERVER['REQUEST_URI']; 149 $req_uri = $req_uri_array[0]; 150 $self = $_SERVER['PHP_SELF']; 151 $home_path = parse_url(home_url()); 161 // requested permalink. 162 $req_uri = str_replace($pathinfo, '', $req_uri); 163 $req_uri = trim($req_uri, '/'); 189 // Don't try to match against AtomPub calls 190 if ( $req_uri == 'wp-app.php' ) 191 break; 226 // If req_uri is empty or if it is a request for ourself, unset error. 227 if ( empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) { 228 if ( isset($_GET['error']) )edit.php https://github.com/muskmelon/Greemo.git | PHP | 482 lines
27 ?> 28 <h2><?php esc_html_e( 'Users' ); ?></h2> 29 <p><?php _e( 'Transfer or delete posts and links before deleting users.' ); ?></p> 29 <p><?php _e( 'Transfer or delete posts and links before deleting users.' ); ?></p> 30 <form action="edit.php?action=dodelete" method="post"> 31 <input type="hidden" name="dodelete" /> 163 164 wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) ); 165 exit(); 337 <h1 id="logo"><img alt="WordPress" src="<?php echo esc_attr( admin_url( 'images/wordpress-logo.png' ) ); ?>" /></h1> 338 <form action="edit.php?action=<?php echo esc_attr( $_GET['action2'] ) ?>" method="post"> 339 <input type="hidden" name="action" value="<?php echo esc_attr( $_GET['action2'] ) ?>" /> 393 $parent_file = 'users.php'; 394 require_once( '../admin-header.php' ); 395 echo '<div class="wrap">';misc.php https://github.com/muskmelon/Greemo.git | PHP | 588 lines
1<?php 2/** 159 160 // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP 161 if ( iis7_supports_permalinks() && ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) ) { 223function url_shorten( $url ) { 224 $short_url = str_replace( 'http://', '', stripslashes( $url )); 225 $short_url = str_replace( 'www.', '', $short_url ); 333 334 $option = str_replace('-', '_', $option); 335 336 $map_option = $option; 337 $type = str_replace('edit_', '', $map_option); 338 $type = str_replace('_per_page', '', $type); 540 * NOTE: use a trailing slash for folders!!! 541 * see http://bugs.php.net/bug.php?id=27609 542 * see http://bugs.php.net/bug.php?id=30931meta-boxes.php https://github.com/muskmelon/Greemo.git | PHP | 914 lines
30<?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 31<input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" tabindex="4" class="button button-highlighted" /> 32<?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 83<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> 84<a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 85 201 ?> 202<a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php 203} ?> 257 <?php foreach ( $post_formats[0] as $format ) : ?> 258 <br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label> 259 <?php endforeach; ?><br /> 286 <p><?php echo $taxonomy->labels->add_or_remove_items; ?></p> 287 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php echo $disabled; ?>><?php echo get_terms_to_edit( $post->ID, $tax_name ); // textarea_escaped by esc_attr() ?></textarea></div> 288 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?>media.php https://github.com/muskmelon/Greemo.git | PHP | 1568 lines
170var win = window.dialogArguments || opener || parent || top; 171win.send_to_editor('<?php echo addslashes($html); ?>'); 172/* ]]> */ 173</script> 174<?php 175 exit; 312<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 313<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> 314<head> 315<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 316<title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?></title> 317<?php 329addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 330var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time(); ?>'}; 331var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',file.php https://github.com/muskmelon/Greemo.git | PHP | 1059 lines
18 'footer.php' => __( 'Footer' ), 19 'header.php' => __( 'Header' ), 20 'sidebar.php' => __( 'Sidebar' ), 31 'functions.php' => __( 'Theme Functions' ), 32 'attachment.php' => __( 'Attachment Template' ), 33 'image.php' => __('Image Attachment Template'), 33 'image.php' => __('Image Attachment Template'), 34 'video.php' => __('Video Attachment Template'), 35 'audio.php' => __('Audio Attachment Template'), 36 'application.php' => __('Application Attachment Template'), 37 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), 38 '.htaccess' => __( '.htaccess (for rewrite rules )' ), 289 else 290 $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); 291 return call_user_func($upload_error_handler, $file, $error_msg);press-this.php https://github.com/muskmelon/Greemo.git | PHP | 652 lines
160 <a href="#" class="select"> 161 <img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr(__('Click to insert.')); ?>" title="<?php echo esc_attr(__('Click to insert.')); ?>" /> 162 </a> 164 165 <p id="options"><a href="#" class="select button"><?php _e('Insert Image'); ?></a> <a href="#" class="cancel button"><?php _e('Cancel'); ?></a></p> 166 <?php break; 314 } 315 jQuery('#extra-fields').html('<div class="postbox"><h2><?php _e( 'Add Photos' ); ?> <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>'); 316 jQuery('#img_container').html(strtoappend); 339var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'}; 340var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this', isRtl = <?php echo (int) is_rtl(); ?>; 341var photostorage = false; 377 case 'video' : 378 jQuery('#extra-fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() { 379 <?phpplugins.php https://github.com/muskmelon/Greemo.git | PHP | 407 lines
44 45 $result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), $network_wide); 46 if ( is_wp_error( $result ) ) { 61 if ( isset($_GET['from']) && 'import' == $_GET['from'] ) { 62 wp_redirect( self_admin_url("import.php?import=" . str_replace('-importer', '', dirname($plugin))) ); // overrides the ?error=true one above and redirects to the Imports page, stripping the -importer suffix 63 } else { 63 } else { 64 wp_redirect( self_admin_url("plugins.php?activate=true&plugin_status=$status&paged=$page&s=$s") ); // overrides the ?error=true one above 65 } 215 <div class="wrap"> 216 <?php 217 $files_to_delete = $plugin_info = array(); 249 <?php if ( $have_non_network_plugins && is_network_admin() ) : ?> 250 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo _n( 'This plugin may be active on other sites in the network.', 'These plugins may be active on other sites in the network.', $plugins_to_delete ); ?></p></div> 251 <?php endif; ?>custom-header.php https://github.com/muskmelon/Greemo.git | PHP | 791 lines
385 pickColor('#<?php echo $color; ?>'); 386 <?php } ?> 387 413 var xinit = <?php echo HEADER_IMAGE_WIDTH; ?>; 414 var yinit = <?php echo HEADER_IMAGE_HEIGHT; ?>; 415 var ratio = xinit / yinit; 473</div> 474<?php } ?> 475 486 ?> 487 <div id="headimg" style="max-width:<?php echo HEADER_IMAGE_WIDTH; ?>px;height:<?php echo HEADER_IMAGE_HEIGHT; ?>px;background-image:url(<?php esc_url ( header_image() ) ?>);"> 488 <?php 493 ?> 494 <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>"><?php bloginfo( 'name' ); ?></a></h1> 495 <div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>wp-app.php https://github.com/muskmelon/Greemo.git | PHP | 1611 lines
1<?php 2/** 15/** Set up WordPress environment */ 16require_once('./wp-load.php'); 17 18/** Atom Publishing Protocol Class */ 19require_once(ABSPATH . WPINC . '/atomlib.php'); 20 21/** Admin Image API for metadata updating */ 22require_once(ABSPATH . '/wp-admin/includes/image.php'); 23 23 24$_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] ); 25 72function wa_posts_where_include_drafts_filter($where) { 73 $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where); 74 return $where;media.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 1442 lines
1<?php 2/** 147 if ( $intermediate = image_get_intermediate_size($id, $size) ) { 148 $img_url = str_replace($img_url_basename, $intermediate['file'], $img_url); 149 $width = $intermediate['width']; 155 if ( ($thumb_file = wp_get_attachment_thumb_file($id)) && $info = getimagesize($thumb_file) ) { 156 $img_url = str_replace($img_url_basename, wp_basename($thumb_file), $img_url); 157 $width = $info[0]; 238/** 239 * Load an image from a string, if PHP supports it. 240 * 337 * @param bool $crop Optional, default is false. Whether to crop image or resize. 338 * @return bool|array False on failure. Returned array matches parameters for imagecopyresampled() PHP function. 339 */ 401 * 402 * Some functionality requires API to exist, so some PHP version may lose out 403 * support. This is not the fault of WordPress (where functionality isclass-wp.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 620 lines
1<?php 2/** 145 $pathinfo_array = explode('?', $pathinfo); 146 $pathinfo = str_replace("%", "%25", $pathinfo_array[0]); 147 $req_uri = $_SERVER['REQUEST_URI']; 149 $req_uri = $req_uri_array[0]; 150 $self = $_SERVER['PHP_SELF']; 151 $home_path = parse_url(home_url()); 161 // requested permalink. 162 $req_uri = str_replace($pathinfo, '', $req_uri); 163 $req_uri = trim($req_uri, '/'); 194 } 195 } else if ( $req_uri != 'wp-app.php' ) { 196 foreach ( (array) $rewrite as $match => $query ) { 235 // If req_uri is empty or if it is a request for ourself, unset error. 236 if ( empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) { 237 unset( $_GET['error'] );class-wp-customize-control.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 567 lines
138 protected function render() { 139 $id = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) ); 140 $class = 'customize-control customize-control-' . $this->type; 141 142 ?><li id="<?php echo esc_attr( $id ); ?>" class="<?php echo esc_attr( $class ); ?>"> 143 <?php $this->render_content(); ?> 170 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 171 <input type="text" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> /> 172 </label> 177 <label> 178 <input type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); checked( $this->value() ); ?> /> 179 <?php echo esc_html( $this->label ); ?> 194 <label> 195 <input type="radio" value="<?php echo esc_attr( $value ); ?>" name="<?php echo esc_attr( $name ); ?>" <?php $this->link(); checked( $this->value(), $value ); ?> /> 196 <?php echo esc_html( $label ); ?><br/>wp-dbmanager.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 603 lines
44 if (function_exists('add_submenu_page')) { 45 add_submenu_page('wp-dbmanager/database-manager.php', __('Backup DB', 'wp-dbmanager'), __('Backup DB', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-backup.php'); 46 add_submenu_page('wp-dbmanager/database-manager.php', __('Manage Backup DB', 'wp-dbmanager'), __('Manage Backup DB', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-manage.php'); 46 add_submenu_page('wp-dbmanager/database-manager.php', __('Manage Backup DB', 'wp-dbmanager'), __('Manage Backup DB', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-manage.php'); 47 add_submenu_page('wp-dbmanager/database-manager.php', __('Optimize DB', 'wp-dbmanager'), __('Optimize DB', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-optimize.php'); 48 add_submenu_page('wp-dbmanager/database-manager.php', __('Repair DB', 'wp-dbmanager'), __('Repair DB', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-repair.php'); 49 add_submenu_page('wp-dbmanager/database-manager.php', __('Empty/Drop Tables', 'wp-dbmanager'), __('Empty/Drop Tables', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-empty.php'); 50 add_submenu_page('wp-dbmanager/database-manager.php', __('Run SQL Query', 'wp-dbmanager'), __('Run SQL Query', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-run.php'); 51 add_submenu_page('wp-dbmanager/database-manager.php', __('DB Options', 'wp-dbmanager'), __('DB Options', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/wp-dbmanager.php', 'dbmanager_options'); 51 add_submenu_page('wp-dbmanager/database-manager.php', __('DB Options', 'wp-dbmanager'), __('DB Options', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/wp-dbmanager.php', 'dbmanager_options'); 52 add_submenu_page('wp-dbmanager/database-manager.php', __('Uninstall WP-DBManager', 'wp-dbmanager'), __('Uninstall WP-DBManager', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-uninstall.php'); 53 } 59function dbmanager_stylesheets_admin($hook_suffix) { 60 $dbmanager_admin_pages = array('wp-dbmanager/database-manager.php', 'wp-dbmanager/database-backup.php', 'wp-dbmanager/database-manage.php', 'wp-dbmanager/database-optimize.php', 'wp-dbmanager/database-repair.php', 'wp-dbmanager/database-empty.php', 'wp-dbmanager/database-run.php', 'database_page_wp-dbmanager/wp-dbmanager', 'wp-dbmanager/database-uninstall.php'); 61 if(in_array($hook_suffix, $dbmanager_admin_pages)) {MinifyAdmin.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 727 lines
1<?php 2 9 10require_once W3TC_INC_DIR . '/functions/rule.php'; 11require_once W3TC_LIB_W3_DIR . '/Plugin.php'; 20 function activate() { 21 require_once W3TC_INC_DIR . '/functions/activation.php'; 22 26 27 $file_index = W3TC_CONTENT_MINIFY_DIR . '/index.php'; 28 28 29 if (!@copy(W3TC_INSTALL_MINIFY_DIR . '/index.php', $file_index)) { 30 w3_writable_error($file_index); 59 60 @unlink(W3TC_CONTENT_MINIFY_DIR . '/index.php'); 61 }titles.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 489 lines
1<?php 2/** 117 foreach ($pagetypes as $key => $title) { 118 $key = str_replace('title_', '', $key); 119 if (call_user_func("is_$key")) return $key; 279 280 $title = str_replace(array_keys($variables), array_values($variables), htmlspecialchars($format)); 281 303 304 return str_replace( 305 array('{title}', '{num}', '{max}'), 313 314 //Remove any extensions (.html, .php, etc) 315 $url = preg_replace('|\\.[a-zA-Z]{1,4}$|', ' ', $url); 317 //Turn slashes to >> 318 $url = str_replace('/', ' » ', $url); 319content-autolinks.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 495 lines
1<?php 2/** 45 46 //Dummy vars; needed for PHP4 compat 47 $count = 0; 166 167 $content = sustr::htmlsafe_str_replace($h_anchor, $link, $content, $limit_enabled ? 1 : $lpa_lpu_limits, $new_count, $this->get_linkfree_tags()); 168 $link_count[$i] += $new_count; 396 $cells['link-options'] .= 397 $this->get_input_element('checkbox', "link_{$i}_nofollow", $link['nofollow'], str_replace(' ', ' ', __('Nofollow', 'seo-ultimate'))) 398 .'<br />' 398 .'<br />' 399 .$this->get_input_element('checkbox', "link_{$i}_target", $link['target'] == 'blank', str_replace(' ', ' ', __('New window', 'seo-ultimate'))); 400 if ($delete_option)grunion-contact-form.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 1382 lines
1<?php 2 16if ( is_admin() ) 17 require_once GRUNION_PLUGIN_DIR . '/admin.php'; 18 45 $string = wp_kses( $string, array() ); 46 return str_replace( '&', '&', $string ); // undo damage done by wp_kses_normalize_entities() 47 } 109 110 /* Can be dequeued by placing the following in wp-content/themes/yourtheme/functions.php 111 * 400 // Shortcode attributes can't contain "]" 401 $value = str_replace( ']', '', $value ); 402 $value = str_replace( ',', ',', $value ); // store commas encoded 455 // Shortcodes can't contain both '"' and "'". Strip one. 456 $value = str_replace( "'", '', $value ); 457 $value = "'$value'";admin.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 560 lines
1<?php 2 28 $plugin_url = esc_url( GRUNION_PLUGIN_URL ); 29 $site_url = esc_url( admin_url( "/admin-ajax.php?post_id={$iframe_post_id}&action=grunion_form_builder&TB_iframe=true&width=768" ) ); 30 36function display_form_view() { 37 require_once GRUNION_PLUGIN_DIR . 'grunion-form-view.php'; 38 exit; 80 81#icon-edit.icon32-posts-feedback, #icon-post.icon32-posts-feedback { background: url("<?php echo GRUNION_PLUGIN_URL; ?>images/grunion-menu-big.png") no-repeat !important; } 82@media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) { 82@media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) { 83 #icon-edit.icon32-posts-feedback, #icon-post.icon32-posts-feedback { background: url("<?php echo GRUNION_PLUGIN_URL; ?>images/grunion-menu-big-2x.png") no-repeat !important; background-size: 30px 31px !important; } 84} 89 90<?php 91}sitemap-core.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 1691 lines
1<?php 2/* 3 4 $Id: sitemap-core.php 583237 2012-08-08 21:06:12Z arnee $ 5 359 function EscapeXML($string) { 360 return str_replace ( array ( '&', '"', "'", '<', '>'), array ( '&' , '"', ''' , '<' , '>'), $string); 361 }disqus.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 1366 lines
1<?php 2/* 16 17require_once(dirname(__FILE__) . '/lib/wp-api.php'); 18 29define('DISQUS_RSS_PATH', '/latest.rss'); 30define('DISQUS_CAN_EXPORT', is_file(dirname(__FILE__) . '/export.php')); 31if (!defined('DISQUS_DEBUG')) { 74 75 // From WP2.5 wp-includes/plugin.php:plugin_basename() 76 $file = str_replace('\\','/',$file); // sanitize for Win32 installsapi.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 1034 lines
1<?php 2 49 { 50 $user_id = str_replace('user_', '', $post_id); 51 137 { 138 $temp_post_id = str_replace('user_', '', $post_id); 139 $field_key = get_user_meta($temp_post_id, '_' . $field_key, true); 667 ?> 668 <form action="" id="post" method="post" <?php if($options['form_attributes']){foreach($options['form_attributes'] as $k => $v){echo $k . '="' . $v .'" '; }} ?>> 669 <div style="display:none"> 670 <input type="hidden" name="acf_save" value="true" /> 671 <input type="hidden" name="post_id" value="<?php echo $options['post_id']; ?>" /> 672 <input type="hidden" name="return" value="<?php echo $options['return']; ?>" /> 672 <input type="hidden" name="return" value="<?php echo $options['return']; ?>" /> 673 <?php wp_editor('', 'acf_settings'); ?> 674 </div>settings.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 337 lines
110if ( isset( $_GET['updated'] ) ) { 111 ?><div id="message" class="updated"><p><?php _e( 'Options saved.' ) ?></p></div><?php 112} 149 <td> 150 <label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none') ?> /> <?php _e( 'Registration is disabled.' ); ?></label><br /> 151 <label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered.' ); ?></label><br /> 151 <label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered.' ); ?></label><br /> 152 <label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog') ?> /> <?php _e( 'Logged in users may register new sites.' ); ?></label><br /> 153 <label><input name="registration" type="radio" id="registration4" value="all"<?php checked( $reg, 'all') ?> /> <?php _e( 'Both sites and user accounts can be registered.' ); ?></label><br /> 166 <td> 167 <label><input name="registrationnotification" type="checkbox" id="registrationnotification" value="yes"<?php checked( get_site_option( 'registrationnotification' ), 'yes' ) ?> /> <?php _e( 'Send the network admin an email notification every time someone registers a site or user account.' ) ?></label> 168 </td> 279 <td> 280 <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br /> 281 </td>meta-boxes.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 919 lines
30<?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 31<input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" tabindex="4" class="button button-highlighted" /> 32<?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 83<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> 84<a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 85 199 ?> 200<a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php 201} ?> 255 <?php foreach ( $post_formats[0] as $format ) : ?> 256 <br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label> 257 <?php endforeach; ?><br /> 284 <p><?php echo $taxonomy->labels->add_or_remove_items; ?></p> 285 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php echo $disabled; ?>><?php echo str_replace( ',', $comma . ' ', get_terms_to_edit( $post->ID, $tax_name ) ); // textarea_escaped by esc_attr() ?></textarea></div> 286 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?>image.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 463 lines
1<?php 2/** 11 * 12 * This function can handle most image file formats which PHP supports. If PHP 13 * does not have the functionality to save in a file of the same format, the 83 if ( ! $dst_file ) 84 $dst_file = str_replace( basename( $src_file ), 'cropped-' . basename( $src_file ), $src_file ); 85export.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 436 lines
342<?php foreach ( $cats as $c ) : ?> 343 <wp:category><wp:term_id><?php echo $c->term_id ?></wp:term_id><wp:category_nicename><?php echo $c->slug; ?></wp:category_nicename><wp:category_parent><?php echo $c->parent ? $cats[$c->parent]->slug : ''; ?></wp:category_parent><?php wxr_cat_name( $c ); ?><?php wxr_category_description( $c ); ?></wp:category> 344<?php endforeach; ?> 345<?php foreach ( $tags as $t ) : ?> 346 <wp:tag><wp:term_id><?php echo $t->term_id ?></wp:term_id><wp:tag_slug><?php echo $t->slug; ?></wp:tag_slug><?php wxr_tag_name( $t ); ?><?php wxr_tag_description( $t ); ?></wp:tag> 347<?php endforeach; ?> 348<?php foreach ( $terms as $t ) : ?> 349 <wp:term><wp:term_id><?php echo $t->term_id ?></wp:term_id><wp:term_taxonomy><?php echo $t->taxonomy; ?></wp:term_taxonomy><wp:term_slug><?php echo $t->slug; ?></wp:term_slug><wp:term_parent><?php echo $t->parent ? $terms[$t->parent]->slug : ''; ?></wp:term_parent><?php wxr_term_name( $t ); ?><?php wxr_term_description( $t ); ?></wp:term> 350<?php endforeach; ?> 371 <link><?php the_permalink_rss() ?></link> 372 <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate> 373 <dc:creator><?php echo get_the_author_meta( 'login' ); ?></dc:creator> 406 <wp:comment> 407 <wp:comment_id><?php echo $c->comment_ID; ?></wp:comment_id> 408 <wp:comment_author><?php echo wxr_cdata( $c->comment_author ); ?></wp:comment_author>ajax-actions.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 1640 lines
1<?php 2/** 70 if ( ',' !== $comma ) 71 $s = str_replace( $comma, ',', $s ); 72 if ( false !== strpos( $s, ',' ) ) { 137 138 include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); 139 if ( ! stream_preview_image($post_id) ) 195function wp_ajax_dashboard_widgets() { 196 require ABSPATH . 'wp-admin/includes/dashboard.php'; 197 323 'id' => $cat_id, 324 'data' => str_replace( array("\n", "\t"), '', $data), 325 'position' => -1 346 'id' => $term_id, 347 'data' => str_replace( array("\n", "\t"), '', $data), 348 'position' => -1press-this.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 654 lines
155 <a href="#" class="select"> 156 <img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr(__('Click to insert.')); ?>" title="<?php echo esc_attr(__('Click to insert.')); ?>" /> 157 </a> 221 type: "GET", 222 url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>", 223 cache : false, 290 291 jQuery('#extra-fields').html('<div class="postbox"><h2><?php _e( 'Add Photos' ); ?> <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>'); 292 jQuery('#img_container').html(strtoappend); 306var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'}; 307var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'press-this', isRtl = <?php echo (int) is_rtl(); ?>; 308var photostorage = false; 349 case 'video' : 350 jQuery('#extra-fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() { 351 <?phpmodule.tag.apetag.php https://gitlab.com/Gashler/dp | PHP | 370 lines
1<?php 2///////////////////////////////////////////////////////////////// 9// // 10// module.tag.apetag.php // 11// module for analyzing APE tags // 24 if (!getid3_lib::intValueSupported($info['filesize'])) { 25 $info['warning'][] = 'Unable to check for APEtags because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB'; 26 return false; 149 case 'replaygain_track_gain': 150 $thisfile_replaygain['track']['adjustment'] = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero! 151 $thisfile_replaygain['track']['originator'] = 'unspecified'; 154 case 'replaygain_track_peak': 155 $thisfile_replaygain['track']['peak'] = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero! 156 $thisfile_replaygain['track']['originator'] = 'unspecified'; 162 case 'replaygain_album_gain': 163 $thisfile_replaygain['album']['adjustment'] = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero! 164 $thisfile_replaygain['album']['originator'] = 'unspecified';module.audio.flac.php https://gitlab.com/Gashler/dp | PHP | 442 lines
1<?php 2///////////////////////////////////////////////////////////////// 9// // 10// module.audio.flac.php // 11// module for analyzing FLAC and OggFLAC audio files // 11// module for analyzing FLAC and OggFLAC audio files // 12// dependencies: module.audio.ogg.php // 13// /// 16 17getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, true); 18 129 if (!empty($info['flac']['VORBIS_COMMENT']['vendor'])) { 130 $info['audio']['encoder'] = str_replace('reference ', '', $info['flac']['VORBIS_COMMENT']['vendor']); 131 } 360 $picture['data'] = $this->saveAttachment( 361 str_replace('/', '_', $picture['type']).'_'.$this->ftell(), 362 $this->ftell(),getid3.php https://gitlab.com/Gashler/dp | PHP | 1405 lines
117 if (version_compare(PHP_VERSION, $required_php_version, '<')) { 118 $this->startup_error .= 'getID3() requires PHP v'.$required_php_version.' or higher - you are running v'.PHP_VERSION; 119 return false; 135 } elseif ($this->memory_limit <= 12582912) { 136 $this->startup_warning .= 'PHP has less than 12MB available memory and might run out if all modules are loaded. Increase memory_limit in php.ini'; 137 } 290 fclose($this->fp); 291 throw new getid3_exception('Unable to determine actual filesize. File is most likely larger than '.round(PHP_INT_MAX / 1073741824).'GB and is not supported by PHP.'); 292 } elseif (getid3_lib::intValueSupported($real_filesize)) { 294 fclose($this->fp); 295 throw new getid3_exception('PHP seems to think the file is larger than '.round(PHP_INT_MAX / 1073741824).'GB, but filesystem reports it as '.number_format($real_filesize, 3).'GB, please report to info@getid3.org'); 296 } 297 $this->info['filesize'] = $real_filesize; 298 $this->warning('File is larger than '.round(PHP_INT_MAX / 1073741824).'GB (filesystem reports it as '.number_format($real_filesize, 3).'GB) and is not properly supported by PHP.'); 299 }getid3.lib.php https://gitlab.com/Gashler/dp | PHP | 1341 lines
1<?php 2///////////////////////////////////////////////////////////////// 7// // 8// getid3.lib.php - part of getID3() // 9// See readme.txt for more details // 84 if (!$hasINT64 && !defined('PHP_INT_MIN')) { 85 define('PHP_INT_MIN', ~PHP_INT_MAX); 86 } 88 // if integers are 64-bit - no other check required 89 if ($hasINT64 || (($num <= PHP_INT_MAX) && ($num >= PHP_INT_MIN))) { 90 return true; 122 $exponent += ($pointpos - 1); 123 $binarypointnumber = str_replace('.', '', $binarypointnumber); 124 $binarypointnumber = $binarypointnumber{0}.'.'.substr($binarypointnumber, 1); 385 // written by kcØhireability*com 386 // taken from http://www.php.net/manual/en/function.array-merge-recursive.php 387 if (!is_array($array1) || !is_array($array2)) {