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/custom-t.../admin/builder/assets/js
File: builder.js
/**
[1500] Fix | Delete
* View Feed Instances
[1501] Fix | Delete
*
[1502] Fix | Delete
* @since 2.0
[1503] Fix | Delete
*/
[1504] Fix | Delete
viewFeedInstances : function(feed){
[1505] Fix | Delete
var self = this;
[1506] Fix | Delete
self.viewsActive.instanceFeedActive = feed;
[1507] Fix | Delete
self.movePopUp();
[1508] Fix | Delete
ctfBuilder.$forceUpdate();
[1509] Fix | Delete
},
[1510] Fix | Delete
[1511] Fix | Delete
/**
[1512] Fix | Delete
* Select All Feeds in List
[1513] Fix | Delete
*
[1514] Fix | Delete
* @since 2.0
[1515] Fix | Delete
*/
[1516] Fix | Delete
selectAllFeedCheckBox : function(){
[1517] Fix | Delete
var self = this;
[1518] Fix | Delete
if( !self.checkAllFeedsActive() ){
[1519] Fix | Delete
self.feedsSelected = [];
[1520] Fix | Delete
self.feedsList.forEach( function(feed) {
[1521] Fix | Delete
self.feedsSelected.push(feed.id);
[1522] Fix | Delete
});
[1523] Fix | Delete
}else{
[1524] Fix | Delete
self.feedsSelected = [];
[1525] Fix | Delete
}
[1526] Fix | Delete
[1527] Fix | Delete
},
[1528] Fix | Delete
[1529] Fix | Delete
/**
[1530] Fix | Delete
* Select Single Feed in List
[1531] Fix | Delete
*
[1532] Fix | Delete
* @since 2.0
[1533] Fix | Delete
*/
[1534] Fix | Delete
selectFeedCheckBox : function(feedID){
[1535] Fix | Delete
if(this.feedsSelected.includes(feedID)){
[1536] Fix | Delete
this.feedsSelected.splice(this.feedsSelected.indexOf(feedID),1);
[1537] Fix | Delete
}else{
[1538] Fix | Delete
this.feedsSelected.push(feedID);
[1539] Fix | Delete
}
[1540] Fix | Delete
ctfBuilder.$forceUpdate();
[1541] Fix | Delete
},
[1542] Fix | Delete
[1543] Fix | Delete
/**
[1544] Fix | Delete
* Check if All Feeds are Selected
[1545] Fix | Delete
*
[1546] Fix | Delete
* @since 2.0
[1547] Fix | Delete
*/
[1548] Fix | Delete
checkAllFeedsActive : function(){
[1549] Fix | Delete
var self = this,
[1550] Fix | Delete
result = true;
[1551] Fix | Delete
self.feedsList.forEach( function(feed) {
[1552] Fix | Delete
if(!self.feedsSelected.includes(feed.id)){
[1553] Fix | Delete
result = false;
[1554] Fix | Delete
}
[1555] Fix | Delete
});
[1556] Fix | Delete
[1557] Fix | Delete
return result;
[1558] Fix | Delete
},
[1559] Fix | Delete
[1560] Fix | Delete
[1561] Fix | Delete
/**
[1562] Fix | Delete
* Copy text to clipboard
[1563] Fix | Delete
*
[1564] Fix | Delete
* @since 2.0
[1565] Fix | Delete
*/
[1566] Fix | Delete
copyToClipBoard : function(value){
[1567] Fix | Delete
var self = this;
[1568] Fix | Delete
const el = document.createElement('textarea');
[1569] Fix | Delete
el.className = 'ctf-fb-cp-clpboard';
[1570] Fix | Delete
el.value = value;
[1571] Fix | Delete
document.body.appendChild(el);
[1572] Fix | Delete
el.select();
[1573] Fix | Delete
document.execCommand('copy');
[1574] Fix | Delete
document.body.removeChild(el);
[1575] Fix | Delete
self.notificationElement = {
[1576] Fix | Delete
type : 'success',
[1577] Fix | Delete
text : this.genericText.copiedClipboard,
[1578] Fix | Delete
shown : "shown"
[1579] Fix | Delete
};
[1580] Fix | Delete
setTimeout(function(){
[1581] Fix | Delete
self.notificationElement.shown = "hidden";
[1582] Fix | Delete
}, 3000);
[1583] Fix | Delete
ctfBuilder.$forceUpdate();
[1584] Fix | Delete
},
[1585] Fix | Delete
[1586] Fix | Delete
/*-------------------------------------------
[1587] Fix | Delete
CUSTOMIZER FUNCTIONS
[1588] Fix | Delete
-------------------------------------------*/
[1589] Fix | Delete
/**
[1590] Fix | Delete
* HighLight Section
[1591] Fix | Delete
*
[1592] Fix | Delete
* @since 2.0
[1593] Fix | Delete
*/
[1594] Fix | Delete
isSectionHighLighted : function(sectionName){
[1595] Fix | Delete
var self = this;
[1596] Fix | Delete
return (self.highLightedSection === sectionName || self.highLightedSection === 'all')
[1597] Fix | Delete
},
[1598] Fix | Delete
[1599] Fix | Delete
/**
[1600] Fix | Delete
* Enable HightLight Section
[1601] Fix | Delete
*
[1602] Fix | Delete
* @since 2.0
[1603] Fix | Delete
*/
[1604] Fix | Delete
enableHighLightSection : function(sectionId){
[1605] Fix | Delete
var self = this,
[1606] Fix | Delete
listPostSection = ['customize_feedlayout', 'customize_colorscheme', 'customize_posts','post_style','individual_elements'],
[1607] Fix | Delete
headerSection = ['customize_header'],
[1608] Fix | Delete
likeBoxSection = ['customize_likebox'],
[1609] Fix | Delete
loadeMoreSection = ['customize_loadmorebutton'],
[1610] Fix | Delete
domBody = document.getElementsByTagName("body")[0];
[1611] Fix | Delete
[1612] Fix | Delete
domBody.classList.remove("no-overflow");
[1613] Fix | Delete
[1614] Fix | Delete
if( listPostSection.includes(sectionId) ){
[1615] Fix | Delete
self.highLightedSection = 'postList';
[1616] Fix | Delete
self.scrollToHighLightedSection("ctf-tweet-items");
[1617] Fix | Delete
}else if( headerSection.includes(sectionId) ){
[1618] Fix | Delete
self.highLightedSection = 'header';
[1619] Fix | Delete
self.scrollToHighLightedSection("ctf-header");
[1620] Fix | Delete
}else if( loadeMoreSection.includes(sectionId) ){
[1621] Fix | Delete
self.highLightedSection = 'loadMore';
[1622] Fix | Delete
self.scrollToHighLightedSection("ctf-more");
[1623] Fix | Delete
}else{
[1624] Fix | Delete
self.highLightedSection = 'all';
[1625] Fix | Delete
domBody.classList.remove("no-overflow");
[1626] Fix | Delete
}
[1627] Fix | Delete
},
[1628] Fix | Delete
[1629] Fix | Delete
[1630] Fix | Delete
/**
[1631] Fix | Delete
* Scroll to Highlighted Section
[1632] Fix | Delete
*
[1633] Fix | Delete
* @since 2.0
[1634] Fix | Delete
*/
[1635] Fix | Delete
scrollToHighLightedSection : function(sectionId){
[1636] Fix | Delete
const element = document.getElementById(sectionId) !== undefined && document.getElementById(sectionId) !== null ?
[1637] Fix | Delete
document.getElementById(sectionId) :
[1638] Fix | Delete
( document.getElementsByClassName(sectionId)[0] !== undefined && document.getElementsByClassName(sectionId)[0] !== null ? document.getElementsByClassName(sectionId)[0] : null );
[1639] Fix | Delete
[1640] Fix | Delete
[1641] Fix | Delete
if(element != undefined && element != null){
[1642] Fix | Delete
const y = element.getBoundingClientRect().top - 120 + window.pageYOffset - 10;
[1643] Fix | Delete
window.scrollTo({top: y, behavior: 'smooth'});
[1644] Fix | Delete
}
[1645] Fix | Delete
},
[1646] Fix | Delete
[1647] Fix | Delete
/**
[1648] Fix | Delete
* Enable & Show Color Picker
[1649] Fix | Delete
*
[1650] Fix | Delete
* @since 2.0
[1651] Fix | Delete
*/
[1652] Fix | Delete
showColorPickerPospup : function(controlId){
[1653] Fix | Delete
this.customizerScreens.activeColorPicker = controlId;
[1654] Fix | Delete
},
[1655] Fix | Delete
[1656] Fix | Delete
/**
[1657] Fix | Delete
* Hide Color Picker
[1658] Fix | Delete
*
[1659] Fix | Delete
* @since 2.0
[1660] Fix | Delete
*/
[1661] Fix | Delete
hideColorPickerPospup : function(){
[1662] Fix | Delete
this.customizerScreens.activeColorPicker = null;
[1663] Fix | Delete
},
[1664] Fix | Delete
[1665] Fix | Delete
switchCustomizerPreviewDevice : function(previewScreen){
[1666] Fix | Delete
var self = this;
[1667] Fix | Delete
self.customizerScreens.previewScreen = previewScreen;
[1668] Fix | Delete
self.loadingBar = true;
[1669] Fix | Delete
setTimeout(function(){
[1670] Fix | Delete
self.setShortcodeGlobalSettings(true);
[1671] Fix | Delete
self.loadingBar = false;
[1672] Fix | Delete
},200)
[1673] Fix | Delete
ctfBuilder.$forceUpdate();
[1674] Fix | Delete
},
[1675] Fix | Delete
switchCustomizerTab : function(tabId){
[1676] Fix | Delete
var self = this,
[1677] Fix | Delete
domBody = document.getElementsByTagName("body")[0];
[1678] Fix | Delete
self.customizerScreens.activeTab = tabId;
[1679] Fix | Delete
self.customizerScreens.activeSection = null;
[1680] Fix | Delete
self.customizerScreens.activeSectionData = null;
[1681] Fix | Delete
self.highLightedSection = 'all';
[1682] Fix | Delete
self.dummyLightBoxScreen = false;
[1683] Fix | Delete
domBody.classList.remove("no-overflow");
[1684] Fix | Delete
ctfBuilder.$forceUpdate();
[1685] Fix | Delete
},
[1686] Fix | Delete
switchCustomizerSection : function(sectionId, section, isNested = false, isBackElements){
[1687] Fix | Delete
var self = this;
[1688] Fix | Delete
self.customizerScreens.parentActiveSection = null;
[1689] Fix | Delete
self.customizerScreens.parentActiveSectionData = null;
[1690] Fix | Delete
if(isNested){
[1691] Fix | Delete
self.customizerScreens.parentActiveSection = self.customizerScreens.activeSection;
[1692] Fix | Delete
self.customizerScreens.parentActiveSectionData = self.customizerScreens.activeSectionData;
[1693] Fix | Delete
}
[1694] Fix | Delete
self.customizerScreens.activeSection = sectionId;
[1695] Fix | Delete
self.customizerScreens.activeSectionData = section;
[1696] Fix | Delete
if(!isBackElements){
[1697] Fix | Delete
self.enableHighLightSection(sectionId);
[1698] Fix | Delete
}
[1699] Fix | Delete
ctfBuilder.$forceUpdate();
[1700] Fix | Delete
},
[1701] Fix | Delete
switchNestedSection : function(sectionId, section){
[1702] Fix | Delete
var self = this;
[1703] Fix | Delete
if(section !== null){
[1704] Fix | Delete
self.customizerScreens.activeSection = sectionId;
[1705] Fix | Delete
self.customizerScreens.activeSectionData = section;
[1706] Fix | Delete
}else{
[1707] Fix | Delete
var sectionArray = sectionId['sections'];
[1708] Fix | Delete
var elementSectionData = self.customizerSidebarBuilder;
[1709] Fix | Delete
[1710] Fix | Delete
sectionArray.map(function(elm, index){
[1711] Fix | Delete
elementSectionData = (elementSectionData[elm] != undefined && elementSectionData[elm] != null) ? elementSectionData[elm] : null;
[1712] Fix | Delete
});
[1713] Fix | Delete
if(elementSectionData != null){
[1714] Fix | Delete
self.customizerScreens.activeSection = sectionId['id'];
[1715] Fix | Delete
self.customizerScreens.activeSectionData = elementSectionData;
[1716] Fix | Delete
}
[1717] Fix | Delete
}
[1718] Fix | Delete
ctfBuilder.$forceUpdate();
[1719] Fix | Delete
},
[1720] Fix | Delete
backToPostElements : function(){
[1721] Fix | Delete
var self = this,
[1722] Fix | Delete
individual_elements = self.customizerSidebarBuilder['customize'].sections.customize_posts.nested_sections.individual_elements;
[1723] Fix | Delete
self.customizerScreens.activeSection = 'customize_posts';
[1724] Fix | Delete
self.customizerScreens.activeSectionData= self.customizerSidebarBuilder['customize'].sections.customize_posts;
[1725] Fix | Delete
self.switchCustomizerSection('individual_elements', individual_elements, true, true);
[1726] Fix | Delete
ctfBuilder.$forceUpdate();
[1727] Fix | Delete
[1728] Fix | Delete
},
[1729] Fix | Delete
[1730] Fix | Delete
changeSettingValue : function(settingID, value, doProcess = true, ajaxAction = false) {
[1731] Fix | Delete
var self = this;
[1732] Fix | Delete
if(Object.keys(self.inActiveExtensions).includes(settingID)){
[1733] Fix | Delete
self.viewsActive.extensionsPopupElement = self.inActiveExtensions[settingID];
[1734] Fix | Delete
}else{
[1735] Fix | Delete
if(doProcess){
[1736] Fix | Delete
self.customizerFeedData.settings[settingID] = value;
[1737] Fix | Delete
}
[1738] Fix | Delete
if(ajaxAction !== false){
[1739] Fix | Delete
self.customizerControlAjaxAction(ajaxAction, settingID);
[1740] Fix | Delete
}
[1741] Fix | Delete
if(settingID === 'num' && !self.checkNotEmpty(self.customizerFeedData.settings[settingID])){
[1742] Fix | Delete
self.customizerFeedData.settings[settingID] = 1;
[1743] Fix | Delete
}
[1744] Fix | Delete
self.regenerateLayout(settingID);
[1745] Fix | Delete
}
[1746] Fix | Delete
},
[1747] Fix | Delete
[1748] Fix | Delete
//Shortcode Global Layout Settings
[1749] Fix | Delete
regenerateLayout : function(settingID) {
[1750] Fix | Delete
var self = this,
[1751] Fix | Delete
regenerateFeedHTML = [
[1752] Fix | Delete
'layout'
[1753] Fix | Delete
],
[1754] Fix | Delete
relayoutFeed = [
[1755] Fix | Delete
'layout',
[1756] Fix | Delete
'masonrycols',
[1757] Fix | Delete
'masonrytabletcols',
[1758] Fix | Delete
'masonrymobilecols',
[1759] Fix | Delete
];
[1760] Fix | Delete
if( relayoutFeed.includes( settingID ) ){
[1761] Fix | Delete
setTimeout(function(){
[1762] Fix | Delete
self.setShortcodeGlobalSettings(true);
[1763] Fix | Delete
}, 10)
[1764] Fix | Delete
}
[1765] Fix | Delete
[1766] Fix | Delete
},
[1767] Fix | Delete
[1768] Fix | Delete
[1769] Fix | Delete
//Get Customizer Additional CSS Classes
[1770] Fix | Delete
getAdditionalCustomizerClasses : function(){
[1771] Fix | Delete
var self = this,
[1772] Fix | Delete
additionalCssClasses = '';
[1773] Fix | Delete
return additionalCssClasses;
[1774] Fix | Delete
},
[1775] Fix | Delete
[1776] Fix | Delete
//Shortcode Global Layout Settings
[1777] Fix | Delete
setShortcodeGlobalSettings : function(flyPreview = false){
[1778] Fix | Delete
var self = this,
[1779] Fix | Delete
customizerSettings = self.customizerFeedData.settings;
[1780] Fix | Delete
if( flyPreview === true ){
[1781] Fix | Delete
window.ctf_init()
[1782] Fix | Delete
}
[1783] Fix | Delete
jQuery('body').find('.ctf-tweet-media').click(function(event){
[1784] Fix | Delete
if( !self.valueIsEnabled( self.customizerFeedData.settings.disablelightbox ) ){
[1785] Fix | Delete
self.dummyLightBoxScreen = true;
[1786] Fix | Delete
event.preventDefault();
[1787] Fix | Delete
}
[1788] Fix | Delete
})
[1789] Fix | Delete
jQuery('body').find('.ctf-more').unbind('click')
[1790] Fix | Delete
},
[1791] Fix | Delete
[1792] Fix | Delete
detroyCarousel : function(){
[1793] Fix | Delete
var self = this,
[1794] Fix | Delete
customizerSettings = self.customizerFeedData.settings;
[1795] Fix | Delete
},
[1796] Fix | Delete
[1797] Fix | Delete
[1798] Fix | Delete
//Get feed Containes Classes
[1799] Fix | Delete
getFeedClasses : function(){
[1800] Fix | Delete
var self = this,
[1801] Fix | Delete
customizerSettings = self.customizerFeedData.settings,
[1802] Fix | Delete
feedClasses = 'ctf';
[1803] Fix | Delete
feedClasses += ' ctf-type-' + customizerSettings.type;
[1804] Fix | Delete
feedClasses += ' ctf-' + customizerSettings.layout;
[1805] Fix | Delete
feedClasses += self.ctfRebrand ? ' ctf-rebranded' : '';
[1806] Fix | Delete
feedClasses += ' ctf-styles ' + customizerSettings.class;
[1807] Fix | Delete
feedClasses += ' ctf-feed-' + self.customizerFeedData.feed_info.id;
[1808] Fix | Delete
feedClasses += (customizerSettings.tweetpoststyle != undefined) ? ' ctf-' + customizerSettings.tweetpoststyle + '-style' : '';
[1809] Fix | Delete
feedClasses += self.checkNotEmpty( customizerSettings.height ) && customizerSettings.height != 0 ? ' ctf-fixed-height' : '';
[1810] Fix | Delete
feedClasses += self.valueIsEnabled( customizerSettings.autoscroll ) ? ' ctf-autoscroll' : '';
[1811] Fix | Delete
feedClasses += self.valueIsEnabled( customizerSettings.persistentcache ) ? ' ctf-persistent' : '';
[1812] Fix | Delete
feedClasses += customizerSettings.font_method === 'fontfile' ? ' ctf-fontfile' : '';
[1813] Fix | Delete
if(customizerSettings.layout === 'masonry'){
[1814] Fix | Delete
feedClasses += ' masonry-' + customizerSettings.masonrycols + '-desktop';
[1815] Fix | Delete
feedClasses += ' masonry-' + customizerSettings.masonrytabletcols + '-tablet';
[1816] Fix | Delete
feedClasses += ' masonry-' + customizerSettings.masonrymobilecols + '-mobile';
[1817] Fix | Delete
}
[1818] Fix | Delete
feedClasses += self.getPaletteClass();
[1819] Fix | Delete
[1820] Fix | Delete
return feedClasses;
[1821] Fix | Delete
},
[1822] Fix | Delete
[1823] Fix | Delete
/**
[1824] Fix | Delete
* Get Feed Preview Global CSS Class
[1825] Fix | Delete
*
[1826] Fix | Delete
* @since 2.0
[1827] Fix | Delete
* @return String
[1828] Fix | Delete
*/
[1829] Fix | Delete
getPaletteClass : function(context = ''){
[1830] Fix | Delete
var self = this,
[1831] Fix | Delete
colorPalette = self.customizerFeedData.settings.colorpalette;
[1832] Fix | Delete
[1833] Fix | Delete
if(self.checkNotEmpty( colorPalette )){
[1834] Fix | Delete
var feedID = colorPalette === 'custom' ? ('_' + self.customizerFeedData.feed_info.id) : '';
[1835] Fix | Delete
return colorPalette !== 'inherit' ? ' ctf' + context + '_palette_' + colorPalette + feedID : '';
[1836] Fix | Delete
}
[1837] Fix | Delete
return '';
[1838] Fix | Delete
},
[1839] Fix | Delete
//Get Number of Columns depending on the Preview Screen
[1840] Fix | Delete
getColsPreviewScreen : function(){
[1841] Fix | Delete
var self = this,
[1842] Fix | Delete
customizerSettings = self.customizerFeedData.settings;
[1843] Fix | Delete
[1844] Fix | Delete
if(customizerSettings.layout === 'masonry' || customizerSettings.layout === 'carousel'){
[1845] Fix | Delete
switch (self.customizerScreens.previewScreen) {
[1846] Fix | Delete
case 'mobile':
[1847] Fix | Delete
return customizerSettings.layout === 'masonry' ? customizerSettings.masonrymobilecols : customizerSettings.carouselmobilecols;
[1848] Fix | Delete
break;
[1849] Fix | Delete
case 'tablet':
[1850] Fix | Delete
return customizerSettings.layout === 'masonry' ? customizerSettings.masonrytabletcols : customizerSettings.carouseltabletcols;
[1851] Fix | Delete
break;
[1852] Fix | Delete
default:
[1853] Fix | Delete
return customizerSettings.layout === 'masonry' ? customizerSettings.masonrycols : customizerSettings.carouselcols;
[1854] Fix | Delete
break;
[1855] Fix | Delete
}
[1856] Fix | Delete
}
[1857] Fix | Delete
return false;
[1858] Fix | Delete
},
[1859] Fix | Delete
[1860] Fix | Delete
//Tablet Cols Classes
[1861] Fix | Delete
getTabletColsClass : function(){
[1862] Fix | Delete
var self = this,
[1863] Fix | Delete
customizerSettings = self.customizerFeedData.settings;
[1864] Fix | Delete
[1865] Fix | Delete
return ' ctf_tab_col_' + parseInt( customizerSettings.colstablet );
[1866] Fix | Delete
},
[1867] Fix | Delete
[1868] Fix | Delete
//Mobile Cols Classes
[1869] Fix | Delete
getMobileColsClass : function(){
[1870] Fix | Delete
var self = this,
[1871] Fix | Delete
customizerSettings = self.customizerFeedData.settings,
[1872] Fix | Delete
disableMobile = self.valueIsEnabled( customizerSettings.disablemobile );
[1873] Fix | Delete
[1874] Fix | Delete
if(disableMobile === 'false') disableMobile = '';
[1875] Fix | Delete
[1876] Fix | Delete
if ( disableMobile !== ' ctf_disable_mobile' && customizerSettings.colsmobile !== 'same' ) {
[1877] Fix | Delete
var colsmobile = parseInt( customizerSettings.colsmobile ) > 0 ? parseInt( customizerSettings.colsmobile ) : 'auto';
[1878] Fix | Delete
return ' ctf_mob_col_' + colsmobile;
[1879] Fix | Delete
}else{
[1880] Fix | Delete
var colsmobile = parseInt( customizerSettings.cols ) > 0 ? parseInt( customizerSettings.cols ) : 4;
[1881] Fix | Delete
return ' ctf_disable_mobile ctf_mob_col_' + parseInt( customizerSettings.cols );
[1882] Fix | Delete
[1883] Fix | Delete
}
[1884] Fix | Delete
},
[1885] Fix | Delete
[1886] Fix | Delete
//Header Classes
[1887] Fix | Delete
getHeaderClass : function( headerType ){
[1888] Fix | Delete
var self = this,
[1889] Fix | Delete
customizerSettings = self.customizerFeedData.settings,
[1890] Fix | Delete
headerClasses = 'sb_instagram_header ';
[1891] Fix | Delete
[1892] Fix | Delete
headerClasses += 'ctf_feed_type_'+ customizerSettings['type'];
[1893] Fix | Delete
headerClasses += customizerSettings['headerstyle'] === 'centered' && headerType === 'normal' ? ' ctf_centered' : '';
[1894] Fix | Delete
headerClasses += ['medium', 'large'].includes(customizerSettings['headersize']) ? ' ctf_' + customizerSettings['headersize'] : '';
[1895] Fix | Delete
headerClasses += headerType === 'boxed' ? ' ctf_header_style_boxed' : '';
[1896] Fix | Delete
headerClasses += self.getHeaderAvatar() === false ? ' ctf_no_avatar' : '';
[1897] Fix | Delete
headerClasses += self.getPaletteClass('_header');
[1898] Fix | Delete
return headerClasses;
[1899] Fix | Delete
},
[1900] Fix | Delete
[1901] Fix | Delete
//Header Name
[1902] Fix | Delete
getHeaderName : function(){
[1903] Fix | Delete
var self = this,
[1904] Fix | Delete
headerData = self.customizerFeedData.headerData;
[1905] Fix | Delete
if( self.hasOwnNestedProperty(headerData, 'name') && self.checkNotEmpty( headerData['name'] ) ){
[1906] Fix | Delete
return headerData['name'];
[1907] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'data.full_name') ){
[1908] Fix | Delete
return headerData['data']['full_name'];
[1909] Fix | Delete
}
[1910] Fix | Delete
return self.getHeaderUserName();
[1911] Fix | Delete
},
[1912] Fix | Delete
[1913] Fix | Delete
//Header User Name
[1914] Fix | Delete
getHeaderUserName : function(){
[1915] Fix | Delete
var self = this,
[1916] Fix | Delete
headerData = self.customizerFeedData.headerData;
[1917] Fix | Delete
if( self.hasOwnNestedProperty(headerData, 'username') && self.checkNotEmpty( headerData['username'] ) ){
[1918] Fix | Delete
return headerData['username'];
[1919] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'user.username') ){
[1920] Fix | Delete
return headerData['user']['username'];
[1921] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'data.username') ){
[1922] Fix | Delete
return headerData['data']['username'];
[1923] Fix | Delete
}
[1924] Fix | Delete
return '';
[1925] Fix | Delete
},
[1926] Fix | Delete
[1927] Fix | Delete
//Header Media Count
[1928] Fix | Delete
getHeaderMediaCount : function(){
[1929] Fix | Delete
var self = this,
[1930] Fix | Delete
headerData = self.customizerFeedData.headerData;
[1931] Fix | Delete
if( self.hasOwnNestedProperty(headerData, 'data.counts.media') ){
[1932] Fix | Delete
return headerData['data']['counts']['media'];
[1933] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'counts.media') ){
[1934] Fix | Delete
return headerData['counts']['media'];
[1935] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'media_count') ){
[1936] Fix | Delete
return headerData['media_count'];
[1937] Fix | Delete
}
[1938] Fix | Delete
return '';
[1939] Fix | Delete
},
[1940] Fix | Delete
[1941] Fix | Delete
//Header Followers Count
[1942] Fix | Delete
getHeaderFollowersCount : function(){
[1943] Fix | Delete
var self = this,
[1944] Fix | Delete
headerData = self.customizerFeedData.headerData;
[1945] Fix | Delete
if( self.hasOwnNestedProperty(headerData, 'data.counts.followed_by') ){
[1946] Fix | Delete
return headerData['data']['counts']['followed_by'];
[1947] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'counts.followed_by') ){
[1948] Fix | Delete
return headerData['counts']['followed_by'];
[1949] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'followers_count') ){
[1950] Fix | Delete
return headerData['followers_count'];
[1951] Fix | Delete
}
[1952] Fix | Delete
return '';
[1953] Fix | Delete
},
[1954] Fix | Delete
[1955] Fix | Delete
//Header Avatar
[1956] Fix | Delete
getHeaderAvatar : function(){
[1957] Fix | Delete
var self = this,
[1958] Fix | Delete
customizerSettings = self.customizerFeedData.settings,
[1959] Fix | Delete
headerData = self.customizerFeedData.headerData,
[1960] Fix | Delete
header = self.customizerFeedData.header;
[1961] Fix | Delete
if( self.checkNotEmpty( customizerSettings['customavatar'] ) ){
[1962] Fix | Delete
return customizerSettings['customavatar'];
[1963] Fix | Delete
}else if( headerData['local_avatar'] != false && self.checkNotEmpty( headerData['local_avatar'] ) ){
[1964] Fix | Delete
return headerData['local_avatar'];
[1965] Fix | Delete
}else if( header['local_avatar_url'] != false && self.checkNotEmpty( header['local_avatar_url'] ) ){
[1966] Fix | Delete
return header['local_avatar_url'];
[1967] Fix | Delete
}else{
[1968] Fix | Delete
if( self.hasOwnNestedProperty(headerData, 'profile_picture') ){
[1969] Fix | Delete
return headerData['profile_picture'];
[1970] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'profile_picture_url') ){
[1971] Fix | Delete
return headerData['profile_picture_url'];
[1972] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'user.profile_picture') ){
[1973] Fix | Delete
return headerData['user']['profile_picture'];
[1974] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'data.profile_picture') ){
[1975] Fix | Delete
return headerData['data']['profile_picture'];
[1976] Fix | Delete
}
[1977] Fix | Delete
}
[1978] Fix | Delete
return false;
[1979] Fix | Delete
},
[1980] Fix | Delete
[1981] Fix | Delete
//Header Bio
[1982] Fix | Delete
getHeaderBio : function(){
[1983] Fix | Delete
var self = this,
[1984] Fix | Delete
customizerSettings = self.customizerFeedData.settings,
[1985] Fix | Delete
headerData = self.customizerFeedData.headerData;
[1986] Fix | Delete
[1987] Fix | Delete
if( self.checkNotEmpty( customizerSettings['custombio'] ) ){
[1988] Fix | Delete
return customizerSettings['custombio'];
[1989] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'data.bio') ){
[1990] Fix | Delete
return headerData['data']['bio'];
[1991] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'bio') ){
[1992] Fix | Delete
return headerData['bio'];
[1993] Fix | Delete
}else if( self.hasOwnNestedProperty(headerData, 'biography') ){
[1994] Fix | Delete
return headerData['biography'];
[1995] Fix | Delete
}
[1996] Fix | Delete
return '';
[1997] Fix | Delete
},
[1998] Fix | Delete
[1999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function