View Icon_array_maker.php
<?php
function chaoz_icon_array($k) {
$v = array();
foreach ($k as $kv) {
$kv = str_replace('-', ' ', $kv);
$kv = str_replace('icon', '', $kv);
$v[] = array_push($v, ucwords($kv));
}
foreach($v as $key => $value) if($key&1) unset($v[$key]);
return array_combine($k, $v);
View GetRedirectURL.php
<?php
/**
* get_redirect_url()
* Gets the address that the provided URL redirects to,
* or FALSE if there's no redirect.
*
* @param string $url
* @return string
*/
View creatSpanTag.php
<?php
function Convert_to_htmlTag($string, $tagSign='|') {
$firstSign = strpos($string, $tagSign);
$lastSign = strpos($string, $tagSign, $firstSign+1);
$strArray = str_split($string);
$replaceSigns = array($firstSign=>'<span class="se-s-color">', $lastSign=>'</span>');
$replaceSigns = array_replace($strArray, $replaceSigns);
echo implode($replaceSigns);
}
View the_tags.php
<?php
function prefix_tags($before = null, $sep = ', ', $after = '', $attr=[]) {
$html = '';
$tags = get_the_tags();
$tagItems = count($tags);
$i = 0;
if(is_array($attr)){
foreach ($attr as $name => $value) {
$attr = " $name=" . '"' . $value . '"';
View vc_custom_font.php
<?php
// Add new custom font to Font Family selection in icon box module
function onepro_add_new_icon_set_to_iconbox( ) {
$param = WPBMap::getParam( 'vc_icon', 'type' );
$param['value'][__( 'CUSTOM ICONS NAME', 'onepro-essential' )] = 'elegant_icons';
vc_update_shortcode_param( 'vc_icon', $param );
}
add_filter( 'init', 'onepro_add_new_icon_set_to_iconbox', 40 );
// Add font picker setting to icon box module when you select your font family from the dropdown
View Display_post_love_button.php
<?php
function legal_station_post_love_display( ) {
$love_text = '';
$love = get_post_meta( get_the_ID(), 'post_love', true );
$love = ( empty( $love ) ) ? 0 : $love;
$love_text = '<p class="love-received">
<a class="love-button" href="#">
<i class="fa fa-heart-o" aria-hidden="true"></i>