From 66514c397e7933c414d43da843c96a460eb0d757 Mon Sep 17 00:00:00 2001 From: Setola Date: Wed, 10 Apr 2013 13:52:32 +0200 Subject: [PATCH] documentation improvements --- AjaxImageGenerator.class.php | 4 +-- ClassAutoloader.class.php | 6 ++++- DebugUtils.class.php | 9 +++++++ DefaultAssets.class.php | 1 + DefaultAssetsCDN.class.php | 1 + EscapeRoute.class.php | 5 +++- FeatureWithAssets.class.php | 8 ++++-- ForceDownload.class.php | 1 + GMapDataRetriever.class.php | 1 + GalleryHelper.class.php | 1 + GaussianMath.class.php | 1 + GeneratorDictionary.class.php | 1 + HashAnchorWalkerNavMenu.class.php | 1 + HeadHelper.class.php | 2 ++ HtmlHelper.class.php | 1 + ImageGenerator.class.php | 9 ++++--- ImagePreload.class.php | 1 + LevelWalkerNavMenu.class.php | 2 ++ LipsumGenerator.class.php | 2 ++ LoremIpsumDictionary.class.php | 2 ++ MinigalleryBigImageWithThumbs.class.php | 1 + MinigalleryThumbsLinkToBig.class.php | 1 + NewBlogInitializator.class.php | 26 ++++++++++++++++---- OneImageForAll.class.php | 1 + PhotogalleryThumbWithFancybox.class.php | 2 ++ RemoveSpacesWalkerNavMenu.class.php | 1 + RuntimeInfos.class.php | 5 +++- ShortcodeForTabs.class.php | 5 ++++ ShowItemExcerptWalkerNavMenu.class.php | 1 + ShowTitleThumbExcerptWalkerNavMenu.class.php | 1 + SimpleFieldsQuickConfig.class.php | 4 ++- SpecialOffersSnippet.class.php | 6 ++++- SpecialOffersSnippetAjax.class.php | 2 ++ SubstitutionTemplate.class.php | 1 + ThemeHelpers.class.php | 5 +++- TinyMCEExcerpt.class.php | 2 ++ 36 files changed, 105 insertions(+), 18 deletions(-) diff --git a/AjaxImageGenerator.class.php b/AjaxImageGenerator.class.php index f795b6e..21e4f3d 100644 --- a/AjaxImageGenerator.class.php +++ b/AjaxImageGenerator.class.php @@ -6,11 +6,11 @@ /** * Hooks the ImageGenerator class to admin-ajax action + * * @author etessore * @version 1.0.0 + * @package classes * - * 1.0.0 - * Initial release */ class AjaxImageGenerator{ /** diff --git a/ClassAutoloader.class.php b/ClassAutoloader.class.php index c632fa6..4d76ecd 100644 --- a/ClassAutoloader.class.php +++ b/ClassAutoloader.class.php @@ -7,7 +7,11 @@ * Autoload needed classes * @author etessore * @version 1.0.1 - * + * @package classes + */ + +/* + * Changelog: * 1.0.1 * support multiple search path to allow children theme to extend classes * 1.0.0 diff --git a/DebugUtils.class.php b/DebugUtils.class.php index 2420d5c..767dbcf 100644 --- a/DebugUtils.class.php +++ b/DebugUtils.class.php @@ -6,6 +6,7 @@ /** * Utils to debug the code while writing it. * @author Emanuele 'Tex' Tessore + * @package classes */ final class DebugUtils { @@ -141,6 +142,8 @@ public function set_title($title){ * Quick and dirty way to know a variable value * vd stand for var_dump() and die() * @param mixed $var the variable to be dumped + * @package debug + * @version 1.0.0 */ function vd($var){ DebugUtils::get_instance() @@ -155,6 +158,8 @@ function vd($var){ * Quick and dirty way to know a variable value * Usefull in a loop cause it doesn't break the execution with die * @param mixed $var the variable to be dumped + * @package debug + * @version 1.0.0 */ function v($var){ DebugUtils::get_instance() @@ -169,6 +174,8 @@ function v($var){ * Quick and dirty way to know a variable value in a production enviroment * vc stand for var_dump() on a comment * @param mixed $var the variable to be dumped + * @package debug + * @version 1.0.0 */ function vc($var){ DebugUtils::get_instance() @@ -183,6 +190,8 @@ function vc($var){ * Quick and dirty way to know a variable value. * It uses the last changed mode. * @param mixed $var the variable to be dumped + * @package debug + * @version 1.0.0 */ function debug($var){ DebugUtils::get_instance() diff --git a/DefaultAssets.class.php b/DefaultAssets.class.php index 9062c08..76694ff 100644 --- a/DefaultAssets.class.php +++ b/DefaultAssets.class.php @@ -7,6 +7,7 @@ * Register some useful assets in WordPress * @author etessore * @version 1.0.1 + * @package classes */ class DefaultAssets{ /** diff --git a/DefaultAssetsCDN.class.php b/DefaultAssetsCDN.class.php index e0ae79f..7d8d57d 100644 --- a/DefaultAssetsCDN.class.php +++ b/DefaultAssetsCDN.class.php @@ -11,6 +11,7 @@ * * @author etessore * @since 1.0 + * @package classes * */ class DefaultAssetsCDN extends DefaultAssets{ diff --git a/EscapeRoute.class.php b/EscapeRoute.class.php index 6924ca5..b51da19 100644 --- a/EscapeRoute.class.php +++ b/EscapeRoute.class.php @@ -7,7 +7,10 @@ * Manages the navigation links on a 404 page * @author etessore * @version 1.0.1 - * + * @package classes + */ + +/* * Changelog * 1.0.1 * moved from ThemeHelpers to HtmlHelper class diff --git a/FeatureWithAssets.class.php b/FeatureWithAssets.class.php index 7c43801..2d9b70c 100644 --- a/FeatureWithAssets.class.php +++ b/FeatureWithAssets.class.php @@ -11,8 +11,12 @@ * You have to take care of it by yourself (tipically in assets.php) * @author etessore * @version 1.0.1 - * - * 1.0.1 + * @package classes + */ + +/* + * Changelog: + * 1.0.1 * Fixed Notice: wp_enqueue_script was called incorrectly * 1.0.0 * Initial release diff --git a/ForceDownload.class.php b/ForceDownload.class.php index 580af3e..8798b01 100644 --- a/ForceDownload.class.php +++ b/ForceDownload.class.php @@ -7,6 +7,7 @@ * Force an attachment to be downloaded * @author etessore * @version 1.0.0 + * @package classes */ class ForceDownload{ diff --git a/GMapDataRetriever.class.php b/GMapDataRetriever.class.php index 0b4cf1f..be34ddd 100644 --- a/GMapDataRetriever.class.php +++ b/GMapDataRetriever.class.php @@ -7,6 +7,7 @@ * Retrieves GMaps data for the gmap.js integration * @author etessore * @version 1.0 + * @package classes */ class GMapDataRetriever { /** diff --git a/GalleryHelper.class.php b/GalleryHelper.class.php index 59f6cf5..cb38fed 100644 --- a/GalleryHelper.class.php +++ b/GalleryHelper.class.php @@ -7,6 +7,7 @@ * Extend this with your nice and candy classes! * @author etessore * @version 1.0.2 + * @package classes */ abstract class GalleryHelper extends FeatureWithAssets{ diff --git a/GaussianMath.class.php b/GaussianMath.class.php index aa3ff60..57620f2 100644 --- a/GaussianMath.class.php +++ b/GaussianMath.class.php @@ -6,6 +6,7 @@ /** * The following object is used to compute numbers with a gaussian distribution * @link http://us.php.net/manual/en/function.rand.php#53784 + * @package classes */ class GaussianMath{ diff --git a/GeneratorDictionary.class.php b/GeneratorDictionary.class.php index 90a782e..27cd465 100644 --- a/GeneratorDictionary.class.php +++ b/GeneratorDictionary.class.php @@ -7,6 +7,7 @@ * Maintans a set of words for a sentences generator * @author etessore * @version 1.0.0 + * @package classes * @todo maintain an ordinate array so that * insertion and deletion will be more efficent */ diff --git a/HashAnchorWalkerNavMenu.class.php b/HashAnchorWalkerNavMenu.class.php index d66a829..b6192ea 100644 --- a/HashAnchorWalkerNavMenu.class.php +++ b/HashAnchorWalkerNavMenu.class.php @@ -7,6 +7,7 @@ * Menu Walker to have the la tocke of the url as hash * ex: http://www.fastbooking.net/clients/#africa * @author etessore + * @package classes */ class HashAnchorWalkerNavMenu extends Walker_Nav_Menu{ /** diff --git a/HeadHelper.class.php b/HeadHelper.class.php index fed1033..5b9d436 100644 --- a/HeadHelper.class.php +++ b/HeadHelper.class.php @@ -6,6 +6,8 @@ /** * Some helper for the code inside tag * @author etessore + * @version 1.0.0 + * @package classes * */ class HeadHelper{ diff --git a/HtmlHelper.class.php b/HtmlHelper.class.php index f45ba5d..75edebc 100644 --- a/HtmlHelper.class.php +++ b/HtmlHelper.class.php @@ -7,6 +7,7 @@ * Helper class useful to generate some html tags * @author etessore * @version 1.0.0 + * @package classes */ class HtmlHelper extends HtmlBuilder{ diff --git a/ImageGenerator.class.php b/ImageGenerator.class.php index 67be36c..224cb5c 100644 --- a/ImageGenerator.class.php +++ b/ImageGenerator.class.php @@ -6,11 +6,14 @@ * Generates paceholder images * @author etessore * @version 1.0.1 - * + * @package classes + */ +/* + * Changelog: * 1.0.1 - * added hooks into wordpress + * added hooks into wordpress * 1.0.0 - * Initial release + * Initial release */ class ImageGenerator{ /** diff --git a/ImagePreload.class.php b/ImagePreload.class.php index 8fcce1b..4a4e4e3 100644 --- a/ImagePreload.class.php +++ b/ImagePreload.class.php @@ -9,6 +9,7 @@ * Takes care of image preloading with jQuery imagesloaded * @author etessore * @version 1.0.0 + * @package classes */ class ImagePreload extends GalleryHelper{ diff --git a/LevelWalkerNavMenu.class.php b/LevelWalkerNavMenu.class.php index 6d9e198..466c2d4 100644 --- a/LevelWalkerNavMenu.class.php +++ b/LevelWalkerNavMenu.class.php @@ -6,6 +6,8 @@ /** * Adds the level for the current menu element * @author etessore + * @version 1.0.0 + * @package classes * */ class LevelWalkerNavMenu extends Walker_Nav_Menu { diff --git a/LipsumGenerator.class.php b/LipsumGenerator.class.php index ee6e8e4..10b5a65 100644 --- a/LipsumGenerator.class.php +++ b/LipsumGenerator.class.php @@ -6,6 +6,8 @@ /** * Generates Lorem Ipsum text * @author etessore + * @version 1.0.0 + * @package classes */ class LipsumGenerator { diff --git a/LoremIpsumDictionary.class.php b/LoremIpsumDictionary.class.php index 62cba55..9b9e6c1 100644 --- a/LoremIpsumDictionary.class.php +++ b/LoremIpsumDictionary.class.php @@ -6,6 +6,8 @@ /** * Stores the dictionary for generating 'Lorem ipsum...' text * @author etessore + * @version 1.0.0 + * @package classes */ class LoremIpsumDictionary extends GeneratorDictionary{ diff --git a/MinigalleryBigImageWithThumbs.class.php b/MinigalleryBigImageWithThumbs.class.php index 454057f..c1271d6 100644 --- a/MinigalleryBigImageWithThumbs.class.php +++ b/MinigalleryBigImageWithThumbs.class.php @@ -7,6 +7,7 @@ * with a big image and some small thumbs * @author etessore * @version 1.0.0 + * @package classes */ class MinigalleryBigImageWithThumbs extends GalleryHelper{ /** diff --git a/MinigalleryThumbsLinkToBig.class.php b/MinigalleryThumbsLinkToBig.class.php index acc5825..9432dc8 100644 --- a/MinigalleryThumbsLinkToBig.class.php +++ b/MinigalleryThumbsLinkToBig.class.php @@ -9,6 +9,7 @@ * By default loads FancyBox so to have an eye candy popup effect. * @author etessore * @version 1.0.0 + * @package classes */ class MinigalleryThumbsLinkToBig extends GalleryHelper{ /** diff --git a/NewBlogInitializator.class.php b/NewBlogInitializator.class.php index f6030dd..4d787eb 100644 --- a/NewBlogInitializator.class.php +++ b/NewBlogInitializator.class.php @@ -9,6 +9,7 @@ * * @author etessore * @version 1.0.0 + * @package classes * */ class NewBlogInitializator{ @@ -31,6 +32,9 @@ class NewBlogInitializator{ */ private $pages = array(); + /** + * Hooks the initial data filling into WordPress + */ public function hook(){ add_action('wpmu_new_blog', array(&$this, 'init'), 10, 1); } @@ -177,8 +181,8 @@ public function add_menu_entry($index, $menu_id){ /** * Adds all automatically generated pages to the given menu * @param int $menu_id the menu id - * @params int $start the first element index - * @params int $end the last element index + * @param int $start the first element index + * @param int $end the last element index * @return NewBlogInitializator $this for chainability */ public function add_menu_entries($menu_id, $start=0, $end=null){ @@ -208,11 +212,23 @@ public function reset_page_list(){ * Then tries to create style.css in the newly * theme folder and fill it with the default header comment * + * An example of parameters: + * + * $defaults = array( + * 'name' => 'Wordpress Theme Utils Child Theme', + * 'folder' => 'wtu-child-theme', + * 'child_of' => 'Wordpress-Theme-Utils', + * 'description' => 'This is a Child Theme of Wordpress Theme Utils', + * 'theme_uri' => 'http://www.emanueletessore.com/', + * 'author' => 'Emanuele Tessore', + * 'author_uri' => 'http://www.emanueletessore.com/', + * 'version' => '1.0.0' + * ); + * + * * Uses {@link http://codex.wordpress.org/Function_Reference/wp_die wp_die()} if something goes wrong * - * @param string $name the name of your new child theme. Spaces and tags will be stripped - * @param string $child_of the parent theme, default hotel-template - * @param string $description the description of the theme will be showed in WP backend + * @param array $parms parameters for the new theme * @return NewBlogInitializator $this for chainability */ public function add_theme($parms=null){ diff --git a/OneImageForAll.class.php b/OneImageForAll.class.php index a50f85f..a583a6f 100644 --- a/OneImageForAll.class.php +++ b/OneImageForAll.class.php @@ -8,6 +8,7 @@ * Important: every image have the same sizes and jpeg quality. * @author etessore * @version 1.0.0 + * @package classes */ class OneImageForAll extends GalleryHelper{ /** diff --git a/PhotogalleryThumbWithFancybox.class.php b/PhotogalleryThumbWithFancybox.class.php index f8ef13f..b654d4c 100644 --- a/PhotogalleryThumbWithFancybox.class.php +++ b/PhotogalleryThumbWithFancybox.class.php @@ -7,6 +7,8 @@ * Manages images and markup for a photogallery where * clicking on a little thumb opens the big image in fancybox * @author etessore + * @version 1.0.0 + * @package classes */ class PhotogalleryThumbWithFancybox extends GalleryHelper{ diff --git a/RemoveSpacesWalkerNavMenu.class.php b/RemoveSpacesWalkerNavMenu.class.php index 86af5ee..50972a5 100644 --- a/RemoveSpacesWalkerNavMenu.class.php +++ b/RemoveSpacesWalkerNavMenu.class.php @@ -10,6 +10,7 @@ * text-align: center; * @author etessore * @version 1.0.0 + * @package classes */ class RemoveSpacesWalkerNavMenu extends Walker_Nav_Menu { /** diff --git a/RuntimeInfos.class.php b/RuntimeInfos.class.php index 1db9344..bb1d447 100644 --- a/RuntimeInfos.class.php +++ b/RuntimeInfos.class.php @@ -7,7 +7,10 @@ * Manages a set of info to be printed as a json generally at the endo of the page * @author etessore * @version 1.0.1 - * + * @package classes + */ + +/* * Changelog * 1.0.1 * solved notice of undefined post on 404 pages diff --git a/ShortcodeForTabs.class.php b/ShortcodeForTabs.class.php index 1caf478..a7834c4 100644 --- a/ShortcodeForTabs.class.php +++ b/ShortcodeForTabs.class.php @@ -22,6 +22,7 @@ * * @author etessore * @version 1.0.0 + * @package classes * @since 1.0 */ class ShortcodeForTabs{ @@ -73,6 +74,8 @@ public function __construct(){ /** * Register the needed shortcodes with WordPress subsystem + * @param boolean $tab true if you want to enable the shortcode for the single tab + * @param boolean $list true if you want to enable the shortcode for the list of tabs */ private function add_shordcode($tab=true, $list=true){ if($tab) add_shortcode(self::$tab_shortcode, array(&$this, 'tab_hook')); @@ -81,6 +84,8 @@ private function add_shordcode($tab=true, $list=true){ /** * Deletes the shortcodes used in this feature + * @param boolean $tab true if you want to remove the shortcode for the single tab + * @param boolean $list true if you want to remove the shortcode for the list of tabs */ private function delete_shortcode($tab=true, $list=true){ if($tab) remove_shortcode(self::$tab_shortcode, array(&$this, 'tab_hook')); diff --git a/ShowItemExcerptWalkerNavMenu.class.php b/ShowItemExcerptWalkerNavMenu.class.php index 9d0ecf9..cdfa0b6 100644 --- a/ShowItemExcerptWalkerNavMenu.class.php +++ b/ShowItemExcerptWalkerNavMenu.class.php @@ -10,6 +10,7 @@ * to the default menu entry. * @author etessore * @version 1.0.0 + * @package classes */ class ShowItemExcerptWalkerNavMenu extends Walker_Nav_Menu { /** diff --git a/ShowTitleThumbExcerptWalkerNavMenu.class.php b/ShowTitleThumbExcerptWalkerNavMenu.class.php index fba0030..28bf6d0 100644 --- a/ShowTitleThumbExcerptWalkerNavMenu.class.php +++ b/ShowTitleThumbExcerptWalkerNavMenu.class.php @@ -8,6 +8,7 @@ * and the excerpt for every menu entry. * @author etessore * @version 1.0.0 + * @package classes */ class ShowTitleThumbExcerptWalkerNavMenu extends Walker_Nav_Menu { /** diff --git a/SimpleFieldsQuickConfig.class.php b/SimpleFieldsQuickConfig.class.php index 48f742a..cdfb3d5 100644 --- a/SimpleFieldsQuickConfig.class.php +++ b/SimpleFieldsQuickConfig.class.php @@ -5,11 +5,13 @@ /** * Perform a quick configuration for Simple Fields plugin - * with the default values used by FastBooking + * + * It uses the default values used by FastBooking * By default you only need to call in functions.php: * new SimpleFieldsQuickConfig(); * @author etessore * @version 1.0 + * @package classes */ class SimpleFieldsQuickConfig{ diff --git a/SpecialOffersSnippet.class.php b/SpecialOffersSnippet.class.php index b149cbc..01962a4 100644 --- a/SpecialOffersSnippet.class.php +++ b/SpecialOffersSnippet.class.php @@ -7,7 +7,11 @@ * Manages the integration of the special offers snippet * @author etessore * @version 1.0.3 - * + * @package classes + */ + +/* + * Changelog: * 1.0.3 * remove dependency from FeatureWithAsset and used ThemeHelpers::load_js() * 1.0.2 diff --git a/SpecialOffersSnippetAjax.class.php b/SpecialOffersSnippetAjax.class.php index 8c52360..9a4aa13 100644 --- a/SpecialOffersSnippetAjax.class.php +++ b/SpecialOffersSnippetAjax.class.php @@ -6,6 +6,8 @@ /** * Hook to WP Ajax system to get the special offers snippet url * @author etessore + * @version 1.0.0 + * @package classes * */ class SpecialOffersSnippetAjax{ diff --git a/SubstitutionTemplate.class.php b/SubstitutionTemplate.class.php index 2ca6504..7597ede 100644 --- a/SubstitutionTemplate.class.php +++ b/SubstitutionTemplate.class.php @@ -7,6 +7,7 @@ * Manages a string substitution set * @author etessore * @version 1.0.0 + * @package classes */ class SubstitutionTemplate{ diff --git a/ThemeHelpers.class.php b/ThemeHelpers.class.php index f57be3e..895a74d 100644 --- a/ThemeHelpers.class.php +++ b/ThemeHelpers.class.php @@ -6,7 +6,10 @@ * Stores some static methods that may be useful for html management * @author etessore * @version 1.0.5 - * + * @package classes + */ + +/* * Changelog * 1.0.5 * added support for title in 404 pages diff --git a/TinyMCEExcerpt.class.php b/TinyMCEExcerpt.class.php index 516285a..e95acec 100644 --- a/TinyMCEExcerpt.class.php +++ b/TinyMCEExcerpt.class.php @@ -7,6 +7,8 @@ * This class removes the default excerpt metabox * and adds a new box with the wysiwyg editor capability * @author etessore + * @version 1.0.0 + * @package classes */ class TinyMCEExcerptCustomization{ const textdomain = '';