/**
 * Filter on `the_content` for themes that don't support the plugin.  This filter outputs the basic
 * project metadata only.
 *
 * @since  1.0.0
 * @access public
 * @param  string  $content
 * @return string
 */
function ccp_the_content_filter($content)
{
    if (in_the_loop() && ccp_is_single_project() && ccp_is_project() && !post_password_required()) {
        $project_meta = '';
        $project_meta .= ccp_get_project_link(array('text' => esc_html__('Visit Project', 'custom-content-portfolio'), 'after' => '<br />'));
        $project_meta .= ccp_get_project_client(array('text' => esc_html__('Client: %s', 'custom-content-portfolio'), 'after' => '<br />'));
        $project_meta .= ccp_get_project_location(array('text' => esc_html__('Location: %s', 'custom-content-portfolio'), 'after' => '<br />'));
        $project_meta .= ccp_get_project_start_date(array('text' => esc_html__('Started: %s', 'custom-content-portfolio'), 'after' => '<br />'));
        $project_meta .= ccp_get_project_end_date(array('text' => esc_html__('Completed: %s', 'custom-content-portfolio')));
        if ($project_meta) {
            $content .= sprintf('<p class="project-meta">%s</p>', $project_meta);
        }
    }
    return $content;
}
Ejemplo n.º 2
0
/**
 * Prints the project client.
 *
 * @since  1.0.0
 * @access public
 * @param  array  $args
 * @return void
 */
function ccp_project_client($args = array())
{
    echo ccp_get_project_client($args);
}