Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/themify-.../themify
File: themify-admin.php
<input type="hidden" name="setting-feed_custom_post" value="' . esc_attr( $feed_custom_post ) . '" />
[1500] Fix | Delete
</p>';
[1501] Fix | Delete
}
[1502] Fix | Delete
[1503] Fix | Delete
/**
[1504] Fix | Delete
* Outputs Image Script module in theme settings.
[1505] Fix | Delete
*/
[1506] Fix | Delete
function themify_img_settings( $data = array() ) {
[1507] Fix | Delete
$feature_sizes = themify_get_image_sizes_list();
[1508] Fix | Delete
$checked_use = '';
[1509] Fix | Delete
$disable = '';
[1510] Fix | Delete
$imaging_library = wp_image_editor_supports();
[1511] Fix | Delete
$imaging_library_error = '';
[1512] Fix | Delete
if ( ! $imaging_library || themify_is_image_script_disabled() ) {
[1513] Fix | Delete
$checked_use = "checked='checked'";
[1514] Fix | Delete
if ( ! $imaging_library ) {
[1515] Fix | Delete
$disable = ' style="pointer-events: none;"';
[1516] Fix | Delete
$imaging_library_error = '<div class="pushlabel themify_warning note">' . sprintf( __( 'This feature requires an <a href="%s">image processing library</a> to be installed on the server. Please contact your hosting provider to enable this.', 'themify' ), 'https://www.php.net/manual/en/refs.utilspec.image.php' ) . '</div>';
[1517] Fix | Delete
}
[1518] Fix | Delete
}
[1519] Fix | Delete
$size = themify_get( 'setting-img_php_base_size', 'large',true );
[1520] Fix | Delete
$global = themify_get( 'setting-global_feature_size','',true );
[1521] Fix | Delete
$output = '
[1522] Fix | Delete
<div class="module">
[1523] Fix | Delete
<div class="themify-info-link">' . sprintf( __( 'The image script is used to generate featured images dynamically in any dimension. If your images are cropped manually, disable it for faster performance. For more info about the image script, refer to the <a href="%s">Image Script</a> documentation.', 'themify' ), 'https://themify.me/docs/image-script' ) . '
[1524] Fix | Delete
</div>
[1525] Fix | Delete
<fieldset>
[1526] Fix | Delete
<div class="label">' . __( 'Disable', 'themify' ) .themify_help(__( 'Default WordPress image sizes or original images will be used.', 'themify' )) . '</div>
[1527] Fix | Delete
<div class="row">
[1528] Fix | Delete
<label for="setting-img_settings_use"' . $disable . '><input type="checkbox" id="setting-img_settings_use" name="setting-img_settings_use" class="disable_img_php" ' . $checked_use . '/> ' . __( 'Disable image script globally', 'themify' ) . '</label>
[1529] Fix | Delete
' . $imaging_library_error . '
[1530] Fix | Delete
</div>
[1531] Fix | Delete
<div class="show_if_enabled_img_php">
[1532] Fix | Delete
<div class="label">' . __('Base Image Size', 'themify') .themify_help(__( 'Select the image size that image script will resize thumbnails from. If you\'re not sure, leave it as "Large". Note that this does not affect images already generated.', 'themify' )) . '</div>
[1533] Fix | Delete
<div class="row">
[1534] Fix | Delete
<select name="setting-img_php_base_size">';
[1535] Fix | Delete
foreach ( $feature_sizes as $option ) {
[1536] Fix | Delete
$selected = $option['value'] === $size?' selected="selected"':'';
[1537] Fix | Delete
$output .= '<option'.$selected.' value="' . esc_attr( $option['value'] ) . '">' . $option['name'] . '</option>';
[1538] Fix | Delete
}
[1539] Fix | Delete
$output .= '
[1540] Fix | Delete
</select>
[1541] Fix | Delete
</div>
[1542] Fix | Delete
</div>
[1543] Fix | Delete
<div class="show_if_disabled_img_php">
[1544] Fix | Delete
<div class="label">' . __('Default Featured Image Size', 'themify') . '</div>
[1545] Fix | Delete
<div class="show_if_disabled_img_php row">
[1546] Fix | Delete
<select name="setting-global_feature_size">';
[1547] Fix | Delete
foreach ( $feature_sizes as $option ) {
[1548] Fix | Delete
$selected = $option['value'] === $global?' selected="selected"':'';
[1549] Fix | Delete
$output .= '<option'. $selected.' value="' . esc_attr( $option['value'] ) . '">' . $option['name'] . '</option>';
[1550] Fix | Delete
}
[1551] Fix | Delete
$output .= '
[1552] Fix | Delete
</select>
[1553] Fix | Delete
</div>
[1554] Fix | Delete
</div>
[1555] Fix | Delete
</fieldset>
[1556] Fix | Delete
[1557] Fix | Delete
</div>';
[1558] Fix | Delete
return $output;
[1559] Fix | Delete
}
[1560] Fix | Delete
[1561] Fix | Delete
/**
[1562] Fix | Delete
* Outputs module for user to select whether to use a lightbox or not. The lightbox choices can be filtered using the 'themify_lightbox_module_options' filter in a custom-functions.php file.
[1563] Fix | Delete
* @param array $data
[1564] Fix | Delete
* @return string
[1565] Fix | Delete
* @since 1.2.5
[1566] Fix | Delete
*/
[1567] Fix | Delete
function themify_gallery_plugins( $data = array() ) {
[1568] Fix | Delete
[1569] Fix | Delete
$display_options = apply_filters('themify_lightbox_module_options', array(
[1570] Fix | Delete
__( 'Enable', 'themify' ) => 'lightbox',
[1571] Fix | Delete
__( 'Disable', 'themify' ) => 'none'
[1572] Fix | Delete
));
[1573] Fix | Delete
[1574] Fix | Delete
$gallery_lightbox = themify_get( 'setting-gallery_lightbox',null,true );
[1575] Fix | Delete
[1576] Fix | Delete
$out = '<p>
[1577] Fix | Delete
<span class="label">' . __( 'WordPress Gallery', 'themify' ) . ' </span>
[1578] Fix | Delete
<select class="gallery_lightbox_type" name="setting-gallery_lightbox">';
[1579] Fix | Delete
foreach ( $display_options as $option => $value ) {
[1580] Fix | Delete
$out .= '<option value="' . $value . '" '.selected( $value, $gallery_lightbox, false ).'>' . esc_html( $option ) . '</option>';
[1581] Fix | Delete
}
[1582] Fix | Delete
$out .= ' </select>
[1583] Fix | Delete
</p>';
[1584] Fix | Delete
$out .= '<p>
[1585] Fix | Delete
<span class="pushlabel"><label for="setting-lightbox_disable_share">
[1586] Fix | Delete
<input type="checkbox" id="setting-lightbox_disable_share" name="setting-lightbox_disable_share" '. checked( themify_get( 'setting-lightbox_disable_share',false,true ), 'on', false ) .'/> ' . __('Hide social share buttons on lightbox', 'themify') . '</label>
[1587] Fix | Delete
</span>
[1588] Fix | Delete
</p>';
[1589] Fix | Delete
$out .= '<p>
[1590] Fix | Delete
<span class="pushlabel"><label for="setting-lightbox_content_images">
[1591] Fix | Delete
<input type="checkbox" id="setting-lightbox_content_images" name="setting-lightbox_content_images" '. checked( themify_get( 'setting-lightbox_content_images',false,true ), 'on', false ) .'/> ' . __('Apply lightbox to image links automatically', 'themify') . '</label>
[1592] Fix | Delete
</span>
[1593] Fix | Delete
<small class="pushlabel">'. __( 'All links to jpg, png, and gif will open in lightbox.', 'themify' ) .'</small>
[1594] Fix | Delete
</p>';
[1595] Fix | Delete
return $out;
[1596] Fix | Delete
}
[1597] Fix | Delete
[1598] Fix | Delete
/**
[1599] Fix | Delete
* Template to display a link in Links module, also used when creating a link.
[1600] Fix | Delete
* @param array $data
[1601] Fix | Delete
* @return string
[1602] Fix | Delete
* @since 1.2.7
[1603] Fix | Delete
*/
[1604] Fix | Delete
function themify_add_link_template( $fid, $data = array(), $ajax = false, $type = 'image-icon' ) {
[1605] Fix | Delete
$pre = 'setting-link_';
[1606] Fix | Delete
[1607] Fix | Delete
$type_name = $pre.'type_'.$fid;
[1608] Fix | Delete
if ( $ajax ) {
[1609] Fix | Delete
$type_val = $type;
[1610] Fix | Delete
} else {
[1611] Fix | Delete
$type_val = isset($data[$type_name])? $data[$type_name] : 'image-icon';
[1612] Fix | Delete
}
[1613] Fix | Delete
[1614] Fix | Delete
$title_name = $pre.'title_'.$fid;
[1615] Fix | Delete
$title_val = isset($data[$title_name])? esc_attr(trim($data[$title_name])): '';
[1616] Fix | Delete
[1617] Fix | Delete
$link_name = $pre.'link_'.$fid;
[1618] Fix | Delete
$link_val = isset($data[$link_name])? esc_attr(trim($data[$link_name])) : '';
[1619] Fix | Delete
[1620] Fix | Delete
$img_name = $pre.'img_'.$fid;
[1621] Fix | Delete
$img_val = ! isset( $data[$img_name] ) || '' == $data[$img_name]? '' : esc_attr($data[$img_name]);
[1622] Fix | Delete
[1623] Fix | Delete
$ficon_name = $pre.'ficon_'.$fid;
[1624] Fix | Delete
$ficon_val = trim( isset($data[$ficon_name])? esc_attr($data[$ficon_name]) : '' );
[1625] Fix | Delete
[1626] Fix | Delete
$ficolor_name = $pre.'ficolor_'.$fid;
[1627] Fix | Delete
$ficolor_val = isset($data[$ficolor_name])? esc_attr($data[$ficolor_name]) : '';
[1628] Fix | Delete
[1629] Fix | Delete
$fibgcolor_name = $pre.'fibgcolor_'.$fid;
[1630] Fix | Delete
$fibgcolor_val = isset($data[$fibgcolor_name])? esc_attr($data[$fibgcolor_name]) : '';
[1631] Fix | Delete
[1632] Fix | Delete
/**
[1633] Fix | Delete
* TODO: Add appearance checkboxes
[1634] Fix | Delete
*/
[1635] Fix | Delete
[1636] Fix | Delete
$out = '<li id="' . $fid . '" class="social-link-item ' . $type_val . '">';
[1637] Fix | Delete
[1638] Fix | Delete
$out .= '<div class="social-drag">' . esc_html__('Drag to Sort', 'themify') . '<i class="ti-arrows-vertical"></i></div>';
[1639] Fix | Delete
[1640] Fix | Delete
$out .= '<input type="hidden" name="' . $type_name . '" value="' . trim( $type_val ) . '">';
[1641] Fix | Delete
[1642] Fix | Delete
$out .= '<div class="row">
[1643] Fix | Delete
<span class="label">' . __( 'Title', 'themify' ) . '</span> <input type="text" name="' . $title_name. '" class="width6" value="' . $title_val . '">
[1644] Fix | Delete
</div>
[1645] Fix | Delete
<!-- /row -->';
[1646] Fix | Delete
[1647] Fix | Delete
$out .= '<div class="row">
[1648] Fix | Delete
<span class="label">' . __( 'Link', 'themify' ) . '</span> <input type="text" name="' . $link_name . '" class="width10" value="' . $link_val . '">
[1649] Fix | Delete
</div>
[1650] Fix | Delete
<!-- /row -->';
[1651] Fix | Delete
[1652] Fix | Delete
if ( 'font-icon' === $type_val ) {
[1653] Fix | Delete
[1654] Fix | Delete
$out .= '<div class="row">
[1655] Fix | Delete
<span class="label">' . __( 'Icon', 'themify' ) . '</span>';
[1656] Fix | Delete
[1657] Fix | Delete
$out .= sprintf('<input type="text" id="%s" name="%s" value="%s" size="55" class="themify_input_field themify_fa %s" /> <a class="button button-secondary hide-if-no-js themify_fa_toggle" href="#" data-target="#%s">%s</a>',
[1658] Fix | Delete
$ficon_name, $ficon_name, $ficon_val, 'small', $ficon_name, __( 'Insert Icon', 'themify' ) );
[1659] Fix | Delete
[1660] Fix | Delete
$out .= '</div>
[1661] Fix | Delete
<!-- /row -->';
[1662] Fix | Delete
[1663] Fix | Delete
$out .= '<div class="icon-preview font-icon-preview">
[1664] Fix | Delete
<i>'.themify_get_icon( $ficon_val ).'</i>
[1665] Fix | Delete
</div>
[1666] Fix | Delete
<!-- /icon-preview -->';
[1667] Fix | Delete
[1668] Fix | Delete
$out .= '<div class="themify_field_row">
[1669] Fix | Delete
<span class="label">' . __('Icon Color', 'themify') . '</span>
[1670] Fix | Delete
<div class="themify_field-color">
[1671] Fix | Delete
<input type="text" data-format="rgba" class="colorSelectInput width4" value="' . $ficolor_val. '" name="' . $ficolor_name . '" />
[1672] Fix | Delete
</div>
[1673] Fix | Delete
</div>';
[1674] Fix | Delete
[1675] Fix | Delete
$out .= '<div class="themify_field_row">
[1676] Fix | Delete
<span class="label">' . __('Background', 'themify') . '</span>
[1677] Fix | Delete
<div class="themify_field-color">
[1678] Fix | Delete
<input type="text" data-format="rgba" class="colorSelectInput width4" value="' . $fibgcolor_val . '" name="' . $fibgcolor_name . '" />
[1679] Fix | Delete
</div>
[1680] Fix | Delete
</div>';
[1681] Fix | Delete
[1682] Fix | Delete
} else {
[1683] Fix | Delete
[1684] Fix | Delete
$out .= '<div class="row">
[1685] Fix | Delete
<span class="label">' . __( 'Image', 'themify' ) . '</span>
[1686] Fix | Delete
<div class="uploader-fields image">
[1687] Fix | Delete
<input type="text" id="' . $img_name . '" name="' . $img_name. '" class="width10" value="' . $img_val. '">
[1688] Fix | Delete
<div class="clear image">' . themify_get_uploader( $img_name, array( 'tomedia' => true, 'preview' => true ) ) . '</div>
[1689] Fix | Delete
</div>
[1690] Fix | Delete
</div>
[1691] Fix | Delete
<!-- /row -->';
[1692] Fix | Delete
$out .= '<div class="icon-preview">
[1693] Fix | Delete
<img id="' . $img_name . '-preview" src="' . $img_val . '" loading="lazy" decoding="async" />
[1694] Fix | Delete
</div>
[1695] Fix | Delete
<!-- /icon-preview -->';
[1696] Fix | Delete
}
[1697] Fix | Delete
[1698] Fix | Delete
$out .= '<a href="#" class="remove-item" data-removelink="' . $fid . '"><span class="tf_close"></span></a>
[1699] Fix | Delete
</li>
[1700] Fix | Delete
<!-- /social-links-item -->';
[1701] Fix | Delete
[1702] Fix | Delete
return $out;
[1703] Fix | Delete
}
[1704] Fix | Delete
[1705] Fix | Delete
/**
[1706] Fix | Delete
* Outputs module to manage links to be shown using the corresponding widget
[1707] Fix | Delete
* @param array $data
[1708] Fix | Delete
* @return string
[1709] Fix | Delete
* @since 1.2.7
[1710] Fix | Delete
*/
[1711] Fix | Delete
function themify_manage_links( $data = array() ) {
[1712] Fix | Delete
$data = themify_get_data();
[1713] Fix | Delete
$pre = 'setting-link_';
[1714] Fix | Delete
$field_hash = !empty( $data[$pre.'field_hash'] )? (int)$data[$pre.'field_hash'] : 8;
[1715] Fix | Delete
$start = array();
[1716] Fix | Delete
for ( $i=0; $i < $field_hash; ++$i ) {
[1717] Fix | Delete
$start['themify-link-'.$i] = 'themify-link-'.$i;
[1718] Fix | Delete
}
[1719] Fix | Delete
//$data[$pre.'field_ids'] = json_encode($start);
[1720] Fix | Delete
$field_ids=themify_get( $pre.'field_ids',false,true );
[1721] Fix | Delete
if ( $field_ids) {
[1722] Fix | Delete
$field_ids=json_decode( $field_ids, true );
[1723] Fix | Delete
if ( ! is_array( $field_ids ) ) {
[1724] Fix | Delete
$field_ids = array();
[1725] Fix | Delete
}
[1726] Fix | Delete
} else {
[1727] Fix | Delete
$field_ids = $start;
[1728] Fix | Delete
[1729] Fix | Delete
// Image Icons
[1730] Fix | Delete
[1731] Fix | Delete
$data[$pre.'type_themify-link-0'] = 'image-icon';
[1732] Fix | Delete
$data[$pre.'type_themify-link-1'] = 'image-icon';
[1733] Fix | Delete
$data[$pre.'type_themify-link-2'] = 'image-icon';
[1734] Fix | Delete
$data[$pre.'type_themify-link-3'] = 'image-icon';
[1735] Fix | Delete
[1736] Fix | Delete
$data[$pre.'title_themify-link-0'] = 'Twitter';
[1737] Fix | Delete
$data[$pre.'title_themify-link-1'] = 'Facebook';
[1738] Fix | Delete
$data[$pre.'title_themify-link-2'] = 'YouTube';
[1739] Fix | Delete
$data[$pre.'title_themify-link-3'] = 'Pinterest';
[1740] Fix | Delete
[1741] Fix | Delete
$data[$pre.'link_themify-link-0'] = '';
[1742] Fix | Delete
$data[$pre.'link_themify-link-1'] = '';
[1743] Fix | Delete
$data[$pre.'link_themify-link-2'] = '';
[1744] Fix | Delete
$data[$pre.'link_themify-link-3'] = '';
[1745] Fix | Delete
[1746] Fix | Delete
$data[$pre.'img_themify-link-0'] = THEMIFY_URI . '/img/social/twitter.png';
[1747] Fix | Delete
$data[$pre.'img_themify-link-1'] = THEMIFY_URI . '/img/social/facebook.png';
[1748] Fix | Delete
$data[$pre.'img_themify-link-2'] = THEMIFY_URI . '/img/social/youtube.png';
[1749] Fix | Delete
$data[$pre.'img_themify-link-3'] = THEMIFY_URI . '/img/social/pinterest.png';
[1750] Fix | Delete
[1751] Fix | Delete
// Font Icons
[1752] Fix | Delete
[1753] Fix | Delete
$data[$pre.'type_themify-link-4'] = 'font-icon';
[1754] Fix | Delete
$data[$pre.'type_themify-link-5'] = 'font-icon';
[1755] Fix | Delete
$data[$pre.'type_themify-link-6'] = 'font-icon';
[1756] Fix | Delete
$data[$pre.'type_themify-link-7'] = 'font-icon';
[1757] Fix | Delete
[1758] Fix | Delete
$data[$pre.'title_themify-link-4'] = 'Twitter';
[1759] Fix | Delete
$data[$pre.'title_themify-link-5'] = 'Facebook';
[1760] Fix | Delete
$data[$pre.'title_themify-link-6'] = 'YouTube';
[1761] Fix | Delete
$data[$pre.'title_themify-link-7'] = 'Pinterest';
[1762] Fix | Delete
[1763] Fix | Delete
$data[$pre.'link_themify-link-4'] = '';
[1764] Fix | Delete
$data[$pre.'link_themify-link-5'] = '';
[1765] Fix | Delete
$data[$pre.'link_themify-link-6'] = '';
[1766] Fix | Delete
$data[$pre.'link_themify-link-7'] = '';
[1767] Fix | Delete
[1768] Fix | Delete
$data[$pre.'ficon_themify-link-4'] = 'fa-twitter';
[1769] Fix | Delete
$data[$pre.'ficon_themify-link-5'] = 'fa-facebook';
[1770] Fix | Delete
$data[$pre.'ficon_themify-link-6'] = 'fa-youtube';
[1771] Fix | Delete
$data[$pre.'ficon_themify-link-7'] = 'fa-pinterest';
[1772] Fix | Delete
[1773] Fix | Delete
$data[$pre.'ficolor_themify-link-4'] = '';
[1774] Fix | Delete
$data[$pre.'ficolor_themify-link-5'] = '';
[1775] Fix | Delete
$data[$pre.'ficolor_themify-link-6'] = '';
[1776] Fix | Delete
$data[$pre.'ficolor_themify-link-7'] = '';
[1777] Fix | Delete
[1778] Fix | Delete
$data[$pre.'fibgcolor_themify-link-4'] = '';
[1779] Fix | Delete
$data[$pre.'fibgcolor_themify-link-5'] = '';
[1780] Fix | Delete
$data[$pre.'fibgcolor_themify-link-6'] = '';
[1781] Fix | Delete
$data[$pre.'fibgcolor_themify-link-7'] = '';
[1782] Fix | Delete
[1783] Fix | Delete
$data = apply_filters('themify_default_social_links', $data);
[1784] Fix | Delete
}
[1785] Fix | Delete
[1786] Fix | Delete
$out = '<div class="themify-info-link">' . sprintf( __( 'To display the links: go to Appearance > <a href="%s">Widgets</a> and drop a Themify - Social Links widget in a widget area (<a href="%s" target="_blank" rel="noopener">learn more</a>)', 'themify' ), admin_url('widgets.php'), 'https://themify.me/docs/social-media-links') . '</div>';
[1787] Fix | Delete
[1788] Fix | Delete
$out .= '<div id="social-link-type">';
[1789] Fix | Delete
// Icon Font
[1790] Fix | Delete
$out .= '<label for="' . $pre . 'font_icon">';
[1791] Fix | Delete
$out .= '<input ' . checked( isset( $data[$pre.'icon_type'] )? $data[$pre.'icon_type'] : 'font-icon', 'font-icon', false) . ' type="radio" id="' . $pre . 'font_icon" name="' . $pre . 'icon_type" value="font-icon" data-hide="image-icon" /> ';
[1792] Fix | Delete
$out .= __( 'Icon Font', 'themify' ) . '</label>';
[1793] Fix | Delete
[1794] Fix | Delete
// Image
[1795] Fix | Delete
$out .= '<label for="' . $pre . 'image_icon">';
[1796] Fix | Delete
$out .= '<input ' . checked( isset( $data[$pre.'icon_type'] )? $data[$pre.'icon_type'] : '', 'image-icon', false ) . ' type="radio" id="' . $pre . 'image_icon" name="' . $pre . 'icon_type" value="image-icon" data-hide="font-icon" /> ';
[1797] Fix | Delete
$out .= __( 'Image', 'themify' ) . '</label>';
[1798] Fix | Delete
$out .= '</p>';
[1799] Fix | Delete
[1800] Fix | Delete
$out .= '<ul id="social-links-wrapper">';
[1801] Fix | Delete
foreach ( $field_ids as $fid ) {
[1802] Fix | Delete
$out .= themify_add_link_template( $fid, $data );
[1803] Fix | Delete
}
[1804] Fix | Delete
$out .= '</ul>';
[1805] Fix | Delete
[1806] Fix | Delete
$out .= '<p class="add-link add-social-link"><a href="#">' . __('Add Link', 'themify') . '</a></p>';
[1807] Fix | Delete
[1808] Fix | Delete
$out .= '<input type="hidden" id="' . $pre . 'field_ids" name="' . $pre . 'field_ids" value=\'' . json_encode( $field_ids ) . '\'/>';
[1809] Fix | Delete
$out .= '<input type="hidden" id="' . $pre . 'field_hash" name="' . $pre . 'field_hash" value="' . esc_attr( $field_hash ) . '"/>';
[1810] Fix | Delete
//$out .= '<p>Fields: '.json_encode($field_ids).'</p><p>Hash: '.$field_hash.'</p>';
[1811] Fix | Delete
[1812] Fix | Delete
return $out;
[1813] Fix | Delete
}
[1814] Fix | Delete
[1815] Fix | Delete
/**
[1816] Fix | Delete
* Outputs post meta options
[1817] Fix | Delete
* @param string $pmkey Key used to get data from theme settings array
[1818] Fix | Delete
* @param array $data Theme settings data
[1819] Fix | Delete
* @param array $metas Optional array stating the metas available.
[1820] Fix | Delete
* @return string $out Markup for options
[1821] Fix | Delete
*/
[1822] Fix | Delete
function themify_post_meta_options( $pmkey, $data, $metas = array(), $states = array(), $group_label = false ) {
[1823] Fix | Delete
[1824] Fix | Delete
if ( empty($metas ) ) {
[1825] Fix | Delete
$metas = array (
[1826] Fix | Delete
'' => __( 'Hide All', 'themify' ),
[1827] Fix | Delete
'author' => __( 'Author', 'themify' ),
[1828] Fix | Delete
'category' => __( 'Category', 'themify' ),
[1829] Fix | Delete
'comment' => __( 'Comment', 'themify' ),
[1830] Fix | Delete
'tag' => __( 'Tag', 'themify' )
[1831] Fix | Delete
);
[1832] Fix | Delete
}
[1833] Fix | Delete
if ( empty( $states ) ) {
[1834] Fix | Delete
$states = array(
[1835] Fix | Delete
array(
[1836] Fix | Delete
'name' => __( 'Hide', 'themify' ),
[1837] Fix | Delete
'value' => 'yes',
[1838] Fix | Delete
'icon' => THEMIFY_URI . '/img/ddbtn-cross.svg',
[1839] Fix | Delete
'title' => __( 'Hide this meta', 'themify' )
[1840] Fix | Delete
),
[1841] Fix | Delete
array(
[1842] Fix | Delete
'name' => __( 'Show', 'themify' ),
[1843] Fix | Delete
'value' => 'no',
[1844] Fix | Delete
'icon' => THEMIFY_URI . '/img/ddbtn-check.svg',
[1845] Fix | Delete
'title' => __( 'Show this meta', 'themify' )
[1846] Fix | Delete
)
[1847] Fix | Delete
);
[1848] Fix | Delete
}
[1849] Fix | Delete
if ( ! $group_label ) {
[1850] Fix | Delete
$group_label = __( 'Post Meta', 'themify' );
[1851] Fix | Delete
}
[1852] Fix | Delete
[1853] Fix | Delete
$default = array(
[1854] Fix | Delete
'name' => __( 'Theme', 'themify' ),
[1855] Fix | Delete
'value' => '',
[1856] Fix | Delete
'icon' => THEMIFY_URI . '/img/ddbtn-blank.png',
[1857] Fix | Delete
'title' => esc_attr(__( 'Use theme settings', 'themify' ))
[1858] Fix | Delete
);
[1859] Fix | Delete
[1860] Fix | Delete
$out = '<div class="themify_field_row dropdownbutton-group"><span class="label">' . esc_html( $group_label ) . '</span>';
[1861] Fix | Delete
[1862] Fix | Delete
foreach ( $metas as $meta => $name ) {
[1863] Fix | Delete
if ( '' == $meta ) {
[1864] Fix | Delete
$metakey = $pmkey;
[1865] Fix | Delete
$meta_class = 'ddbtn-all';
[1866] Fix | Delete
} else {
[1867] Fix | Delete
$metakey = $pmkey.'_'.$meta;
[1868] Fix | Delete
$meta_class = 'ddbtn-sub ddbtn-'.$meta;
[1869] Fix | Delete
}
[1870] Fix | Delete
$name=esc_html( $name );
[1871] Fix | Delete
$others = '';
[1872] Fix | Delete
$out .= '<div id="' . $metakey. '" class="dropdownbutton-list" data-name="' . $name . '" data-def-icon="' . $default['icon']. '">';
[1873] Fix | Delete
[1874] Fix | Delete
// default state
[1875] Fix | Delete
$first = '
[1876] Fix | Delete
<div class="first-ddbtn">
[1877] Fix | Delete
<a href="#" data-val="' . $default['value'] . '" data-name="' . $default['name'] . '" title="' . $default['title'] . '">
[1878] Fix | Delete
<img src="' . $default['icon'] . '" title="' . $default['title'] . '" loading="lazy" decoding="async" />
[1879] Fix | Delete
<span class="ddbtn-name">' . $name . '</span>
[1880] Fix | Delete
</a>
[1881] Fix | Delete
</div>';
[1882] Fix | Delete
[1883] Fix | Delete
foreach ( $states as $state ) {
[1884] Fix | Delete
$title=esc_attr($state['title']);
[1885] Fix | Delete
if ( isset( $state['value'] ) && isset( $data[$metakey] ) && $state['value'] === $data[$metakey] ) {
[1886] Fix | Delete
$first = '<div class="first-ddbtn">
[1887] Fix | Delete
<a href="#" data-val="' . $state['value'] . '" data-name="' . $state['name'] . '" title="' . $title. '">
[1888] Fix | Delete
<img src="' . $state['icon']. '" title="' . $title . '" loading="lazy" decoding="async" />
[1889] Fix | Delete
<span class="ddbtn-name">' . $name . '</span>
[1890] Fix | Delete
</a>
[1891] Fix | Delete
</div>';
[1892] Fix | Delete
$selected = 'selected';
[1893] Fix | Delete
} else {
[1894] Fix | Delete
$selected = '';
[1895] Fix | Delete
}
[1896] Fix | Delete
[1897] Fix | Delete
$others .= '
[1898] Fix | Delete
<div class="ddbtn">
[1899] Fix | Delete
<a href="#" data-sel="' . $selected. '" data-val="' . $state['value'] . '" data-name="' . $state['name'] . '" title="' . $title . '">
[1900] Fix | Delete
<img src="' . $state['icon'] . '" title="' . $title. '" loading="lazy" decoding="async" />
[1901] Fix | Delete
<span class="ddbtn-label">' . esc_html( $state['name'] ) . '</span>
[1902] Fix | Delete
</a>
[1903] Fix | Delete
</div>';
[1904] Fix | Delete
}
[1905] Fix | Delete
$out .= $first . '<div class="dropdownbutton">' . $others . '</div>';
[1906] Fix | Delete
$out .= '
[1907] Fix | Delete
</div>';
[1908] Fix | Delete
$out .= '<input type="hidden" value="' . esc_attr( themify_get( $metakey ) ) . '" class="' . $meta_class. '" id="' . $metakey . '" name="' . $metakey . '" />';
[1909] Fix | Delete
}
[1910] Fix | Delete
[1911] Fix | Delete
$out .= '</div>';
[1912] Fix | Delete
return $out;
[1913] Fix | Delete
}
[1914] Fix | Delete
[1915] Fix | Delete
/**
[1916] Fix | Delete
* Outputs post sorting options
[1917] Fix | Delete
* @param string $key Key used to get data from theme settings array
[1918] Fix | Delete
* @param array $data Theme settings data
[1919] Fix | Delete
* @return string $out Markup for options
[1920] Fix | Delete
*/
[1921] Fix | Delete
if ( ! function_exists( 'themify_post_sorting_options' ) ) {
[1922] Fix | Delete
function themify_post_sorting_options( $key = 'setting-index_order', $data = array() ) {
[1923] Fix | Delete
[1924] Fix | Delete
$orderby = themify_get( $key . 'by','');
[1925] Fix | Delete
$orderby_options = apply_filters( 'themify_index_orderby_options', array(
[1926] Fix | Delete
__( 'Date (default)', 'themify' ) => 'date',
[1927] Fix | Delete
__( 'Random', 'themify' ) => 'rand',
[1928] Fix | Delete
__( 'Author', 'themify' ) => 'author',
[1929] Fix | Delete
__( 'Post Title', 'themify' ) => 'title',
[1930] Fix | Delete
__( 'Comments Number', 'themify' ) => 'comment_count',
[1931] Fix | Delete
__( 'Modified Date', 'themify' ) => 'modified',
[1932] Fix | Delete
__( 'Post Slug', 'themify' ) => 'name',
[1933] Fix | Delete
__( 'Post ID', 'themify' ) => 'ID',
[1934] Fix | Delete
__( 'Custom Field String', 'themify' ) => 'meta_value',
[1935] Fix | Delete
__( 'Custom Field Numeric', 'themify' ) => 'meta_value_num' ) );
[1936] Fix | Delete
[1937] Fix | Delete
$order = themify_get( $key,'');
[1938] Fix | Delete
$order_options = array(
[1939] Fix | Delete
__( 'Descending (default)', 'themify' ) => 'DESC',
[1940] Fix | Delete
__( 'Ascending', 'themify' ) => 'ASC' );
[1941] Fix | Delete
[1942] Fix | Delete
$order_meta_key = 'setting-index_meta_key';
[1943] Fix | Delete
[1944] Fix | Delete
$out = '<p><span class="label">' . __( 'Order By', 'themify' ) . ' </span>
[1945] Fix | Delete
<select name="' .$key . 'by">';
[1946] Fix | Delete
foreach ( $orderby_options as $option => $value ) {
[1947] Fix | Delete
$out .= '<option value="' . esc_attr( $value ) . '" '.selected( $value, $orderby, false ).'>' . esc_html( $option ) . '</option>';
[1948] Fix | Delete
}
[1949] Fix | Delete
$out .= ' </select>
[1950] Fix | Delete
</p>
[1951] Fix | Delete
<p data-show-if-element="[name=' . $key . 'by]" data-show-if-value=\'["meta_value", "meta_value_num"]\'>
[1952] Fix | Delete
<span class="label">' . __( 'Custom Field Key', 'themify' ) . ' </span>
[1953] Fix | Delete
<input type="text" id="' . $order_meta_key . '" name="' . $order_meta_key . '" value="' . esc_attr( themify_get( $order_meta_key,'',true ) ) . '" />
[1954] Fix | Delete
</p>
[1955] Fix | Delete
<p>
[1956] Fix | Delete
<span class="label">' . __( 'Order', 'themify' ) . ' </span>
[1957] Fix | Delete
<select name="' . $key. '">';
[1958] Fix | Delete
foreach ( $order_options as $option => $value ) {
[1959] Fix | Delete
$out .= '<option value="' . esc_attr( $value ) . '" '.selected( $value, $order, false ).'>' . esc_html( $option ) . '</option>';
[1960] Fix | Delete
}
[1961] Fix | Delete
$out .= ' </select>
[1962] Fix | Delete
</p>';
[1963] Fix | Delete
[1964] Fix | Delete
return $out;
[1965] Fix | Delete
}
[1966] Fix | Delete
}
[1967] Fix | Delete
[1968] Fix | Delete
if ( ! function_exists( 'themify_homepage_welcome' ) ) {
[1969] Fix | Delete
/**
[1970] Fix | Delete
* Homepage Welcome Function
[1971] Fix | Delete
* @return string Markup for welcome text control
[1972] Fix | Delete
*/
[1973] Fix | Delete
function themify_homepage_welcome() {
[1974] Fix | Delete
return '<p><textarea class="widthfull" name="setting-homepage_welcome" rows="4">' . esc_textarea( themify_get( 'setting-homepage_welcome','',true ) ) . '</textarea></p>';
[1975] Fix | Delete
}
[1976] Fix | Delete
}
[1977] Fix | Delete
[1978] Fix | Delete
if ( ! function_exists( 'themify_exclude_rss' ) ) {
[1979] Fix | Delete
/**
[1980] Fix | Delete
* Exclude RSS
[1981] Fix | Delete
* @return string
[1982] Fix | Delete
*/
[1983] Fix | Delete
function themify_exclude_rss() {
[1984] Fix | Delete
return '<p><label for="setting-exclude_rss"><input type="checkbox" id="setting-exclude_rss" name="setting-exclude_rss" ' . checked( themify_get( 'setting-exclude_rss','',true ), 'on', false ) . '/> ' . __( 'Check here to exclude RSS icon/button in the header', 'themify' ) . '</label></p>';
[1985] Fix | Delete
}
[1986] Fix | Delete
}
[1987] Fix | Delete
[1988] Fix | Delete
if ( ! function_exists( 'themify_exclude_search_form' ) ) {
[1989] Fix | Delete
/**
[1990] Fix | Delete
* Exclude Search Form
[1991] Fix | Delete
* @return string
[1992] Fix | Delete
*/
[1993] Fix | Delete
function themify_exclude_search_form() {
[1994] Fix | Delete
return '<p><label for="setting-exclude_search_form"><input type="checkbox" id="setting-exclude_search_form" name="setting-exclude_search_form" ' . checked( themify_get( 'setting-exclude_search_form','',true ), 'on', false ) . '/> ' . __( 'Check here to exclude search form in the header', 'themify' ) . '</label></p>';
[1995] Fix | Delete
}
[1996] Fix | Delete
}
[1997] Fix | Delete
[1998] Fix | Delete
if( ! function_exists( 'footer_text_settings' ) ) {
[1999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function