• 02-07-2015, 18:22:36
    #1
    Selam taslakları toplu şekilde açmak için bu php dosyasını yaptım ama çalışmıyor sorun nerde sizce

    <?php
    include('wp-config.php');
    $sonuc=mysql_query("UPDATE wp_posts set post_status='publish' where post_status='draft'");
    echo($sonuc);
    ?>
  • 03-07-2015, 01:17:13
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    @izayin; aşağıdaki betiği deneyebilir misiniz?

    <?php
    
    	require('wp-load.php');
    
    	function c_get_posts($args)
    	{
    		return get_posts($args);
    	}
    
    	function c_update_post($id, $status)
    	{
    		$post = get_post($id, 'ARRAY_A');
    
    		$post['post_status'] = $status;
    
    		wp_update_post($post);
    	}
    
    	$c_posts = c_get_posts(
    		array(
    			'post_status' => 'draft',
    			'post_type' => 'post'
    		)
    	);
    
    	foreach ($c_posts as $c_post)
    	{
    		c_update_post($c_post->ID, 'publish');
    	}
  • 03-07-2015, 01:25:39
    #3
    taslakları toplu şekilde açmak derken? biraz daha detay verirseniz yardımım dokunur belki.
    ne yapmak istiyorsunuz yani