Moderatör tarafında düzenlendi:
|
Aktiflik
Seviye
Deneyim
Eline sağlık
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
@ScooteR hocam yapabilirse yapar
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
<?php
$wordpressapi_db_version = '1.0';
global $wpdb;
global $wordpressapi_db_version;
$table_name = $wpdb->prefix . 'eccetasarim_pure_lisans';
if ($wpdb->get_var('show tables like \'' . $table_name . '\'') != $table_name) {
$sql = 'CREATE TABLE ' . $table_name . ' (
id mediumint(9) NOT NULL AUTO_INCREMENT,
lisans tinytext NOT NULL,
UNIQUE KEY id (id)
);';
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
add_option('wordpressapi_db_version', $wordpressapi_db_version);
}
include(ABSPATH . '/wp-admin/includes/plugin.php');
function ecce_plugin()
{
if (is_plugin_active('wp-pagenavi/wp-pagenavi.php')) {
deactivate_plugins('wp-pagenavi/wp-pagenavi.php');
}
}
ecce_plugin();
require_once(TEMPLATEPATH . '/framework/ecce-menu-walker.php');
require_once(TEMPLATEPATH . '/framework/menu.php');
require_once(TEMPLATEPATH . '/framework/metabox/meta-box.php');
require_once('admin/index.php');
require_once(TEMPLATEPATH . '/framework/shortcodes.php');
require_once(TEMPLATEPATH . '/framework/theme.php');
require_once(TEMPLATEPATH . '/framework/include.php');
$theme = new Theme();
$theme->init(array(
'theme_name' => 'EccePure',
'theme_slug' => 'ECCE'
));
add_action('admin_print_styles', 'my_admin_css');
add_action('wp_enqueue_scripts', 'my_admin_css');
function my_admin_css()
{
if (is_admin()) {
wp_enqueue_style('media_upload', get_bloginfo('template_directory') . '/css/ecce-pure-font.css', false, false, 'all');
}
}
function new_excerpt_length($length)
{
return 25;
}
add_filter('excerpt_length', 'new_excerpt_length');
function new_excerpt_more($more)
{
return '...';
}
add_filter('excerpt_more', 'new_excerpt_more');
function excerpt($limit)
{
$excerpt = explode(' ', get_the_excerpt(), $limit);
if ($limit <= count($excerpt)) {
array_pop($excerpt);
$excerpt = implode(' ', $excerpt) . '...';
} else {
$excerpt = implode(' ', $excerpt);
}
$excerpt = preg_replace('`\[[^\]]*\]`', '', $excerpt);
return $excerpt;
}
if (function_exists('add_theme_support')) {
add_theme_support('post-thumbnails');
set_post_thumbnail_size(250, 175);
}
if (function_exists('add_image_size')) {
add_image_size('ana-resim', 580, 350, TRUE);
add_image_size('home-post', 250, 175, TRUE);
add_image_size('kare-resim', 200, 175, TRUE);
add_image_size('bilesen-resim', 60, 60, TRUE);
}
function ecce_widget_title($title)
{
if (empty($title)) {
return ' ';
}
$title = explode(' ', $title, 2);
$titleNew = '<div class="title_w"><div class="widget-baslik-ilk"><h3>' . $title[0] . '</h3></div><h3>' . $title[1] . '</h3></div>';
return $titleNew;
}
add_filter('widget_title', 'ecce_widget_title');
function ecce_sayfalama()
{
$showOnHome = 804;
$delimiter = '<i data-icon="D" class="icon"></i>';
$home = 'Anasayfa';
$showCurrent = 805;
$before = '<span class="current">';
$after = '</span>';
global $post;
$homeLink = get_bloginfo('url');
if ((is_category() || is_search())) {
$stil = ' style="border-bottom: none !important;"';
}
if ((is_home() || is_front_page())) {
if ($showOnHome == 1) {
echo '<div class="crumbs"><a href="' . $homeLink . '">' . $home . '</a></div>';
return null;
}
} else {
echo '<div class="crumbs"' . $stil . '><a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' ';
if (is_category()) {
$thisCat = get_category(get_query_var('cat'), false);
if ($thisCat->parent != 0) {
echo get_category_parents($thisCat->parent, TRUE, ' ' . $delimiter . ' ');
}
echo $before . single_cat_title('', false) . $after;
} else {
if (is_search()) {
echo $before . '"' . get_search_query() . '" için Bulunan Sonuçlar' . $after;
} else {
if (is_day()) {
echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' ';
echo $before . get_the_time('d') . $after;
} else {
if (is_month()) {
echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
echo $before . get_the_time('F') . $after;
} else {
if (is_year()) {
echo $before . get_the_time('Y') . $after;
} else {
if ((is_single() && !is_attachment())) {
if (get_post_type() != 'post') {
$post_type = get_post_type_object(get_post_type());
$slug = $post_type->rewrite;
echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a>';
if ($showCurrent == 1) {
echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
}
} else {
$cat = get_the_category();
$cat = $cat[0];
$cats = get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
if ($showCurrent == 0) {
$cats = preg_replace('#^(.+)\s' . $delimiter . '\s$#', '', $cats);
}
echo $cats;
if ($showCurrent == 1) {
echo $before . get_the_title() . $after;
}
}
} else {
if ((((!is_single() && !is_page()) && get_post_type() != 'post') && !is_404())) {
$post_type = get_post_type_object(get_post_type());
echo $before . $post_type->labels->singular_name . $after;
} else {
if (is_attachment()) {
$parent = get_post($post->post_parent);
$cat = get_the_category($parent->ID);
$cat = $cat[0];
echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a>';
if ($showCurrent == 1) {
echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
}
} else {
if ((is_page() && !$post->post_parent)) {
if ($showCurrent == 1) {
echo $before . get_the_title() . $after;
}
} else {
if ((is_page() && $post->post_parent)) {
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
$i = 804;
while ($i < count($breadcrumbs)) {
echo $breadcrumbs[$i];
if ($i != count($breadcrumbs) - 1) {
echo ' ' . $delimiter . ' ';
}
++$i;
}
if ($showCurrent == 1) {
echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
}
} else {
if (is_tag()) {
echo $before . 'Posts tagged "' . single_tag_title('', false) . '"' . $after;
} else {
if (is_author()) {
global $author;
$userdata = get_userdata($author);
echo $before . 'Articles posted by ' . $userdata->display_name . $after;
} else {
if (is_404()) {
echo $before . 'Error 404' . $after;
}
}
}
}
}
}
}
}
}
}
}
}
}
if (get_query_var('paged')) {
if (((((((is_category() || is_day()) || is_month()) || is_year()) || is_search()) || is_tag()) || is_author())) {
echo ' (';
}
echo __('Page') . ' ' . get_query_var('paged');
if (((((((is_category() || is_day()) || is_month()) || is_year()) || is_search()) || is_tag()) || is_author())) {
echo ')';
}
}
echo '</div>';
}
}
function add_contactmethods($contactmethods)
{
$contactmethods['facebook'] = 'Facebook';
$contactmethods['google'] = 'Google+';
$contactmethods['twitter'] = 'Twitter';
$contactmethods['linkedin'] = 'Linkedin';
$contactmethods['digg'] = 'Digg';
$contactmethods['evernote'] = 'Evernote';
$contactmethods['reddit'] = 'Reddit';
$contactmethods['tumblr'] = 'Tumblr';
return $contactmethods;
}
add_filter('user_contactmethods', 'add_contactmethods', 10, 1);
function profile_links($actions, $user_object)
{
$actions['facebook'] = '<a href="' . $user_object->facebook . '" target="_blank">FB</a>';
$actions['google'] = '<a href="' . $user_object->google . '" target="_blank">GG</a>';
$actions['twitter'] = '<a href="' . $user_object->twitter . '" target="_blank">TW</a>';
$actions['linkedin'] = '<a href="' . $user_object->linkedin . '" target="_blank">LK</a>';
$actions['digg'] = '<a href="' . $user_object->flickr . '" target="_blank">DG</a>';
$actions['evernote'] = '<a href="' . $user_object->flickr . '" target="_blank">EN</a>';
$actions['reddit'] = '<a href="' . $user_object->flickr . '" target="_blank">RD</a>';
$actions['tumblr'] = '<a href="' . $user_object->youtube . '" target="_blank">TB</a>';
return $actions;
}
add_filter('user_row_actions', 'profile_links', 10, 2);
add_action('edit_category_form_fields', 'extra_category_fields');
function extra_category_fields($tag)
{
$t_id = $tag->term_id;
$cat_meta = get_option('category_' . $t_id);
echo '
<tr class="form-field">
<th scope="row" valign="top"><label for="extra2">';
_e('Kategori İkonları');
echo '</label></th>
<td>
';
$output .= '<select style="font-family: ecce-pure !important;" class="of-input" name="Cat_meta[ikon]" id="Cat_meta[ikon]">';
$select_value = $cat_meta['ikon'];
$value = array(
'h',
'i',
'j',
'l',
'm',
'n',
'o',
'p',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'I',
'J',
'K',
'R',
'T',
'U',
'V',
'Y',
'Z',
'0',
'1',
'2',
'3',
'4',
'5',
'a',
'b',
'c',
'6',
'7',
'r',
'N',
'«',
'¬',
'®',
'¯',
'¼',
'½',
'¾',
'¿',
'Ê',
'Í',
'Ï',
'Ú',
'Û',
'Ü',
'Ý',
'ê',
'ì',
'ï',
'î',
'Á',
'Â',
'Ã',
'Ä',
'Å',
'd',
'e',
'f',
'g',
'q',
'H',
'k',
'L',
'M',
'O',
'P',
'Q',
'S'
);
foreach ($value as $option) {
$selected = '';
if ($select_value != '') {
if ($select_value == $option) {
$selected = ' selected="selected"';
}
} else {
if (isset($cat_meta['ikon'])) {
if ($cat_meta['ikon'] == $option) {
$selected = ' selected="selected"';
}
}
}
$output .= '<option' . $selected . '>';
$output .= $option[0];
$output .= '</option>';
}
$output .= '</select>';
echo $output;
echo '
';
echo '<s';
echo 'pan class="description">';
_e('Kategori ikonu seçiniz.');
echo '</span>
</td>
</tr>
';
echo '<s';
echo 'cript type="text/javascript"> jQuery(document).ready(function($){
jQuery(\'.of-color\').css(\'width\', \'20%\');
jQuery(\'.of-color\').css(\'backgroundColor\', \'';
echo $cat_meta['catBG'];
echo '\');
jQuery(\'.of-color\').ColorPicker({
color: \'';
echo $cat_meta['catBG'];
echo '\',
onShow: function (colpkr) {
jQuery(colpkr).fadeIn(500);
return false;
},
onHide: function (colpkr) {
jQuery(colpkr).fadeOut(500);
return false;
},
onChange: function (hsb, hex, rgb) {
//jQuery(this).css(\'border\',\'1px solid red\');
jQuery(\'.of-color\').css(\'backgroundColor\', \'#\' + hex);
jQuery(\'.';
echo 'of-color\').attr(\'value\',\'#\' + hex);
}
});
});
</script>
<tr class="form-field">
<th scope="row" valign="top"><label for="meta-color">';
_e('Kategori Arkaplan Rengi');
echo '</label></th>
<td>
<input type="text" name="Cat_meta[catBG]" class="of-color" size="6" maxlength="6" value="';
echo $cat_meta['catBG'];
echo '" />
<br />
';
echo '<s';
echo 'pan class="description">';
_e('');
echo '</span>
<br />
</td>
</tr>
';
}
add_action('edited_category', 'save_extra_category_fileds');
function save_extra_category_fileds($term_id)
{
if (isset($_POST['Cat_meta'])) {
$t_id = $term_id;
$cat_meta = get_option('category_' . $t_id);
$cat_keys = array_keys($_POST['Cat_meta']);
foreach ($cat_keys as $key) {
if (isset($_POST['Cat_meta'][$key])) {
$cat_meta[$key] = $_POST['Cat_meta'][$key];
continue;
}
}
update_option('category_' . $t_id, $cat_meta);
}
}
return 1;
exit();
?>
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
yanlız kurdum ama kırılmış fonksiyonda kurdum acılmadı kırılmamış atınca acılıyor e tabiki lisans olayı cıkıyor kuran varsa şayet bilgi vere bilirmi nerde işlem ve hata yapıyoruz acabaKırılmış Fonksiyon dosyası
Kod:<?php $wordpressapi_db_version = '1.0'; global $wpdb; global $wordpressapi_db_version; $table_name = $wpdb->prefix . 'eccetasarim_pure_lisans'; if ($wpdb->get_var('show tables like \'' . $table_name . '\'') != $table_name) { $sql = 'CREATE TABLE ' . $table_name . ' ( id mediumint(9) NOT NULL AUTO_INCREMENT, lisans tinytext NOT NULL, UNIQUE KEY id (id) );'; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); add_option('wordpressapi_db_version', $wordpressapi_db_version); } include(ABSPATH . '/wp-admin/includes/plugin.php'); function ecce_plugin() { if (is_plugin_active('wp-pagenavi/wp-pagenavi.php')) { deactivate_plugins('wp-pagenavi/wp-pagenavi.php'); } } ecce_plugin(); require_once(TEMPLATEPATH . '/framework/ecce-menu-walker.php'); require_once(TEMPLATEPATH . '/framework/menu.php'); require_once(TEMPLATEPATH . '/framework/metabox/meta-box.php'); require_once('admin/index.php'); require_once(TEMPLATEPATH . '/framework/shortcodes.php'); require_once(TEMPLATEPATH . '/framework/theme.php'); require_once(TEMPLATEPATH . '/framework/include.php'); $theme = new Theme(); $theme->init(array( 'theme_name' => 'EccePure', 'theme_slug' => 'ECCE' )); add_action('admin_print_styles', 'my_admin_css'); add_action('wp_enqueue_scripts', 'my_admin_css'); function my_admin_css() { if (is_admin()) { wp_enqueue_style('media_upload', get_bloginfo('template_directory') . '/css/ecce-pure-font.css', false, false, 'all'); } } function new_excerpt_length($length) { return 25; } add_filter('excerpt_length', 'new_excerpt_length'); function new_excerpt_more($more) { return '...'; } add_filter('excerpt_more', 'new_excerpt_more'); function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if ($limit <= count($excerpt)) { array_pop($excerpt); $excerpt = implode(' ', $excerpt) . '...'; } else { $excerpt = implode(' ', $excerpt); } $excerpt = preg_replace('`\[[^\]]*\]`', '', $excerpt); return $excerpt; } if (function_exists('add_theme_support')) { add_theme_support('post-thumbnails'); set_post_thumbnail_size(250, 175); } if (function_exists('add_image_size')) { add_image_size('ana-resim', 580, 350, TRUE); add_image_size('home-post', 250, 175, TRUE); add_image_size('kare-resim', 200, 175, TRUE); add_image_size('bilesen-resim', 60, 60, TRUE); } function ecce_widget_title($title) { if (empty($title)) { return ' '; } $title = explode(' ', $title, 2); $titleNew = '<div class="title_w"><div class="widget-baslik-ilk"><h3>' . $title[0] . '</h3></div><h3>' . $title[1] . '</h3></div>'; return $titleNew; } add_filter('widget_title', 'ecce_widget_title'); function ecce_sayfalama() { $showOnHome = 804; $delimiter = '<i data-icon="D" class="icon"></i>'; $home = 'Anasayfa'; $showCurrent = 805; $before = '<span class="current">'; $after = '</span>'; global $post; $homeLink = get_bloginfo('url'); if ((is_category() || is_search())) { $stil = ' style="border-bottom: none !important;"'; } if ((is_home() || is_front_page())) { if ($showOnHome == 1) { echo '<div class="crumbs"><a href="' . $homeLink . '">' . $home . '</a></div>'; return null; } } else { echo '<div class="crumbs"' . $stil . '><a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' '; if (is_category()) { $thisCat = get_category(get_query_var('cat'), false); if ($thisCat->parent != 0) { echo get_category_parents($thisCat->parent, TRUE, ' ' . $delimiter . ' '); } echo $before . single_cat_title('', false) . $after; } else { if (is_search()) { echo $before . '"' . get_search_query() . '" için Bulunan Sonuçlar' . $after; } else { if (is_day()) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' '; echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' '; echo $before . get_the_time('d') . $after; } else { if (is_month()) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' '; echo $before . get_the_time('F') . $after; } else { if (is_year()) { echo $before . get_the_time('Y') . $after; } else { if ((is_single() && !is_attachment())) { if (get_post_type() != 'post') { $post_type = get_post_type_object(get_post_type()); $slug = $post_type->rewrite; echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a>'; if ($showCurrent == 1) { echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after; } } else { $cat = get_the_category(); $cat = $cat[0]; $cats = get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); if ($showCurrent == 0) { $cats = preg_replace('#^(.+)\s' . $delimiter . '\s$#', '', $cats); } echo $cats; if ($showCurrent == 1) { echo $before . get_the_title() . $after; } } } else { if ((((!is_single() && !is_page()) && get_post_type() != 'post') && !is_404())) { $post_type = get_post_type_object(get_post_type()); echo $before . $post_type->labels->singular_name . $after; } else { if (is_attachment()) { $parent = get_post($post->post_parent); $cat = get_the_category($parent->ID); $cat = $cat[0]; echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a>'; if ($showCurrent == 1) { echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after; } } else { if ((is_page() && !$post->post_parent)) { if ($showCurrent == 1) { echo $before . get_the_title() . $after; } } else { if ((is_page() && $post->post_parent)) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>'; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); $i = 804; while ($i < count($breadcrumbs)) { echo $breadcrumbs[$i]; if ($i != count($breadcrumbs) - 1) { echo ' ' . $delimiter . ' '; } ++$i; } if ($showCurrent == 1) { echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after; } } else { if (is_tag()) { echo $before . 'Posts tagged "' . single_tag_title('', false) . '"' . $after; } else { if (is_author()) { global $author; $userdata = get_userdata($author); echo $before . 'Articles posted by ' . $userdata->display_name . $after; } else { if (is_404()) { echo $before . 'Error 404' . $after; } } } } } } } } } } } } } if (get_query_var('paged')) { if (((((((is_category() || is_day()) || is_month()) || is_year()) || is_search()) || is_tag()) || is_author())) { echo ' ('; } echo __('Page') . ' ' . get_query_var('paged'); if (((((((is_category() || is_day()) || is_month()) || is_year()) || is_search()) || is_tag()) || is_author())) { echo ')'; } } echo '</div>'; } } function add_contactmethods($contactmethods) { $contactmethods['facebook'] = 'Facebook'; $contactmethods['google'] = 'Google+'; $contactmethods['twitter'] = 'Twitter'; $contactmethods['linkedin'] = 'Linkedin'; $contactmethods['digg'] = 'Digg'; $contactmethods['evernote'] = 'Evernote'; $contactmethods['reddit'] = 'Reddit'; $contactmethods['tumblr'] = 'Tumblr'; return $contactmethods; } add_filter('user_contactmethods', 'add_contactmethods', 10, 1); function profile_links($actions, $user_object) { $actions['facebook'] = '<a href="' . $user_object->facebook . '" target="_blank">FB</a>'; $actions['google'] = '<a href="' . $user_object->google . '" target="_blank">GG</a>'; $actions['twitter'] = '<a href="' . $user_object->twitter . '" target="_blank">TW</a>'; $actions['linkedin'] = '<a href="' . $user_object->linkedin . '" target="_blank">LK</a>'; $actions['digg'] = '<a href="' . $user_object->flickr . '" target="_blank">DG</a>'; $actions['evernote'] = '<a href="' . $user_object->flickr . '" target="_blank">EN</a>'; $actions['reddit'] = '<a href="' . $user_object->flickr . '" target="_blank">RD</a>'; $actions['tumblr'] = '<a href="' . $user_object->youtube . '" target="_blank">TB</a>'; return $actions; } add_filter('user_row_actions', 'profile_links', 10, 2); add_action('edit_category_form_fields', 'extra_category_fields'); function extra_category_fields($tag) { $t_id = $tag->term_id; $cat_meta = get_option('category_' . $t_id); echo ' <tr class="form-field"> <th scope="row" valign="top"><label for="extra2">'; _e('Kategori İkonları'); echo '</label></th> <td> '; $output .= '<select style="font-family: ecce-pure !important;" class="of-input" name="Cat_meta[ikon]" id="Cat_meta[ikon]">'; $select_value = $cat_meta['ikon']; $value = array( 'h', 'i', 'j', 'l', 'm', 'n', 'o', 'p', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'I', 'J', 'K', 'R', 'T', 'U', 'V', 'Y', 'Z', '0', '1', '2', '3', '4', '5', 'a', 'b', 'c', '6', '7', 'r', 'N', '«', '¬', '®', '¯', '¼', '½', '¾', '¿', 'Ê', 'Í', 'Ï', 'Ú', 'Û', 'Ü', 'Ý', 'ê', 'ì', 'ï', 'î', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'd', 'e', 'f', 'g', 'q', 'H', 'k', 'L', 'M', 'O', 'P', 'Q', 'S' ); foreach ($value as $option) { $selected = ''; if ($select_value != '') { if ($select_value == $option) { $selected = ' selected="selected"'; } } else { if (isset($cat_meta['ikon'])) { if ($cat_meta['ikon'] == $option) { $selected = ' selected="selected"'; } } } $output .= '<option' . $selected . '>'; $output .= $option[0]; $output .= '</option>'; } $output .= '</select>'; echo $output; echo ' '; echo '<s'; echo 'pan class="description">'; _e('Kategori ikonu seçiniz.'); echo '</span> </td> </tr> '; echo '<s'; echo 'cript type="text/javascript"> jQuery(document).ready(function($){ jQuery(\'.of-color\').css(\'width\', \'20%\'); jQuery(\'.of-color\').css(\'backgroundColor\', \''; echo $cat_meta['catBG']; echo '\'); jQuery(\'.of-color\').ColorPicker({ color: \''; echo $cat_meta['catBG']; echo '\', onShow: function (colpkr) { jQuery(colpkr).fadeIn(500); return false; }, onHide: function (colpkr) { jQuery(colpkr).fadeOut(500); return false; }, onChange: function (hsb, hex, rgb) { //jQuery(this).css(\'border\',\'1px solid red\'); jQuery(\'.of-color\').css(\'backgroundColor\', \'#\' + hex); jQuery(\'.'; echo 'of-color\').attr(\'value\',\'#\' + hex); } }); }); </script> <tr class="form-field"> <th scope="row" valign="top"><label for="meta-color">'; _e('Kategori Arkaplan Rengi'); echo '</label></th> <td> <input type="text" name="Cat_meta[catBG]" class="of-color" size="6" maxlength="6" value="'; echo $cat_meta['catBG']; echo '" /> <br /> '; echo '<s'; echo 'pan class="description">'; _e(''); echo '</span> <br /> </td> </tr> '; } add_action('edited_category', 'save_extra_category_fileds'); function save_extra_category_fileds($term_id) { if (isset($_POST['Cat_meta'])) { $t_id = $term_id; $cat_meta = get_option('category_' . $t_id); $cat_keys = array_keys($_POST['Cat_meta']); foreach ($cat_keys as $key) { if (isset($_POST['Cat_meta'][$key])) { $cat_meta[$key] = $_POST['Cat_meta'][$key]; continue; } } update_option('category_' . $t_id, $cat_meta); } } return 1; exit(); ?>
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim