Skip to content

Some simple PHPdoc updates #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,13 @@ class Babble_Plugin {
/**
* Initiate!
*
* @param string $name The name of this plugin
* @param null|string $type Whether this is a theme, or a plugin
*
* @throws exception
* @return void
* @author Simon Wheatley
**/
*/
public function setup( $name = '', $type = null ) {
if ( ! $name )
throw new exception( "Please pass the name parameter into the setup method." );
Expand Down Expand Up @@ -190,7 +194,7 @@ function add_action ($action, $function = '', $priority = 10, $accepted_args = 1
/**
* Register a WordPress filter and map it back to the calling object
*
* @param string $action Name of the action
* @param string $filter Name of the action
* @param string $function Function name (optional)
* @param int $priority WordPress priority (optional)
* @param int $accepted_args Number of arguments the function accepts (optional)
Expand All @@ -205,7 +209,7 @@ function add_filter ($filter, $function = '', $priority = 10, $accepted_args = 1
/**
* De-register a WordPress filter and map it back to the calling object
*
* @param string $action Name of the action
* @param string $filter Name of the action
* @param string $function Function name (optional)
* @param int $priority WordPress priority (optional)
* @param int $accepted_args Number of arguments the function accepts (optional)
Expand Down Expand Up @@ -310,8 +314,8 @@ protected function render_admin( $template_file, $vars = null ) {
/**
* Returns a section of user display code, returning the rendered markup.
*
* @param string $ug_name Name of the admin file (without extension)
* @param string $array Array of variable name=>value that is available to the display code (optional)
* @param string $template_file Name of the admin file (without extension)
* @param string $vars Array of variable name=>value that is available to the display code (optional)
* @return void
* @author © John Godley
**/
Expand All @@ -326,8 +330,8 @@ protected function capture( $template_file, $vars = null ) {
/**
* Returns a section of user display code, returning the rendered markup.
*
* @param string $ug_name Name of the admin file (without extension)
* @param string $array Array of variable name=>value that is available to the display code (optional)
* @param string $template_file Name of the admin file (without extension)
* @param string $vars Array of variable name=>value that is available to the display code (optional)
* @return void
* @author © John Godley
**/
Expand Down Expand Up @@ -452,7 +456,7 @@ protected function locate_template( $template_file ) {
* @param int $page The type of edit page on which to show the box (post, page, link).
* @param string $function Function name (optional)
* @param string $context e.g. 'advanced' or 'core' (optional)
* @param int $priority Priority, rough effect on the ordering (optional)
* @param string $priority Priority, rough effect on the ordering (optional)
* @param mixed $args Some arguments to pass to the callback function as part of a larger object (optional)
* @return void
* @author © John Godley
Expand All @@ -471,7 +475,7 @@ function add_meta_box( $id, $title, $function = '', $page, $context = 'advanced'
* theirs depending on which order the plugins are included and/or ran.
*
* @param string $tag Shortcode tag to be searched in post content.
* @param callable $func Hook to run when shortcode is found.
* @param callable $function Hook to run when shortcode is found.
*/
protected function add_shortcode( $tag, $function = null ) {
add_shortcode( $tag, array( $this, $function == '' ? $tag : $function ) );
Expand Down