portfolio-project-post-class

Filter the class applied to project div in the portfolio.

Description

apply_filters( 'portfolio-project-post-class', $implode, (number) $portfolio_index_number, (int) $columns ); 

Parameters (3)

0. $implode
Class name of the div.
1. $portfolio_index_number (number)
Iterator count the number of columns up starting from 0.
2. $columns (int)
Number of columns to display the content in.

Usage

To run the hook, copy the example below.
  1. $implode = apply_filters( 'portfolio-project-post-class', $implode, $portfolio_index_number, $columns ); 
  2.  
  3. if ( !empty( $implode ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the portfolio-project-post-class callback 
  2. function filter_portfolio_project_post_class( $implode, $portfolio_index_number, $columns ) { 
  3. // make filter magic happen here... 
  4. return $implode
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'portfolio-project-post-class', 'filter_portfolio_project_post_class', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'portfolio-project-post-class', 'filter_portfolio_project_post_class', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/modules/custom-post-types/portfolios.php  
  1. return apply_filters( 'portfolio-project-post-class', implode( " ", $class ) , $portfolio_index_number, $columns );