Make WordPress Core

Ticket #7550: 7550.r8991.diff

File 7550.r8991.diff, 12.5 KB (added by jacobsantos, 16 years ago)

File level inline documentation for default themes and plugins to prevent injection into default WordPress namespace, based off of r8991

  • wp-admin/js/revisions-js.php

     
    11<?php
     2
    23if ( !defined( 'ABSPATH' ) )
    34        exit;
    45
     6/** @ignore */
    57function dvortr( $str ) {
    68        return strtr(
    79                $str,
  • wp-content/plugins/hello.php

     
    11<?php
     2/**
     3 * @package Hello_Dolly
     4 */
    25/*
    36Plugin Name: Hello Dolly
    47Plugin URI: http://wordpress.org/#
     
    811Author URI: http://ma.tt/
    912*/
    1013
    11 // These are the lyrics to Hello Dolly
     14/** These are the lyrics to Hello Dolly */
    1215$lyrics = "Hello, Dolly
    1316Well, hello, Dolly
    1417It's so nice to have you back where you belong
  • wp-content/themes/classic/comments-popup.php

     
    11<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Classic_Theme
     5 */
     6
    27/* Don't remove these lines. */
    38add_filter('comment_text', 'popuplinks');
    49while( have_posts()) : the_post();
  • wp-content/themes/classic/comments.php

     
    1 <?php if ( post_password_required() ) : ?>
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Classic_Theme
     5 */
     6
     7if ( post_password_required() ) : ?>
    28<p><?php _e('Enter your password to view comments.'); ?></p>
    39<?php return; endif; ?>
    410
  • wp-content/themes/classic/footer.php

     
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Classic_Theme
     5 */
     6?>
    17<!-- begin footer -->
    28</div>
    39
  • wp-content/themes/classic/functions.php

     
    11<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Classic_Theme
     5 */
    26if ( function_exists('register_sidebar') )
    37        register_sidebar(array(
    4         'before_widget' => '<li id="%1$s" class="widget %2$s">',
    5         'after_widget' => '</li>',
    6         'before_title' => '',
    7         'after_title' => '',
    8     ));
     8                'before_widget' => '<li id="%1$s" class="widget %2$s">',
     9                'after_widget' => '</li>',
     10                'before_title' => '',
     11                'after_title' => '',
     12        ));
    913
    1014?>
  • wp-content/themes/classic/header.php

     
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Classic_Theme
     5 */
     6?>
    17<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    28<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    39
  • wp-content/themes/classic/index.php

     
    11<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Classic_Theme
     5 */
    26get_header();
    37?>
    48
  • wp-content/themes/classic/sidebar.php

     
    1 
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Classic_Theme
     5 */
     6?>
    27<!-- begin sidebar -->
    38<div id="menu">
    49
  • wp-content/themes/default/404.php

     
    1 <?php get_header(); ?>
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26
     7get_header();
     8?>
     9
    310        <div id="content" class="narrowcolumn">
    411
    512                <h2 class="center">Error 404 - Not Found</h2>
  • wp-content/themes/default/archive.php

     
    1 <?php get_header(); ?>
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26
     7get_header();
     8?>
     9
    310        <div id="content" class="narrowcolumn">
    411
    512                <?php if (have_posts()) : ?>
  • wp-content/themes/default/archives.php

     
    11<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26/*
    37Template Name: Archives
    48*/
  • wp-content/themes/default/comments-popup.php

     
    11<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
     6
    27/* Don't remove these lines. */
    38add_filter('comment_text', 'popuplinks');
    49while ( have_posts()) : the_post();
  • wp-content/themes/default/comments.php

     
    1 <?php // Do not delete these lines
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
     6
     7// Do not delete these lines
    28        if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    39                die ('Please do not load this page directly. Thanks!');
    410
  • wp-content/themes/default/footer.php

     
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
     6?>
    17
    28<hr />
    39<div id="footer">
  • wp-content/themes/default/functions.php

     
    11<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
     6
    27if ( function_exists('register_sidebar') )
    38    register_sidebar(array(
    49        'before_widget' => '<li id="%1$s" class="widget %2$s">',
     
    712        'after_title' => '</h2>',
    813    ));
    914
     15/** @ignore */
    1016function kubrick_head() {
    1117        $head = "<style type='text/css'>\n<!--";
    1218        $output = '';
  • wp-content/themes/default/header.php

     
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
     6?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    27<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    38
    49<head profile="http://gmpg.org/xfn/11">
  • wp-content/themes/default/image.php

     
    1 <?php get_header(); ?>
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26
     7get_header();
     8?>
     9
    310        <div id="content" class="widecolumn">
    411
    512  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
     
    815                        <h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> &raquo; <?php the_title(); ?></h2>
    916                        <div class="entry">
    1017                                <p class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></a></p>
    11                 <div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
     18                                <div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
    1219
    1320                                <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
    1421
  • wp-content/themes/default/images/header-img.php

     
    11<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26
     7/** @ignore */
    38$img = 'kubrickheader.jpg';
    49
    510// If we don't have image processing support, redirect.
  • wp-content/themes/default/index.php

     
    1 <?php get_header(); ?>
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26
     7get_header(); ?>
     8
    39        <div id="content" class="narrowcolumn">
    410
    511        <?php if (have_posts()) : ?>
  • wp-content/themes/default/links.php

     
    11<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
     6
    27/*
    38Template Name: Links
    49*/
  • wp-content/themes/default/page.php

     
    1 <?php get_header(); ?>
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26
     7get_header(); ?>
     8
    39        <div id="content" class="narrowcolumn">
    410
    511                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  • wp-content/themes/default/search.php

     
    1 <?php get_header(); ?>
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26
     7get_header(); ?>
     8
    39        <div id="content" class="narrowcolumn">
    410
    511        <?php if (have_posts()) : ?>
  • wp-content/themes/default/searchform.php

     
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
     6?>
    17<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    28<label class="hidden" for="s"><?php _e('Search for:'); ?></label>
    39<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
  • wp-content/themes/default/sidebar.php

     
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
     6?>
    17        <div id="sidebar">
    28                <ul>
    39                        <?php   /* Widgetized sidebar, if you have the plugin installed. */
  • wp-content/themes/default/single.php

     
    1 <?php get_header(); ?>
     1<?php
     2/**
     3 * @package WordPress
     4 * @subpackage Default_Theme
     5 */
    26
     7get_header();
     8?>
     9
    310        <div id="content" class="widecolumn">
    411
    512        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>