Submit
Path:
~
/
home
/
getwphos
/
www
/
ccma
/
wp-content
/
plugins
/
curly-core
/
shortcodes
/
dropcaps
/
File Content:
dropcaps.php
<?php namespace CurlyCore\CPT\Shortcodes\Dropcaps; use CurlyCore\Lib; class Dropcaps implements Lib\ShortcodeInterface { private $base; public function __construct() { $this->base = 'mkdf_dropcaps'; add_action('vc_before_init', array($this, 'vcMap')); } public function getBase() { return $this->base; } public function vcMap() { } public function render($atts, $content = null) { $args = array( 'type' => '', 'color' => '', 'background_color' => '' ); $params = shortcode_atts($args, $atts); $params['letter'] = $content; $params['dropcaps_style'] = $this->getDropcapsStyles($params); $params['dropcaps_class'] = $this->getDropcapsClass($params); $html = curly_core_get_shortcode_module_template_part('templates/dropcaps-template', 'dropcaps', '', $params); return $html; } private function getDropcapsStyles($params) { $styles = array(); if ($params['color'] !== '') { $styles[] = 'color: ' . $params['color']; } if ($params['type'] !== 'normal' && $params['background_color'] !== '') { $styles[] = 'background-color: ' . $params['background_color']; } return implode(';', $styles); } private function getDropcapsClass($params) { return !empty($params['type']) ? 'mkdf-' . $params['type'] : ''; } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
assets
---
0755
templates
---
0755
dropcaps.php
1471 bytes
0644
functions.php
464 bytes
0644
load.php
143 bytes
0644
N4ST4R_ID | Naxtarrr