Skip to content
Snippets Groups Projects
Commit 75d2f8f0 authored by Erick Hitter's avatar Erick Hitter
Browse files

PHPDoc for singleton and general PHPDoc cleanup.

parent 1f9d460b
Branches
Tags
No related merge requests found
......@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class external_permalinks_redux {
/*
/**
* Class variables
*/
protected static $instance;
......@@ -32,14 +32,21 @@ class external_permalinks_redux {
var $meta_key_type = '_links_to_type';
var $status_codes;
/**
* Instantiate class as a singleton
*
* @return object
*/
static function get_instance() {
if ( ! isset( self::$instance ) )
self::$instance = new external_permalinks_redux;
return self::$instance;
}
/*
/**
* Register actions and filters
*
* @uses add_action, add_filter
* @return null
*/
......@@ -72,8 +79,9 @@ class external_permalinks_redux {
$this->status_codes = apply_filters( 'epr_status_codes', $status_codes );
}
/*
/**
* Add meta box
*
* @uses apply_filters, add_meta_box
* @action admin_init
* @return null
......@@ -89,8 +97,9 @@ class external_permalinks_redux {
}
/*
/**
* Render meta box
*
* @param object $post
* @uses _e, esc_url, get_post_meta, selected, wp_create_nonce
* @return string
......@@ -123,8 +132,9 @@ class external_permalinks_redux {
<?php
}
/*
/**
* Save meta box input
*
* @param int $post_id
* @uses wp_verify_nonce, esc_url_raw, update_post_meta, delete_post_meta
* @action save_post
......@@ -150,8 +160,9 @@ class external_permalinks_redux {
}
}
/*
/**
* Filter post and custom post type permalinks
*
* @param string $permalink
* @param object $post
* @uses get_post_meta
......@@ -165,8 +176,9 @@ class external_permalinks_redux {
return $permalink;
}
/*
/**
* Filter page permalinks
*
* @param string $link
* @param int $id
* @uses get_post_meta
......@@ -180,8 +192,9 @@ class external_permalinks_redux {
return $link;
}
/*
/**
* Redirect to external link if object requested directly.
*
* @uses get_post_meta, wp_redirect
* @action pre_get_posts
* @return null
......@@ -203,9 +216,10 @@ class external_permalinks_redux {
// Initialize the plugin if it hasn't already
external_permalinks_redux::get_instance();
/*
/**
* Wrapper for meta box function
* Can be used as an alternative to the epr_post_types filter found in the plugin classes's action_admin_init function.
*
* @param object $post
* @uses $external_permalinks_redux
* @return string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment