Permalink
Browse files

PHPDoc changes. You can browse the documentation on http://wpthemes.j…

…ayj.dk/cakifo/phpdoc/

Functions.php will be committed in the next commit.
  • Loading branch information...
1 parent 4114905 commit bda973042b6bbafbae16e31b10649e264765cfb7 @jayj committed Mar 20, 2012
View
@@ -1,13 +1,13 @@
<?php
/**
- * 404 Template
+ * 404 template
*
* The 404 template is used when a reader visits an invalid URL on your site. By default, the template will
* display a generic message.
*
- * @package Cakifo
- * @subpackage Template
- * @link http://codex.wordpress.org/Creating_an_Error_404_Page
+ * @package Cakifo
+ * @subpackage Template
+ * @link http://codex.wordpress.org/Creating_an_Error_404_Page
*/
/**
View
@@ -4,8 +4,8 @@
*
* The archive template is the default template used for archives pages without a more specific template.
*
- * @package Cakifo
- * @subpackage Template
+ * @package Cakifo
+ * @subpackage Template
*/
get_header(); // Loads the header.php template ?>
View
@@ -5,8 +5,8 @@
* This is the default attachment template. It is used when visiting the singular view of a post attachment
* page (images, videos, audio, etc.).
*
- * @package Cakifo
- * @subpackage Template
+ * @package Cakifo
+ * @subpackage Template
*/
get_header(); // Loads the header.php template ?>
View
@@ -6,8 +6,8 @@
* to the comment type (comment.php, comment-{$comment_type}.php, comment-pingback.php,
* comment-trackback.php) in a child theme.
*
- * @package Cakifo
- * @subpackage Template
+ * @package Cakifo
+ * @subpackage Template
*/
global $post, $comment;
View
@@ -5,8 +5,8 @@
* Lists comments and calls the comment form. Individual comments have their own templates. The
* hierarchy for these templates is $comment_type.php, comment.php.
*
- * @package Cakifo
- * @subpackage Template
+ * @package Cakifo
+ * @subpackage Template
*/
/* Kill the page if trying to access this template directly */
View
@@ -7,8 +7,8 @@
* wrapper, which is opened with the header.php file. It also executes key functions needed
* by the theme, child themes, and plugins.
*
- * @package Cakifo
- * @subpackage Template
+ * @package Cakifo
+ * @subpackage Template
*/
?>
View
@@ -2,14 +2,20 @@
/**
* Creates additional theme settings
*
- * @package Cakifo
- * @subpackage Functions
- * @link http://themehybrid.com/hybrid-core/features/theme-settings
- * @since 1.0
+ * @package Cakifo
+ * @subpackage Functions
+ * @link http://themehybrid.com/hybrid-core/features/theme-settings
+ * @since 1.0
*/
add_action( 'admin_menu', 'cakifo_theme_admin_setup' );
+/**
+ * Add the theme options to the Hybrid Core options page
+ *
+ * @since 1.0
+ * @return void
+ */
function cakifo_theme_admin_setup() {
/* Get the theme prefix */
@@ -22,7 +28,12 @@ function cakifo_theme_admin_setup() {
add_filter( "sanitize_option_{$prefix}_theme_settings", 'cakifo_theme_validate_settings' );
}
-/* Adds custom meta boxes to the theme settings page */
+/**
+ * Adds custom meta boxes to the theme settings page
+ *
+ * @since 1.0
+ * @return void
+ */
function cakifo_theme_settings_meta_boxes() {
/* Add a Featured content box */
@@ -34,10 +45,14 @@ function cakifo_theme_settings_meta_boxes() {
'normal',
'low'
);
-
}
-/* Function for displaying the meta box */
+/**
+ * Function for displaying the meta box
+ *
+ * @since 1.0
+ * @return void
+ */
function cakifo_theme_meta_box() { ?>
<table class="form-table">
@@ -59,20 +74,20 @@ function cakifo_theme_meta_box() { ?>
</th>
<td>
- <?php $categories = get_categories(); ?>
+ <?php $categories = get_categories(); ?>
- <p>
- <select id="<?php echo hybrid_settings_field_id( 'featured_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'featured_category' ); ?>">
- <option value="" <?php selected( hybrid_get_setting( 'featured_category' ), '' ); ?>></option>
+ <p>
+ <select id="<?php echo hybrid_settings_field_id( 'featured_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'featured_category' ); ?>">
+ <option value="" <?php selected( hybrid_get_setting( 'featured_category' ), '' ); ?>></option>
- <?php foreach ( $categories as $cat ) { ?>
- <option value="<?php echo $cat->term_id; ?>" <?php selected( hybrid_get_setting( 'featured_category' ), $cat->term_id ); ?>><?php echo esc_attr( $cat->name ); ?></option>
- <?php } ?>
+ <?php foreach ( $categories as $cat ) { ?>
+ <option value="<?php echo $cat->term_id; ?>" <?php selected( hybrid_get_setting( 'featured_category' ), $cat->term_id ); ?>><?php echo esc_attr( $cat->name ); ?></option>
+ <?php } ?>
- </select>
- </p>
+ </select>
+ </p>
- <p><?php _e( 'Leave blank to use sticky posts', 'cakifo' ); ?></p>
+ <p><?php _e( 'Leave blank to use sticky posts', 'cakifo' ); ?></p>
</td>
</tr>
@@ -130,6 +145,10 @@ function cakifo_theme_meta_box() { ?>
/**
* Validates theme settings
+ *
+ * @since 1.0
+ * @param array $input The entered theme options
+ * @return array The validated theme options
*/
function cakifo_theme_validate_settings( $input ) {
@@ -7,10 +7,10 @@
* Supported by default, remove it in a child theme with
* remove_theme_support( 'cakifo-colorbox' );
*
- * @package Cakifo
- * @subpackage Functions
- * @version 1.3
- * @link http://jacklmoore.com/colorbox/
+ * @package Cakifo
+ * @subpackage Functions
+ * @version 1.3
+ * @link http://jacklmoore.com/colorbox/
*/
add_action( 'wp_enqueue_scripts', 'cakifo_colorbox_script' );
@@ -19,10 +19,9 @@
/**
* Load the Colorbox script and style
*
- * @uses wp_enqueue_script()
- * @uses wp_enqueue_style()
- *
- * @since 1.3
+ * @uses wp_enqueue_script()
+ * @uses wp_enqueue_style()
+ * @since 1.3
*/
function cakifo_colorbox_script() {
wp_enqueue_script( 'colorbox', THEME_URI . '/js/jquery.colorbox-min.js', array( 'jquery' ), '1.3.18', true );
@@ -32,7 +31,7 @@ function cakifo_colorbox_script() {
/**
* Prints the Colorbox script in the footer
*
- * @since 1.3
+ * @since 1.3
*/
function cakifo_colorbox() {
@@ -59,6 +58,8 @@ function cakifo_colorbox() {
* $args['selector'] = '.colorbox, .my-new-awesome-selector';
* return $args;
* }
+ *
+ * @var array
*/
$args = apply_filters( 'cakifo_colorbox_args', $args );
@@ -2,14 +2,14 @@
/**
* Additional shortcodes for use within the theme.
*
- * @package Cakifo
- * @subpackage Functions
+ * @package Cakifo
+ * @subpackage Functions
*/
/**
* Registers new shortcodes
*
- * @since 1.0
+ * @since 1.0
*/
function cakifo_register_shortcodes() {
add_shortcode( 'rss-link', 'cakifo_rss_link_shortcode' );
@@ -38,6 +38,13 @@ function cakifo_register_shortcodes() {
* @param array $atts
* @since 1.0
*/
+
+/**
+ * RSS link shortcode
+ * @since 1.0
+ * @param array $atts
+ * @return string The RSS link
+ */
function cakifo_rss_link_shortcode( $atts ) {
extract( shortcode_atts( array(
'before' => '',
@@ -49,13 +56,14 @@ function cakifo_rss_link_shortcode( $atts ) {
}
/**
- * Twitter username and/or link.
- *
+ * Twitter username and/or link to profile.
+ *
* Taken from my Twitter Profile Field plugin
- * @link http://wordpress.org/extend/plugins/twitter-profile-field/
- *
- * @param array $atts
- * @since 1.0
+ * @link http://wordpress.org/extend/plugins/twitter-profile-field/
+ *
+ * @since 1.0
+ * @param array $atts
+ * @return string The Twitter username or username with a link to the profile.
*/
function cakifo_twitter_shortcode( $atts ) {
extract( shortcode_atts( array(
@@ -78,8 +86,8 @@ function cakifo_twitter_shortcode( $atts ) {
/**
* Delicious link shortcode
*
- * @param array $atts
- * @since 1.0
+ * @param array $atts
+ * @since 1.0
*/
function cakifo_entry_delicious_link_shortcode( $atts ) {
extract( shortcode_atts( array(
@@ -95,8 +103,8 @@ function cakifo_entry_delicious_link_shortcode( $atts ) {
*
* @note This won't work from your computer (http://localhost). Must be a live site.
*
- * @param array $atts
- * @since 1.0
+ * @param array $atts
+ * @since 1.0
*/
function cakifo_entry_digg_link_shortcode( $atts ) {
extract( shortcode_atts( array(
@@ -115,8 +123,8 @@ function cakifo_entry_digg_link_shortcode( $atts ) {
* @note This won't work from your computer (http://localhost). Must be a live site.
* @link http://developers.facebook.com/docs/reference/plugins/like/
*
- * @param array $atts
- * @since 1.0
+ * @param array $atts
+ * @since 1.0
*/
function cakifo_entry_facebook_link_shortcode( $atts ) {
@@ -150,8 +158,8 @@ function cakifo_entry_facebook_link_shortcode( $atts ) {
/**
* Twitter link shortcode
*
- * @param array $atts
- * @since 1.0
+ * @param array $atts
+ * @since 1.0
*/
function cakifo_entry_twitter_link_shortcode( $atts ) {
extract( shortcode_atts( array(
@@ -206,9 +214,8 @@ function cakifo_entry_twitter_link_shortcode( $atts ) {
* Google +1 shortcode
*
* @link http://www.google.com/+1/button/
- *
- * @param array $atts
- * @since 1.2
+ * @param array $atts
+ * @since 1.2
*/
function cakifo_entry_googleplus_link_shortcode( $atts ) {
@@ -238,8 +245,8 @@ function cakifo_entry_googleplus_link_shortcode( $atts ) {
*
* It replaces the default Hybrid Core shortcode. The name is still the the same
*
- * @param array $atts
- * @since 1.1
+ * @param array $atts
+ * @since 1.1
*/
function cakifo_entry_published_shortcode( $atts ) {
$atts = shortcode_atts( array(
@@ -262,8 +269,8 @@ function cakifo_entry_published_shortcode( $atts ) {
*
* It replaces the default Hybrid Core shortcode. The name is still the the same
*
- * @param array $atts
- * @since 1.1
+ * @param array $atts
+ * @since 1.1
*/
function cakifo_comment_published_shortcode( $atts ) {
$atts = shortcode_atts( array(
@@ -281,8 +288,8 @@ function cakifo_comment_published_shortcode( $atts ) {
*
* It replaces the default Hybrid Core shortcode. The name is still the the same
*
- * @param array $atts
- * @since 1.3
+ * @param array $atts
+ * @since 1.3
*/
function cakifo_entry_author_shortcode( $atts ) {
$atts = shortcode_atts( array(
@@ -299,8 +306,8 @@ function cakifo_entry_author_shortcode( $atts ) {
/**
* Displays the post format of the current post
*
- * @param array $atts
- * @since 1.3
+ * @param array $atts
+ * @since 1.3
*/
function cakifo_entry_format_shortcode( $atts ) {
$atts = shortcode_atts( array(
Oops, something went wrong.

1 comment on commit bda9730

@jayj
Owner
jayj commented on bda9730 Apr 9, 2012

The docs is located at http://wpthemes.jayj.dk/cakifo-doc/phpdoc/ instead

Please sign in to comment.