Задать вопрос
@ValentinoRV

Что за странный кусок кода в Wordpress теме Legenda в файле theme-option.php?

Код с комментарием, но тем не менее интересует что это за кусок
add_action( 'init', 'custom_theme_options', 1 );

/**
* Build the custom settings & update OptionTree.
*/
if (!function_exists('custom_theme_options')) {
function custom_theme_options($return = false) {
global $options_presets;
$options_presets['e-commerce'] = 'eyJtYWluX2xheW91dCI6IndpZGUiLCJ0b190b3AiOlsiMSJdLCJuaWNlX3Njcm9sbCI6WyIxIl0sImZhdmljb25fYmFkZ2UiOlsiMSJdLCJmb290ZXJfZGVtbyI6WyIxIl0sImdvb2dsZV9jb2RlIjoiIiwibWFpbl9jb2xvcl9zY2hlbWUiOiJsaWdodCIsImFjdGl2ZWNvbCI6IiNlZDFjMmUiLCJwcmljZWNvbG9yIjoiI0VFM0IzQiIsImJhY2tncm91bmRfaW1nIjp7ImJhY2tncm91bmQtY29sb3IiOiIiLCJiYWNrZ3JvdW5kLXJlcGVhdCI6IiIsImJhY2tncm91bmQtYXR0YWNobWVudCI6IiIsImJhY2tncm91bmQtcG9zaXRpb24iOiIiLCJiYWNrZ3JvdW5kLWltYWdlIjoiIn0sImJhY2tncm91bmRfY292ZXIiOiJlbmFibGUiLCJtYWluZm9udCI6eyJmb250LWNvbG9yIjoiIiwiZm9udC1mYW1pbHkiOiIiLCJnb29nbGUtZm9udCI6IiIsImZvbnQtc2l6ZSI6IiIsImZvbnQtc3R5bGUiOiIiLCJmb250LXZhcmlhbnQiOiIiLCJmb250LXdlaWdodCI6IiIsImxldHRlci1zcGFjaW5nIjoiIiwibGluZS1oZWlnaHQiOiIiLCJ0ZXh0LWRlY29yYXRpb24iOiIiLCJ0ZXh0LXRyYW5zZm9ybSI6IiJ9LCJzZm9udCI6eyJmb250LWNvbG9yIjoiIiwiZm9udC1mYW1pbHkiOiIiLCJnb29nbGUtZm9udCI6IiIsImZvbnQtc2l6ZSI6IiIsImZvbnQtc3R5bGUiOiIiLCJmb250LXZhcmlhbnQiOiIiLCJmb250LXd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faGVpZ2h0IjoiMzUwIiwicHBfYmciOnsiYmFja2dyb3VuZC1jb2xvciI6IiIsImJhY2tncm91bmQtcmVwZWF0IjoiIiwiYmFja2dyb3VuZC1hdHRhY2htZW50IjoiIiwiYmFja2dyb3VuZC1wb3NpdGlvbiI6IiIsImJhY2tncm91bmQtaW1hZ2UiOiIifSwiYmxvZ19sYXlvdXQiOiJkZWZhdWx0IiwiYmxvZ19wYWdlX2ltYWdlX3dpZHRoIjoiMTAwMCIsImJsb2dfcGFnZV9pbWFnZV9oZWlnaHQiOiI1MDAiLCJibG9nX3BhZ2VfaW1hZ2VfY3JvcHBpbmciOlsiMSJdLCJibG9nX3NpZGViYXIiOiJsZWZ0IiwiYmxvZ19zaWRlYmFyX3Jlc3BvbnNpdmUiOiJib3R0b20iLCJwb3J0Zm9saW9fY291bnQiOiItMSIsInBvcnRmb2xpb19jb2x1bW5zIjoiMyIsInJlY2VudF9wcm9qZWN0cyI6WyIxIl0sInBvcnRmb2xpb19jb21tZW50cyI6WyIxIl0sInBvcnRmb2xpb19saWdodGJveCI6WyIxIl0sInBvcnRmb2xpb19pbWFnZV93aWR0aCI6IjcyMCIsInBvcnRmb2xpb19pbWFnZV9oZWlnaHQiOiI1NTAiLCJwb3J0Zm9saW9faW1hZ2VfY3JvcHBpbmciOlsiMSJdLCJnb29nbGVfbWFwX2VuYWJsZSI6WyIxIl0sImNvbnRhY3RfcGFnZV90eXBlIjoiZGVmYXVsdCIsImNvbnRhY3RzX2VtYWlsIjoidGVzdEBnbWFpbC5jb20iLCJnb29nbGVfbWFwIjoiNTEuNTA3NjIyLC0wLjEzMDUiLCJyZXNwb25zaXZlIjpbIjEiXSwicmVzcG9uc2l2ZV9mcm9tIjoiMTIwMCIsIm5ld19vcHRpb25zIjoiIn0=';

$options_presets['corporate'] = // далее тот же код, что и выше
  • Вопрос задан
  • 304 просмотра
Подписаться 2 Оценить Комментировать
Решения вопроса 1
это base64-кодированные настройки
{"main_layout":"wide","to_top":["1"],"nice_scroll":["1"],"favicon_badge":["1"],"footer_demo":["1"],"google_code":"","main_color_scheme":"light","activecol":"#ed1c2e","pricecolor":"#EE3B3B","background_img":{"background-color":"","background-repeat":"","background-attachment":"","background-position":"","background-image":""},"background_cover":"enable","mainfont":{"font-color":"","font-family":"","google-font":"","font-size":"","font-style":"","font-variant":"","font-weight":"","letter-spacing":"","line-height":"","text-decoration":"","text-transform":""},"sfont":{"font-color":"","font-family":"","google-font":"","font-size":"","font-style":"","font-variant":"","font-weight":"","letter-spacing":"","line-height":"","text-decoration":"","text-transform":""},"h1":{"font-color":"","font-family":"","google-font":"","font-size":"","font-style":"","font-variant":"","font-weight":"","letter-spacing":"","line-height":"","text-decoration":"","text-transform":""},"h2":{"font-color":"","font-family":"","google-font":"","font-size":"","font-style":"","font-variant":"","font-weight":"","letter-spacing":"","line-height":"","text-decoration":"","text-transform":""},"h3":{"font-color":"","font-family":"","google-font":"","font-size":"","font-style":"","font-variant":"","font-weight":"","letter-spacing":"","line-height":"","text-decoration":"","text-transform":""},"h4":{"font-color":"","font-family":"","google-font":"","font-size":"","font-style":"","font-variant":"","font-weight":"","letter-spacing":"","line-height":"","text-decoration":"","text-transform":""},"h5":{"font-color":"","font-family":"","google-font":"","font-size":"","font-style":"","font-variant":"","font-weight":"","letter-spacing":"","line-height":"","text-decoration":"","text-transform":""},"h6":{"font-color":"","font-family":"","google-font":"","font-size":"","font-style":"","font-variant":"","font-weight":"","letter-spacing":"","line-height":"","text-decoration":"","text-transform":""},"top_bar":["1"],"top_panel":["1"],"header_type":"1","languages_area":["1"],"right_panel":["1"],"logo":"","favicon":"[template_url]\/images\/favicon.ico","top_links":["1"],"cart_widget":["1"],"search_form":["1"],"wishlist_link":["1"],"breadcrumb_type":"","footer_type":"1","checkout_page":"stepbystep","ajax_filter":["1"],"cats_accordion":["1"],"new_icon":["1"],"new_icon_width":"48","new_icon_height":"48","new_icon_url":"","sale_icon":["1"],"sale_icon_width":"48","sale_icon_height":"48","sale_icon_url":"","product_bage_banner":"<p><img class=\"rounded-corners\" alt=\"\" src=\"[template_url]\/images\/assets\/shop-banner.jpg\" \/><\/p>\r\n","empty_cart_content":"<h2>Your cart is currently empty<\/h2>\r\n<p>You have not added any items in your shopping cart<\/p>\r\n","empty_category_content":"","view_mode":"grid_list","prodcuts_per_row":"3","products_per_page":"12","product_page_sidebar":["1"],"grid_sidebar":"left","product_img_hover":"swap","descr_length":"30","product_page_image_width":"500","product_page_image_height":"700","product_page_productname":["1"],"product_page_cats":["1"],"product_page_price":["1"],"product_page_addtocart":["1"],"single_sidebar":"right","upsell_location":"sidebar","ajax_addtocart":["1"],"zoom_effect":"window","single_product_thumb_width":"120","single_product_thumb_height":"170","gallery_lightbox":["1"],"tabs_type":"tabs-default","custom_tab_title":"Custom Tab For All Products","custom_tab":"<p><img class=\"alignleft\" alt=\"\" src=\"[template_url]\/images\/assets\/custom1.png\" \/><\/p>\r\n<h3>Custom TEXT\/HTML<\/h3>\r\n<p>Ultricies sociis ut vel parturient! Tempor! Nec quis turpis placerat ac hac tincidunt, velit, vel sit mauris a, dolor, natoque enim! Etiam risus? Elit, adipiscing dignissim ut et risus sit placerat, penatibus tincidunt, diam sed dignissim rhoncus mus lectus, penatibus arcu sit in mattis porta placerat. Ultricies velit odio. Vel? Aliquam nunc dolor! Nisi, cras, nunc, et auctor? Augue facilisis! Augue eu dis platea sed, placerat hac pid, lectus dapibus turpis in tincidunt arcu rhoncus auctor. Sit duis nascetur vut! Pulvinar egestas, aenean, sagittis odio enim magna, etiam platea nec lundium, nisi, mauris porttitor elementum a, tempor turpis. Aliquam nunc dolor! Nisi, cras, nunc, et auctor? Augue facilisis!<\/p>\r\n","quick_view":["1"],"quick_images":"slider","quick_product_name":["1"],"quick_price":["1"],"quick_rating":["1"],"quick_sku":["1"],"quick_descr":["1"],"quick_add_to_cart":["1"],"quick_share":["1"],"promo_popup":["1"],"pp_content":"You can add any HTML here (admin -> Theme Options -> Promo Popup).<br> We suggest you create a static block and put it here using shortcode'","pp_width":"750","pp_height":"350","pp_bg":{"background-color":"","background-repeat":"","background-attachment":"","background-position":"","background-image":""},"blog_layout":"default","blog_page_image_width":"1000","blog_page_image_height":"500","blog_page_image_cropping":["1"],"blog_sidebar":"left","blog_sidebar_responsive":"bottom","portfolio_count":"-1","portfolio_columns":"3","recent_projects":["1"],"portfolio_comments":["1"],"portfolio_lightbox":["1"],"portfolio_image_width":"720","portfolio_image_height":"550","portfolio_image_cropping":["1"],"google_map_enable":["1"],"contact_page_type":"default","contacts_email":"test@gmail.com","google_map":"51.507622,-0.1305","responsive":["1"],"responsive_from":"1200","new_options":""}
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы
23 дек. 2024, в 09:41
5000 руб./за проект
23 дек. 2024, в 09:39
1000000 руб./за проект
23 дек. 2024, в 09:33
3000 руб./за проект