Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.4.0
- * @ Author : DeZender
- * @ Release on : 30.03.2012
- * @ Official site : http://DeZender.Net
- *
- */
- function openhouse_init() {
- load_theme_textdomain( 'openhouse', get_template_directory( ) . '/lang' );
- }
- function new_meta_boxes_4() {
- global $post;
- global $new_meta_boxes;
- global $new_meta_boxes_2;
- global $new_meta_boxes_3;
- global $new_meta_boxes_4;
- foreach ($new_meta_boxes_4 as $meta_box) {
- echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
- echo '<h4>' . $meta_box['title'] . '</h4>';
- if ($meta_box['type'] == 'input') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
- } else {
- if ($meta_box['type'] == 'textarea') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- echo '<textarea name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" style="width:100%" cols="20" rows="7">' . $meta_box_value . '</textarea><br />';
- } else {
- if ($meta_box['type'] == 'select') {
- echo '<select name="' . $meta_box['name'] . '_value">';
- foreach ($meta_box['options'] as $option) {
- echo '<option';
- if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
- echo ' selected="selected"';
- } else {
- if ($option == $meta_box['std']) {
- echo ' selected="selected"';
- }
- }
- echo '>' . $option . '</option>';
- }
- echo '</select>';
- } else {
- if ($meta_box['type'] == 'info') {
- echo '<p>Add your slideshow image using the "Upload/Insert" button above the content textbox. Only one image per post.<br />Note: For this to show up in the slideshow, go to Theme Options -> Slideshow, and set the Slideshow Source to "Just Photos".</p>';
- }
- }
- }
- }
- echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
- }
- }
- function new_meta_boxes_3() {
- global $post;
- global $new_meta_boxes;
- global $new_meta_boxes_2;
- global $new_meta_boxes_3;
- foreach ($new_meta_boxes_3 as $meta_box) {
- echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
- echo '<h4>' . $meta_box['title'] . '</h4>';
- if ($meta_box['type'] == 'input') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
- } else {
- if ($meta_box['type'] == 'textarea') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- echo '<textarea name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" style="width:100%" cols="20" rows="7">' . $meta_box_value . '</textarea><br />';
- } else {
- if ($meta_box['type'] == 'select') {
- echo '<select name="' . $meta_box['name'] . '_value">';
- foreach ($meta_box['options'] as $option) {
- echo '<option';
- if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
- echo ' selected="selected"';
- } else {
- if ($option == $meta_box['std']) {
- echo ' selected="selected"';
- }
- }
- echo '>' . $option . '</option>';
- }
- echo '</select>';
- } else {
- if ($meta_box['type'] == 'info') {
- echo '<p>Add your property images using the "Upload/Insert" button above the content textbox.</p>';
- }
- }
- }
- }
- echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
- }
- }
- function new_meta_boxes() {
- global $post;
- global $new_meta_boxes;
- global $new_meta_boxes_2;
- foreach ($new_meta_boxes as $meta_box) {
- echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
- echo '<h4>' . $meta_box['title'] . '</h4>';
- if ($meta_box['type'] == 'input') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
- } else {
- if ($meta_box['type'] == 'textarea') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- echo '<textarea name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" style="width:100%" cols="20" rows="7">' . $meta_box_value . '</textarea><br />';
- } else {
- if ($meta_box['type'] == 'select') {
- echo '<select name="' . $meta_box['name'] . '_value">';
- foreach ($meta_box['options'] as $option) {
- echo '<option';
- if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
- echo ' selected="selected"';
- } else {
- if ($option == $meta_box['std']) {
- echo ' selected="selected"';
- }
- }
- echo '>' . $option . '</option>';
- }
- echo '</select>';
- }
- }
- }
- echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
- }
- }
- function new_meta_boxes_2() {
- global $post;
- global $new_meta_boxes;
- global $new_meta_boxes_2;
- foreach ($new_meta_boxes_2 as $meta_box) {
- echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
- echo '<h4>' . $meta_box['title'] . '</h4>';
- if ($meta_box['type'] == 'input') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
- } else {
- if ($meta_box['type'] == 'select') {
- echo '<select name="' . $meta_box['name'] . '_value">';
- foreach ($meta_box['options'] as $option) {
- echo '<option';
- if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
- echo ' selected="selected"';
- } else {
- if ($option == $meta_box['std']) {
- echo ' selected="selected"';
- }
- }
- echo '>' . $option . '</option>';
- }
- echo '</select>';
- }
- }
- echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
- }
- }
- function new_meta_boxes_6() {
- global $post;
- global $new_meta_boxes;
- global $new_meta_boxes_6;
- foreach ($new_meta_boxes_6 as $meta_box) {
- echo '<input type="hidden" name="' . $meta_box['name'] . '_noncename" id="' . $meta_box['name'] . '_noncename" value="' . wp_create_nonce( plugin_basename( __FILE__ ) ) . '" />';
- echo '<h4>' . $meta_box['title'] . '</h4>';
- if ($meta_box['type'] == 'input') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- $meta_box_value = str_replace( '"', '\'', $meta_box_value );
- echo '<input type="text" name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" size="55" /><br />';
- } else {
- if ($meta_box['type'] == 'textarea') {
- $meta_box_value = get_post_meta( $post->ID, $meta_box['name'] . '_value', true );
- if ($meta_box_value == '') {
- $meta_box_value = $meta_box['std'];
- }
- echo '<textarea name="' . $meta_box['name'] . '_value" value="' . $meta_box_value . '" style="width:100%" cols="20" rows="7">' . $meta_box_value . '</textarea><br />';
- } else {
- if ($meta_box['type'] == 'select') {
- echo '<select name="' . $meta_box['name'] . '_value">';
- foreach ($meta_box['options'] as $option) {
- echo '<option';
- if (get_post_meta( $post->ID, $meta_box['name'] . '_value', true ) == $option) {
- echo ' selected="selected"';
- } else {
- if ($option == $meta_box['std']) {
- echo ' selected="selected"';
- }
- }
- echo '>' . $option . '</option>';
- }
- echo '</select>';
- } else {
- if ($meta_box['type'] == 'info') {
- echo '<p>Add your property images using the "Upload/Insert" button above the content textbox.</p>';
- }
- }
- }
- }
- echo '<p><label for="' . $meta_box['name'] . '_value">' . $meta_box['description'] . '</label></p>';
- }
- }
- function create_meta_box() {
- global $theme_name;
- global $new_meta_boxes;
- global $new_meta_boxes_2;
- global $new_meta_boxes_3;
- global $new_meta_boxes_4;
- global $new_meta_boxes_5;
- global $new_meta_boxes_6;
- if (function_exists( 'add_meta_box' )) {
- add_meta_box( 'new-meta-boxes_3', __( 'Images and Video', 'openhouse' ), 'new_meta_boxes_3', 'listing', 'normal', 'high' );
- add_meta_box( 'new-meta-boxes', __( 'Location', 'openhouse' ), 'new_meta_boxes', 'listing', 'normal', 'high' );
- add_meta_box( 'new-meta-boxes_2', __( 'Property Information', 'openhouse' ), 'new_meta_boxes_2', 'listing', 'normal', 'high' );
- add_meta_box( 'new-meta-boxes_4', __( 'Slideshow Photo', 'openhouse' ), 'new_meta_boxes_4', 'photoslideshow', 'normal', 'high' );
- add_meta_box( 'new-meta-boxes_6', __( 'Agent Information', 'openhouse' ), 'new_meta_boxes_6', 'agent', 'normal', 'high' );
- }
- }
- .............................................
- ................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement