Posts Tagged ‘’

wordpress relative url

Monday, June 30th, 2008

edit wp-includes/functions.php

--
function get_option( $setting ) {
	global $wpdb;

	if (in_array($setting, array('siteurl', 'home'))) {
		if (ereg('(wp-includes)', $_SERVER['PHP_SELF'], $r)) {
			return ('http://'.$_SERVER['SERVER_NAME'].(
				substr(
					$_SERVER['PHP_SELF'], 0,
					strpos($_SERVER['PHP_SELF'], $r[0])
				)
			));
		} else if (ereg('wp-admin', $_SERVER['PHP_SELF'])) {
			return 'http://'.$_SERVER['SERVER_NAME']
			. dirname(dirname($_SERVER['PHP_SELF']));
		} else {
			$_SERVER_PHP_SELF = $_SERVER['PHP_SELF'];
			$_SERVER_SCRIPT_FILENAME = $_SERVER['SCRIPT_FILENAME'];
			while ($_SERVER_SCRIPT_FILENAME = dirname($_SERVER_SCRIPT_FILENAME)) {
				$_SERVER_PHP_SELF = dirname($_SERVER_PHP_SELF);
				if (file_exists($_SERVER_SCRIPT_FILENAME.'/wp-content')) {
					break;
				}
				if ($_SERVER_SCRIPT_FILENAME == '.') break;
			}
			return 'http://'.$_SERVER['SERVER_NAME'].$_SERVER_PHP_SELF;
		}
	}
--

PDT: PHP Development Tools for Eclipse Platform

Friday, June 27th, 2008

The PDT project provides a PHP Development Tools framework for the Eclipse platform. This project encompasses all development components necessary to develop PHP and facilitate extensibility. It leverages the existing Web Tools Project in providing developers with PHP capabilities.

Project Principles:
* Intuitive and easy to learn
* Seamless integration with the Web Tools project
* Adherence to Eclipse standards
* Extensibility
* Continuous support of PHP developments

phpDocumentor

Friday, June 27th, 2008

phpDocumentor tags are very similar to tags for the JavaDoc tool for Sun’s Java Programming Language. Tags are only parsed if they are the first thing on a new line of a DocBlock. You may use the @ character freely throughout documents as long as it does not begin a new line. An example:

/**
* tags demonstration
* @author this tag is parsed, but this @version tag is ignored
* @version 1.0 this version tag is parsed
*/