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
'image' => 'https://themify.me/wp-content/product-img/addons/pointers.jpg',
[1000] Fix | Delete
'desc' => 'Highlight certain areas of your image',
[1001] Fix | Delete
'page' => 'https://themify.me/addons/pointers',
[1002] Fix | Delete
'path' => 'builder-pointers/init.php'
[1003] Fix | Delete
),
[1004] Fix | Delete
'builder-pricing-table' => array(
[1005] Fix | Delete
'name' => __( 'Builder Pricing Table', 'themify' ),
[1006] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/pricing-table.jpg',
[1007] Fix | Delete
'desc' => 'Beautiful and responsive pricing table addon',
[1008] Fix | Delete
'page' => 'https://themify.me/addons/pricing-table',
[1009] Fix | Delete
'path' => 'builder-pricing-table/init.php'
[1010] Fix | Delete
),
[1011] Fix | Delete
'builder-progress-bar' => array(
[1012] Fix | Delete
'name' => __( 'Builder Progress Bar', 'themify' ),
[1013] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/progress-bar.jpg',
[1014] Fix | Delete
'desc' => 'Animated bars based on input percentage',
[1015] Fix | Delete
'page' => 'https://themify.me/addons/progress-bar',
[1016] Fix | Delete
'path' => 'builder-progress-bar/init.php'
[1017] Fix | Delete
),
[1018] Fix | Delete
'builder-slider-pro' => array(
[1019] Fix | Delete
'name' => __( 'Builder Slider Pro', 'themify' ),
[1020] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/slider-pro.jpg',
[1021] Fix | Delete
'desc' => 'Make stunning sliders with transition and animation effects',
[1022] Fix | Delete
'page' => 'https://themify.me/addons/slider-pro',
[1023] Fix | Delete
'path' => 'builder-slider-pro/init.php'
[1024] Fix | Delete
),
[1025] Fix | Delete
'builder-tiles' => array(
[1026] Fix | Delete
'name' => __( 'Builder Tiles', 'themify' ),
[1027] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/tiles.jpg',
[1028] Fix | Delete
'desc' => 'Drag & drop tiles to create Windows 8 Metro layouts',
[1029] Fix | Delete
'page' => 'https://themify.me/addons/tiles',
[1030] Fix | Delete
'path' => 'builder-tiles/init.php'
[1031] Fix | Delete
),
[1032] Fix | Delete
'builder-timeline' => array(
[1033] Fix | Delete
'name' => __( 'Builder Timeline', 'themify' ),
[1034] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/timeline.jpg',
[1035] Fix | Delete
'desc' => 'Display content in a timeline-styled layouts',
[1036] Fix | Delete
'page' => 'https://themify.me/addons/timeline',
[1037] Fix | Delete
'path' => 'builder-timeline/init.php'
[1038] Fix | Delete
),
[1039] Fix | Delete
'builder-typewriter' => array(
[1040] Fix | Delete
'name' => __( 'Builder Typewriter', 'themify' ),
[1041] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/typewriter.jpg',
[1042] Fix | Delete
'desc' => 'Display your text with eye-catching typing animation',
[1043] Fix | Delete
'page' => 'https://themify.me/addons/typewriter',
[1044] Fix | Delete
'path' => 'builder-typewriter/init.php'
[1045] Fix | Delete
),
[1046] Fix | Delete
'builder-woocommerce' => array(
[1047] Fix | Delete
'name' => __( 'Builder WooCommerce', 'themify' ),
[1048] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/woocommerce.jpg',
[1049] Fix | Delete
'desc' => 'Show WooCommerce products anywhere in the Builder',
[1050] Fix | Delete
'page' => 'https://themify.me/addons/woocommerce',
[1051] Fix | Delete
'path' => 'builder-woocommerce/init.php'
[1052] Fix | Delete
),
[1053] Fix | Delete
'contact-form-7' => array(
[1054] Fix | Delete
'name' => __( 'Contact Form 7', 'themify' ),
[1055] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
[1056] Fix | Delete
'desc' => '',
[1057] Fix | Delete
'page' => 'https://wordpress.org/plugins/contact-form-7/',
[1058] Fix | Delete
'path' => 'contact-form-7/wp-contact-form-7.php',
[1059] Fix | Delete
'wp_hosted'=>true
[1060] Fix | Delete
),
[1061] Fix | Delete
'themify-portfolio-post' => array(
[1062] Fix | Delete
'name' => __( 'Portfolio Posts', 'themify' ),
[1063] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
[1064] Fix | Delete
'desc' => '',
[1065] Fix | Delete
'page' => 'https://wordpress.org/plugins/themify-portfolio-post/',
[1066] Fix | Delete
'path' => 'themify-portfolio-post/themify-portfolio-post.php',
[1067] Fix | Delete
'wp_hosted'=>true
[1068] Fix | Delete
),
[1069] Fix | Delete
'mailchimp-for-wp' => array(
[1070] Fix | Delete
'name' => __( 'MailChimp for WordPress', 'themify' ),
[1071] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
[1072] Fix | Delete
'desc' => '',
[1073] Fix | Delete
'page' => 'https://wordpress.org/plugins/mailchimp-for-wp/',
[1074] Fix | Delete
'path' => 'mailchimp-for-wp/mailchimp-for-wp.php',
[1075] Fix | Delete
'wp_hosted'=>true
[1076] Fix | Delete
),
[1077] Fix | Delete
'woocommerce' => array(
[1078] Fix | Delete
'name' => __( 'WooCommerce', 'themify' ),
[1079] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
[1080] Fix | Delete
'desc' => '',
[1081] Fix | Delete
'page' => 'https://wordpress.org/plugins/woocommerce/',
[1082] Fix | Delete
'path' => 'woocommerce/woocommerce.php',
[1083] Fix | Delete
'wp_hosted'=>true
[1084] Fix | Delete
),
[1085] Fix | Delete
'themify-wc-product-filter' => array(
[1086] Fix | Delete
'name' => __( 'Themify Product Filter', 'themify' ),
[1087] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
[1088] Fix | Delete
'desc' => '',
[1089] Fix | Delete
'page' => 'https://themify.me/themify-product-filter',
[1090] Fix | Delete
'path' => 'themify-wc-product-filter/themify-wc-product-filter.php'
[1091] Fix | Delete
),
[1092] Fix | Delete
'themify-shortcodes' => array(
[1093] Fix | Delete
'name' => __( 'Themify Shortcodes', 'themify' ),
[1094] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/themify-shortcodes.jpg',
[1095] Fix | Delete
'desc' => '',
[1096] Fix | Delete
'page' => 'https://wordpress.org/plugins/themify-shortcodes/',
[1097] Fix | Delete
'path' => 'themify-shortcodes/init.php',
[1098] Fix | Delete
'wp_hosted'=>true
[1099] Fix | Delete
),
[1100] Fix | Delete
'themify-event-post' => array(
[1101] Fix | Delete
'name' => __( 'Themify Event Post', 'themify' ),
[1102] Fix | Delete
'image' => 'https://themify.me/wp-content/product-img/addons/themify-shortcodes.jpg',
[1103] Fix | Delete
'desc' => '',
[1104] Fix | Delete
'page' => 'https://wordpress.org/plugins/themify-event-post/',
[1105] Fix | Delete
'path' => 'themify-event-post/themify-event-post.php',
[1106] Fix | Delete
'wp_hosted'=>true
[1107] Fix | Delete
),
[1108] Fix | Delete
'learnpress' => array(
[1109] Fix | Delete
'name' => __( 'LearnPress', 'themify' ),
[1110] Fix | Delete
'image' => 'https://ps.w.org/learnpress/assets/icon-256x256.png',
[1111] Fix | Delete
'desc' => '',
[1112] Fix | Delete
'page' => 'https://wordpress.org/plugins/learnpress/',
[1113] Fix | Delete
'path' => 'learnpress/learnpress.php',
[1114] Fix | Delete
'wp_hosted'=>true
[1115] Fix | Delete
),
[1116] Fix | Delete
'themify-store-locator'=>array(
[1117] Fix | Delete
'name' => __( 'Themify Store Locator', 'themify' ),
[1118] Fix | Delete
'image' => 'https://themify.me/wp-content/uploads/2016/12/store-locator-blog-image.jpg',
[1119] Fix | Delete
'desc' => '',
[1120] Fix | Delete
'page' => 'https://wordpress.org/plugins/themify-store-locator/',
[1121] Fix | Delete
'path' => 'themify-store-locator/store_locator.php',
[1122] Fix | Delete
'wp_hosted'=>true
[1123] Fix | Delete
),
[1124] Fix | Delete
'themify-updater' => array(
[1125] Fix | Delete
'name' => __( 'Themify Updater', 'themify' ),
[1126] Fix | Delete
'image' => '',
[1127] Fix | Delete
'desc' => '',
[1128] Fix | Delete
'page' => 'https://themify.me/docs/themify-updater-documentation',
[1129] Fix | Delete
'path' => 'themify-updater/themify-updater.php'
[1130] Fix | Delete
),
[1131] Fix | Delete
'give' => array(
[1132] Fix | Delete
'name' => __( 'Give', 'themify' ),
[1133] Fix | Delete
'image' => 'https://ps.w.org/give/assets/icon-256x256.jpg',
[1134] Fix | Delete
'desc' => '',
[1135] Fix | Delete
'page' => 'https://wordpress.org/plugins/give/',
[1136] Fix | Delete
'path' => 'give/give.php',
[1137] Fix | Delete
'wp_hosted'=>true
[1138] Fix | Delete
),
[1139] Fix | Delete
);
[1140] Fix | Delete
return $name===''?$plugins:(isset( $plugins[$name] )?$plugins[$name]:false);
[1141] Fix | Delete
}
[1142] Fix | Delete
[1143] Fix | Delete
/**
[1144] Fix | Delete
* Themify Admin Widgets
[1145] Fix | Delete
*/
[1146] Fix | Delete
[1147] Fix | Delete
if( !function_exists( 'themify_add_admin_widgets' ) ):
[1148] Fix | Delete
function themify_add_admin_widgets() {
[1149] Fix | Delete
wp_add_dashboard_widget( 'themify_news', esc_html__( 'Themify News', 'themify' ), 'themify_news_admin_widget' );
[1150] Fix | Delete
}
[1151] Fix | Delete
endif;
[1152] Fix | Delete
add_action( 'wp_dashboard_setup', 'themify_add_admin_widgets' );
[1153] Fix | Delete
[1154] Fix | Delete
// Themify News Admin Widget
[1155] Fix | Delete
function themify_news_admin_widget() {
[1156] Fix | Delete
$cache_key = 'themify_news_dashboard_widget';
[1157] Fix | Delete
[1158] Fix | Delete
echo '<div class="rss-widget">';
[1159] Fix | Delete
if ( false !== ( $output = Themify_Storage::get( $cache_key ) ) ) {
[1160] Fix | Delete
echo $output;
[1161] Fix | Delete
} else {
[1162] Fix | Delete
echo '<script async src="' . THEMIFY_URI . '/js/admin/admin-dashboard.min.js"></script>';
[1163] Fix | Delete
}
[1164] Fix | Delete
echo '</div>';
[1165] Fix | Delete
}
[1166] Fix | Delete
[1167] Fix | Delete
[1168] Fix | Delete
function themify_check_update_link( $plugin, $type ) {
[1169] Fix | Delete
global $admin_page_hooks;
[1170] Fix | Delete
if( !empty($admin_page_hooks[$plugin]) && $type === 'plugin' && strpos( 'builder-' , $plugin) === false ) {
[1171] Fix | Delete
return esc_url( admin_url( 'admin.php?page=' . $plugin ) );
[1172] Fix | Delete
}
[1173] Fix | Delete
[1174] Fix | Delete
return esc_url( admin_url( 'admin.php?page=themify#update-check' ) );
[1175] Fix | Delete
}
[1176] Fix | Delete
[1177] Fix | Delete
///////////////////////////////////////////
[1178] Fix | Delete
// Favicon Module
[1179] Fix | Delete
///////////////////////////////////////////
[1180] Fix | Delete
function themify_favicon( $data = array() ) {
[1181] Fix | Delete
if($data['attr']['target'] != ''){
[1182] Fix | Delete
$target = "<span class='hide target'>".$data['attr']['target']."</span>";
[1183] Fix | Delete
} else {
[1184] Fix | Delete
$target = '';
[1185] Fix | Delete
}
[1186] Fix | Delete
$setting_favicon = themify_get( 'setting-favicon','',true );
[1187] Fix | Delete
return '<div class="themify_field_row">
[1188] Fix | Delete
<span class="label">'. __('Custom Favicon', 'themify') . '</span>
[1189] Fix | Delete
<input id="setting-favicon" type="text" class="width10" name="setting-favicon" value="' . esc_attr( $setting_favicon ) . '" /> <br />
[1190] Fix | Delete
'.$target.'
[1191] Fix | Delete
<span class="pushlabel" style="display:block;">
[1192] Fix | Delete
' . themify_get_uploader('setting-favicon', array('tomedia' => true)) . '
[1193] Fix | Delete
</span>
[1194] Fix | Delete
</div>';
[1195] Fix | Delete
}
[1196] Fix | Delete
[1197] Fix | Delete
///////////////////////////////////////////
[1198] Fix | Delete
// Default Layouts
[1199] Fix | Delete
///////////////////////////////////////////
[1200] Fix | Delete
if (!function_exists('themify_custom_post_type_layouts')) :
[1201] Fix | Delete
/**
[1202] Fix | Delete
* Default Custom Post sidebar Module
[1203] Fix | Delete
* @param array $data Theme settings data
[1204] Fix | Delete
* @return string Markup for module.
[1205] Fix | Delete
* @since 4.0.0
[1206] Fix | Delete
*/
[1207] Fix | Delete
function themify_custom_post_type_layouts($data = array()){
[1208] Fix | Delete
$data = themify_get_data();
[1209] Fix | Delete
[1210] Fix | Delete
/**
[1211] Fix | Delete
* Theme Settings Option Key Prefix
[1212] Fix | Delete
* @var string
[1213] Fix | Delete
*/
[1214] Fix | Delete
$prefix = 'setting-custom_post_';
[1215] Fix | Delete
[1216] Fix | Delete
/**
[1217] Fix | Delete
* Module markup
[1218] Fix | Delete
* @var string
[1219] Fix | Delete
*/
[1220] Fix | Delete
[1221] Fix | Delete
$output = '';
[1222] Fix | Delete
[1223] Fix | Delete
$custom_posts = null;
[1224] Fix | Delete
[1225] Fix | Delete
$post_types = get_post_types(array('public' => true, 'publicly_queryable' => 'true'), 'objects');
[1226] Fix | Delete
$excluded_types = apply_filters( 'themify_exclude_CPT_for_sidebar', array('post', 'page', 'attachment', 'tbuilder_layout', 'tbuilder_layout_part', 'section','tglobal_style'));
[1227] Fix | Delete
[1228] Fix | Delete
[1229] Fix | Delete
foreach ($post_types as $key => $value) {
[1230] Fix | Delete
if (!in_array($key, $excluded_types)) {
[1231] Fix | Delete
$custom_posts[$key] = array( 'name' => $value->labels->singular_name, 'archive' => $value->has_archive );
[1232] Fix | Delete
}
[1233] Fix | Delete
}
[1234] Fix | Delete
[1235] Fix | Delete
$custom_posts = apply_filters('themify_get_public_post_types', $custom_posts);
[1236] Fix | Delete
[1237] Fix | Delete
/**
[1238] Fix | Delete
* Sidebar placement options
[1239] Fix | Delete
* @var array
[1240] Fix | Delete
*/
[1241] Fix | Delete
$sidebar_location_options = apply_filters('themify_post_type_theme_sidebars' , array(
[1242] Fix | Delete
array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'title' => __('Sidebar Right', 'themify')),
[1243] Fix | Delete
array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')),
[1244] Fix | Delete
array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify'))
[1245] Fix | Delete
), false );
[1246] Fix | Delete
/**
[1247] Fix | Delete
* Page sidebar placement
[1248] Fix | Delete
*/
[1249] Fix | Delete
[1250] Fix | Delete
if(is_array($custom_posts)){
[1251] Fix | Delete
foreach($custom_posts as $key => $cPost){
[1252] Fix | Delete
$output .= sprintf('<h4>%s %s</h4>', strtoupper($cPost['name']), __('POST TYPE', 'themify'));
[1253] Fix | Delete
[1254] Fix | Delete
if ($cPost['archive']) {
[1255] Fix | Delete
[1256] Fix | Delete
$output .= '<p>'. sprintf('<span class="label">%s %s</span>', ucfirst($cPost['name']), __('Archive Sidebar', 'themify'));
[1257] Fix | Delete
$val = isset( $data[$prefix.$key.'_archive'] ) ? $data[$prefix.$key.'_archive'] : '';
[1258] Fix | Delete
[1259] Fix | Delete
foreach ( $sidebar_location_options as $option ) {
[1260] Fix | Delete
if ( ( '' == $val || ! $val || ! isset( $val ) ) && ( isset( $option['selected'] ) && $option['selected'] ) ) {
[1261] Fix | Delete
$val = $option['value'];
[1262] Fix | Delete
}
[1263] Fix | Delete
$class = $val == $option['value']?'selected':'';
[1264] Fix | Delete
$w= isset($option['w'])?$option['w']:'46';
[1265] Fix | Delete
$h= isset($option['w'])?$option['w']:'35';
[1266] Fix | Delete
$output .= '<a href="#" class="preview-icon '.$class.'" title="'.$option['title'].'"><img width="'.$w.'" height="'.$h.'" loading="lazy" decoding="async" src="'.THEME_URI.'/'.$option['img'].'" alt="'.$option['value'].'" /></a>';
[1267] Fix | Delete
}
[1268] Fix | Delete
[1269] Fix | Delete
$output .= '<input type="hidden" name="'.$prefix.$key.'_archive" class="val" value="'.$val.'" /></p>';
[1270] Fix | Delete
[1271] Fix | Delete
$content_width = isset( $data[ $prefix . $key . '_archive_content_width'] ) ? $data[ $prefix . $key . '_archive_content_width'] : 'default_width';
[1272] Fix | Delete
$output .=
[1273] Fix | Delete
'<p data-show-if-element="[name=' . ( $prefix . $key) . '_archive]" data-show-if-value=\'["sidebar-none"]\'>
[1274] Fix | Delete
<span class="label">' . sprintf( __( '%s Archive Content Width', 'themify' ), $cPost['name'] ) . '</span>
[1275] Fix | Delete
<a href="#" class="preview-icon' . ( $content_width === 'default_width' ? ' selected' : '' ) . '" title="' . __( 'Default Width', 'themify' ) . '"><img src="' . THEME_URI . '/themify/img/default.svg" alt="default_width" loading="lazy" decoding="async" width="46" height="35"></a>
[1276] Fix | Delete
<a href="#" class="preview-icon' . ( $content_width === 'full_width' ? ' selected' : '' ) . '" title="' . __( 'Fullwidth', 'themify' ) . '"><img src="' . THEME_URI . '/themify/img/fullwidth.svg" alt="full_width" loading="lazy" decoding="async" width="46" height="35"></a>
[1277] Fix | Delete
<input type="hidden" name="' . $prefix . $key . '_archive_content_width" value="' . esc_attr( $content_width ) . '" class="val">
[1278] Fix | Delete
</p>';
[1279] Fix | Delete
}
[1280] Fix | Delete
[1281] Fix | Delete
$output .= '<p>'. sprintf('<span class="label">%s %s</span>', ucfirst($cPost['name']), __('Single Sidebar', 'themify'));
[1282] Fix | Delete
$val = isset( $data[$prefix.$key.'_single'] ) ? $data[$prefix.$key.'_single'] : '';
[1283] Fix | Delete
[1284] Fix | Delete
foreach ( $sidebar_location_options as $option ) {
[1285] Fix | Delete
if ( ( '' == $val || ! $val || ! isset( $val ) ) && ( isset( $option['selected'] ) && $option['selected'] ) ) {
[1286] Fix | Delete
$val = $option['value'];
[1287] Fix | Delete
}
[1288] Fix | Delete
$class = $val == $option['value']?'selected':'';
[1289] Fix | Delete
$w= isset($option['w'])?$option['w']:'46';
[1290] Fix | Delete
$h= isset($option['w'])?$option['w']:'35';
[1291] Fix | Delete
$output .= '<a href="#" class="preview-icon '.$class.'" title="'.$option['title'].'"><img width="'.$w.'" height="'.$h.'" loading="lazy" decoding="async" src="'.THEME_URI.'/'.$option['img'].'" alt="'.$option['value'].'" /></a>';
[1292] Fix | Delete
}
[1293] Fix | Delete
$output .= '<input type="hidden" name="'.$prefix.$key.'_single" class="val" value="'.$val.'" /></p>';
[1294] Fix | Delete
[1295] Fix | Delete
$content_width = isset( $data[ $prefix . $key . '_single_content_width'] ) ? $data[ $prefix . $key . '_single_content_width'] : 'default_width';
[1296] Fix | Delete
$output .=
[1297] Fix | Delete
'<p data-show-if-element="[name=' . ( $prefix . $key) . '_single]" data-show-if-value=\'["sidebar-none"]\'>
[1298] Fix | Delete
<span class="label">' . __( 'Default Single Content Width', 'themify' ) . '</span>
[1299] Fix | Delete
<a href="#" class="preview-icon' . ( $content_width === 'default_width' ? ' selected' : '' ) . '" title="' . __( 'Default Width', 'themify' ) . '"><img src="' . THEME_URI . '/themify/img/default.svg" alt="default_width" loading="lazy" decoding="async" width="46" height="35"></a>
[1300] Fix | Delete
<a href="#" class="preview-icon' . ( $content_width === 'full_width' ? ' selected' : '' ) . '" title="' . __( 'Fullwidth', 'themify' ) . '"><img src="' . THEME_URI . '/themify/img/fullwidth.svg" alt="full_width" loading="lazy" decoding="async" width="46" height="35"></a>
[1301] Fix | Delete
<input type="hidden" name="' . $prefix . $key . '_single_content_width" value="' . esc_attr( $content_width ) . '" class="val">
[1302] Fix | Delete
</p>';
[1303] Fix | Delete
}
[1304] Fix | Delete
}
[1305] Fix | Delete
[1306] Fix | Delete
return $output;
[1307] Fix | Delete
}
[1308] Fix | Delete
[1309] Fix | Delete
endif;
[1310] Fix | Delete
[1311] Fix | Delete
///////////////////////////////////////////
[1312] Fix | Delete
// Custom Feed URL Module
[1313] Fix | Delete
///////////////////////////////////////////
[1314] Fix | Delete
function themify_custom_feed_url( $data = array() ) {
[1315] Fix | Delete
$custom_feed_url = themify_get( 'setting-custom_feed_url','',true );
[1316] Fix | Delete
return '<p><span class="label">' . __( 'Custom Feed URL', 'themify' ) . '</span> <input type="text" class="width10" name="setting-custom_feed_url" value="' . esc_attr( $custom_feed_url ) . '" /> <br />
[1317] Fix | Delete
<span class="pushlabel"><small>' . __( 'e.g. http://feedburner.com/userid', 'themify' ) . '</small></span></p>';
[1318] Fix | Delete
}
[1319] Fix | Delete
[1320] Fix | Delete
///////////////////////////////////////////
[1321] Fix | Delete
// Meta Description Module
[1322] Fix | Delete
///////////////////////////////////////////
[1323] Fix | Delete
function themify_meta_description( $data = array() ) {
[1324] Fix | Delete
$data = themify_get_data();
[1325] Fix | Delete
return '<p><textarea name="setting-meta_description" class="widthfull" rows="4">'.$data['setting-meta_description'].'</textarea></p>';
[1326] Fix | Delete
}
[1327] Fix | Delete
[1328] Fix | Delete
/**
[1329] Fix | Delete
* Header HTML Module
[1330] Fix | Delete
* @param array $data
[1331] Fix | Delete
* @return string
[1332] Fix | Delete
*/
[1333] Fix | Delete
function themify_header_html( $data = array() ) {
[1334] Fix | Delete
$header_html = themify_get( 'setting-header_html','',true );
[1335] Fix | Delete
return '<p>' . __('The following code will add to the &lt;head&gt; tag.', 'themify') . '</p>
[1336] Fix | Delete
<p><textarea class="widthfull tf_code_editor" rows="10" name="setting-header_html" id="setting-header_html">'. esc_html( $header_html ) .'</textarea><br />
[1337] Fix | Delete
<small>' . __('Useful if you need to add additional scripts such as CSS or JS.', 'themify') . '</small></p>';
[1338] Fix | Delete
}
[1339] Fix | Delete
[1340] Fix | Delete
[1341] Fix | Delete
/**
[1342] Fix | Delete
* Footer HTML Module
[1343] Fix | Delete
* @param array $data
[1344] Fix | Delete
* @return string
[1345] Fix | Delete
*/
[1346] Fix | Delete
function themify_footer_html( $data = array() ) {
[1347] Fix | Delete
$footer_html = themify_get( 'setting-footer_html','',true );
[1348] Fix | Delete
return '<p>' . __('The following code will be added to the footer before the closing &lt;/body&gt; tag.', 'themify') . '</p>
[1349] Fix | Delete
<p><textarea type="text" class="widthfull tf_code_editor" rows="10" name="setting-footer_html" id="setting-footer_html">' . esc_html( $footer_html ) . '</textarea><br />
[1350] Fix | Delete
<small>' . __('Useful if you need to Javascript or tracking code.', 'themify') . '</small></p>';
[1351] Fix | Delete
}
[1352] Fix | Delete
[1353] Fix | Delete
///////////////////////////////////////////
[1354] Fix | Delete
// Search Settings Module
[1355] Fix | Delete
///////////////////////////////////////////
[1356] Fix | Delete
function themify_search_settings( $data = array() ) {
[1357] Fix | Delete
$data = themify_get_data();
[1358] Fix | Delete
$post_checked = '';
[1359] Fix | Delete
$checked = '';
[1360] Fix | Delete
$search_settings = themify_get( 'setting-search_settings','',true );
[1361] Fix | Delete
if ( themify_check( 'setting-search_settings_exclude',true ) ) {
[1362] Fix | Delete
$checked = 'checked="checked"';
[1363] Fix | Delete
}
[1364] Fix | Delete
if ( themify_check( 'setting-search_exclude_post',true ) ) {
[1365] Fix | Delete
$post_checked = 'checked="checked"';
[1366] Fix | Delete
}
[1367] Fix | Delete
$out = '<p>
[1368] Fix | Delete
<span class="label">' . __( 'Search in Category IDs', 'themify' ) .themify_help(__( 'Use minus sign (-) to exclude categories. Example: (1,4,-7) = search only in Category 1 &amp; 4, and exclude Category 7.', 'themify' )) . ' </span>
[1369] Fix | Delete
<input type="text" class="width6" name="setting-search_settings" value="' . esc_attr( $search_settings ) . '" />
[1370] Fix | Delete
</p>
[1371] Fix | Delete
<p>
[1372] Fix | Delete
<span class="pushlabel"><label for="setting-search_exclude_post"><input type="checkbox" id="setting-search_exclude_post" name="setting-search_exclude_post" ' . $post_checked . '/> ' . __( 'Exclude Posts in search results', 'themify' ) . '</label></span>
[1373] Fix | Delete
</p>
[1374] Fix | Delete
<p>
[1375] Fix | Delete
<span class="pushlabel"><label for="setting-search_settings_exclude"><input type="checkbox" id="setting-search_settings_exclude" name="setting-search_settings_exclude" ' . $checked . '/> ' . __( 'Exclude Pages in search results', 'themify' ) . '</label></span>
[1376] Fix | Delete
</p>';
[1377] Fix | Delete
[1378] Fix | Delete
[1379] Fix | Delete
$pre = 'setting-search_exclude_';
[1380] Fix | Delete
$checkboxes = '';
[1381] Fix | Delete
[1382] Fix | Delete
$exclude_types = apply_filters( 'themify_types_excluded_in_search', get_post_types( array(
[1383] Fix | Delete
'_builtin' => false,
[1384] Fix | Delete
'public' => true,
[1385] Fix | Delete
'exclude_from_search' => false
[1386] Fix | Delete
) ) );
[1387] Fix | Delete
[1388] Fix | Delete
foreach ( array_keys( $exclude_types ) as $post_type ) {
[1389] Fix | Delete
[1390] Fix | Delete
$type = get_post_type_object( $post_type );
[1391] Fix | Delete
[1392] Fix | Delete
if ( is_object( $type ) ) {
[1393] Fix | Delete
$checkboxes .= '
[1394] Fix | Delete
<p>
[1395] Fix | Delete
<span class="pushlabel">
[1396] Fix | Delete
<label for="' . $pre . $type->name . '">
[1397] Fix | Delete
<input type="checkbox" id="' . $pre . $type->name . '" name="' . esc_attr( $pre . $type->name ) . '" ' . checked( isset( $data[ $pre . $type->name ] ) ? $data[ $pre . $type->name ] : '', 'on', false ) . '/> ' . sprintf( __( 'Exclude %s in search results', 'themify' ), $type->labels->name ) . '
[1398] Fix | Delete
</label>
[1399] Fix | Delete
</span>
[1400] Fix | Delete
</p>';
[1401] Fix | Delete
}
[1402] Fix | Delete
}
[1403] Fix | Delete
[1404] Fix | Delete
if ( '' != $checkboxes ) {
[1405] Fix | Delete
$out .= $checkboxes;
[1406] Fix | Delete
}
[1407] Fix | Delete
[1408] Fix | Delete
return apply_filters('themify_search_settings_output', $out);
[1409] Fix | Delete
}
[1410] Fix | Delete
[1411] Fix | Delete
///////////////////////////////////////////
[1412] Fix | Delete
// 404 Page Settings Module
[1413] Fix | Delete
///////////////////////////////////////////
[1414] Fix | Delete
if( !function_exists( 'page_404_settings' ) ){
[1415] Fix | Delete
function page_404_settings(){
[1416] Fix | Delete
$data = themify_get_data();
[1417] Fix | Delete
$page_404 = themify_get( 'setting-page_404','',true );
[1418] Fix | Delete
$max = 100;
[1419] Fix | Delete
$args = array(
[1420] Fix | Delete
'sort_order' => 'asc',
[1421] Fix | Delete
'sort_column' => 'post_title',
[1422] Fix | Delete
'post_type' => 'page',
[1423] Fix | Delete
'ignore_sticky_posts'=>true,
[1424] Fix | Delete
'post_status' => 'publish',
[1425] Fix | Delete
'cache_results'=>false,
[1426] Fix | Delete
'update_post_term_cache'=>false,
[1427] Fix | Delete
'update_post_meta_cache'=>false,
[1428] Fix | Delete
'posts_per_page' => $max
[1429] Fix | Delete
);
[1430] Fix | Delete
$pages = new WP_Query( $args );
[1431] Fix | Delete
$front = get_option('page_on_front');
[1432] Fix | Delete
$out = '<p><span class="label">' . __( 'Custom 404 Page', 'themify' ) .themify_help(__('First create a new Page (eg. 404) and then select it here. The selected page will be used for error 404 (when a URL is not found on your site).', 'themify')). ' </span>';
[1433] Fix | Delete
if($pages->max_num_pages>1){
[1434] Fix | Delete
$post_name = '';
[1435] Fix | Delete
if($page_404){
[1436] Fix | Delete
$post_name = get_post($page_404);
[1437] Fix | Delete
if(!empty($post_name)){
[1438] Fix | Delete
$post_name = esc_attr($post_name->post_title);
[1439] Fix | Delete
}
[1440] Fix | Delete
}
[1441] Fix | Delete
$out .= '<span class="themify_404_autocomplete_wrap">';
[1442] Fix | Delete
$out .= '<input type="text" value="'.$post_name.'" id="themify_404_page_autocomplete" /><input type="hidden" name="setting-page_404" value="'.$page_404.'" />';
[1443] Fix | Delete
$out .= '</span>';
[1444] Fix | Delete
}
[1445] Fix | Delete
else{
[1446] Fix | Delete
$out.='<select name="setting-page_404">
[1447] Fix | Delete
<option value="0">'.esc_attr( __( 'Select page', 'themify' ) ).'</option>';
[1448] Fix | Delete
while ( $pages->have_posts() ) {
[1449] Fix | Delete
$pages->the_post();
[1450] Fix | Delete
$id = get_the_ID();
[1451] Fix | Delete
if($id!=$front){
[1452] Fix | Delete
$selected = '';
[1453] Fix | Delete
if ( $page_404 == $id ) {
[1454] Fix | Delete
$selected = 'selected="selected"';
[1455] Fix | Delete
}
[1456] Fix | Delete
$out .= '<option '.$selected.' value="' . $id . '">';
[1457] Fix | Delete
$out .= get_the_title();
[1458] Fix | Delete
$out .= '</option>';
[1459] Fix | Delete
}
[1460] Fix | Delete
}
[1461] Fix | Delete
$out .= '</select>';
[1462] Fix | Delete
}
[1463] Fix | Delete
wp_reset_postdata();
[1464] Fix | Delete
return $out;
[1465] Fix | Delete
}
[1466] Fix | Delete
}
[1467] Fix | Delete
[1468] Fix | Delete
///////////////////////////////////////////
[1469] Fix | Delete
// RSS Feed Settings Module
[1470] Fix | Delete
///////////////////////////////////////////
[1471] Fix | Delete
function themify_feed_settings( $data = array() ) {
[1472] Fix | Delete
$checked_use = '';
[1473] Fix | Delete
$feed_settings = themify_get( 'setting-feed_settings','',true );
[1474] Fix | Delete
$feed_custom_post = themify_get( 'setting-feed_custom_post','',true );
[1475] Fix | Delete
$custom_posts = array_diff( get_post_types( array('public' => true, 'publicly_queryable' => 'true' ) )
[1476] Fix | Delete
, array('attachment', 'tbuilder_layout', 'tbuilder_layout_part', 'section','tglobal_style') );
[1477] Fix | Delete
$custom_posts_options = '<option></option>';
[1478] Fix | Delete
[1479] Fix | Delete
if ( 'on' === themify_get( 'setting-exclude_img_rss','',true ) ) {
[1480] Fix | Delete
$checked_use = 'checked="checked"';
[1481] Fix | Delete
}
[1482] Fix | Delete
[1483] Fix | Delete
if( ! empty( $custom_posts ) ) {
[1484] Fix | Delete
array_unshift( $custom_posts, 'all' );
[1485] Fix | Delete
$feed_custom_post_arr = explode( ',', trim( $feed_custom_post ) );
[1486] Fix | Delete
[1487] Fix | Delete
foreach( $custom_posts as $c_post ) {
[1488] Fix | Delete
$custom_posts_options .= sprintf( '<option %s value="%s">%s</option>'
[1489] Fix | Delete
, in_array( $c_post, $feed_custom_post_arr ) ? 'selected="selected"' : ''
[1490] Fix | Delete
, $c_post
[1491] Fix | Delete
, ucfirst( preg_replace( "/[-_]/", ' ', $c_post ) ) );
[1492] Fix | Delete
}
[1493] Fix | Delete
}
[1494] Fix | Delete
[1495] Fix | Delete
return '<p><span class="label">' . __('Feed Category', 'themify') .themify_help(__('Use minus sign (-) to exclude categories. <br/> Example: (2,-9) = include only Category 2 in feeds and exclude Category 9.', 'themify')) . '</span> <input type="text" class="width6" name="setting-feed_settings" value="' . esc_attr( $feed_settings ) . '" /></p>
[1496] Fix | Delete
<p><span class="label">' . __('Post Image in RSS', 'themify') .themify_help(__('Check this to exclude post image in RSS feeds', 'themify')) . '</span> <label for="setting-exclude_img_rss"><input type="checkbox" id="setting-exclude_img_rss" name="setting-exclude_img_rss" '.$checked_use.'/> ' . __('Exclude featured image in RSS feeds', 'themify') . '</label></p>
[1497] Fix | Delete
<p><span class="label">' . __('Custom Posts in RSS', 'themify') .themify_help(__( 'Select "All" to add all available posts in your feed or select the specific ones.', 'themify')) . '</span>
[1498] Fix | Delete
<select size="6" multiple="multiple" class="width10 themify_multiselect">' . $custom_posts_options . '</select>
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function