Merhaba arkadaşlar ben bir temanın admin panelini kaldırmak istiyorum birkaç kod kaldırdım admin panel açılmıyor sunucuya ulaşılamadı gibi hata veriyor kodları geri eklediğimde düzeliyor o paneli kaldırmak istiyorum yardımcı olurmusunuz kodu ve admin panel görünüm şeklini paylaşıyorum sizinle teşekkürler..
NOT: Konu yanlız yerde değil diye düşünüyorum ama moderatör arkadaşlar yanlıs yerde iste doğru yere alırlarsa sevinirim.
Kod:
<?php
add_theme_support( 'menus' );
add_theme_support( 'post-thumbnails' );
add_image_size( 'boyut100x100', 100, 100, true );
add_image_size( 'boyut75x75', 75, 75, true );
register_sidebars(1, array('name'=>'Sidebar'));
register_nav_menus( array( 'ust_menu' => 'UstHeaderMenu', 'alt_menu' => 'AltFooterMenu', ) );
function mytheme_wp_get_attachment_image_attributes( $attr ) {
unset($attr['title']);
return $attr;
}
add_filter( 'wp_get_attachment_image_attributes', 'mytheme_wp_get_attachment_image_attributes' );
function my_init() {
if (!is_admin()) {
// comment out the next two lines to load the local copy of jQuery
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2');
wp_enqueue_script('jquery');
}
}
add_action('init', 'my_init');
function add_menu_admin_bar() {
global $wp_admin_bar;
if ( !is_super_admin() || !is_admin_bar_showing() )
return;
$wp_admin_bar->add_menu( array( 'id' => 'theme_options', 'title' =>__( 'Siteadı Tema Ayarları', '-haber' ), 'href' => admin_url('admin.php')."?page=TemaAyarlar" ) );
}
add_action( 'admin_bar_menu', 'add_menu_admin_bar' , 70);
// ###################### TEMA AYARLARI ######################
//get theme options
$options = get_option( 'theme_settings' );
//register settings
function theme_settings_init(){
register_setting( 'theme_settings', 'theme_settings' );
}
//add settings page to menu
function add_settings_page() {
add_menu_page( __( 'Siteadı Tema Ayarları' ), __( 'Siteadı Tema Ayarları' ), 'manage_options', 'TemaAyarlar', 'theme_settings_page');
}
//add actions
add_action( 'admin_init', 'theme_settings_init' );
add_action( 'admin_menu', 'add_settings_page' );
//define your variables
$color_scheme = array('default','blue','green',);
//start settings page
function theme_settings_page() {
if ( ! isset( $_REQUEST['updated'] ) )
$_REQUEST['updated'] = false;
//get variables outside scope
global $color_scheme;
?>
<div>
<div id="icon-options-general"></div>
<h2><?php _e( 'SinMusic Tema Ayarları' ) //your admin panel title ?></h2>
<style>
table tr, table td, table th{
text-align:left;
font-weight:normal;
}
.satir_renkli{
background: #f4f4f4;
padding:3px;
text-align:left;
}
.satir_renkli td , .satir_renkli th {
padding:3px;
}
.paragraf p{
margin-bottom:2px;
margin-top:2px;
line-height:18px;
color:#999999;
}
#icon-options-general{
height: 34px;
width: 36px;
float: left;
background: transparent url(./images/icons32.png?ver=20100531) no-repeat -432px -5px;
position:relative;
top:-10px;
margin-right:5px;
}
table textarea{
height:70px;
}
#ayarlarkaydedildi{
width:780px;
height:auto;
float:left;
background: #9ce287;
padding:10px;
margin-bottom:20px;
}
</style>
<table>
<tr>
<td>
</td></tr>
<tr>
<td>
</td></tr>
<tr>
<td>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/color/css/colorpicker.css" type="text/css" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/color/css/layout.css" />
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/color/js/jquery.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/color/js/colorpicker.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/color/js/eye.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/color/js/utils.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/color/js/layout.js?ver=1.0.2"></script>
<form method="post" action="options.php">
<?php settings_fields( 'theme_settings' ); ?>
<?php $options = get_option( 'theme_settings' ); ?>
<input id="colorpickerField1" type="text" size="36" name="theme_settings[renk]" class="renk" value="<?php esc_attr_e( $options['renk'] ); ?>" />
</td></tr>
<tr>
<td>
<input name="submit" id="submit" value="Ayarları Kaydet" type="submit" style="width:300px; height:30px; float:left; margin-top:10px; cursor:pointer">
</form>
</td></tr>
<tr>
<td>
. </td></tr>
<tr>
<td>
SinPor teması <a href="http://www.sinanisler.com/" target="_blank">Sinan İŞLER</a> tarafından yapılmıştır.
</td></tr>
</table>
</div><!-- END wrap -->
<?php
}
function yorumgetir( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<?php if ( $comment->comment_approved == '0' ) : ?>
<em class="comment-awaiting-moderation"><?php _e( 'Yorumunuz onay bekliyor...', 'twentyten' ); ?></em>
<?php endif; ?>
<div class="yorumbilgibar">
<div class="left"><?php printf( __( '%s ', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?></div>
<div class="right"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></div>
</div><!-- .comment-meta .commentmetadata -->
<div class="yorumparagraf"><?php comment_text(); ?></div>
<?php
break;
case 'pingback' :
case 'trackback' :
?>
<p> <?php comment_author_link(); ?> </p>
<?php
break;
endswitch;
}
?>admin panel ekran görüntüsü