Skip to content

Commit

Permalink
removed some deprecated functions/files
Browse files Browse the repository at this point in the history
  • Loading branch information
stiofan committed Apr 6, 2018
1 parent 5f94903 commit a2dacd9
Show file tree
Hide file tree
Showing 27 changed files with 153 additions and 2,908 deletions.
2 changes: 1 addition & 1 deletion assets/css/admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/css/gd_core_frontend.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/gd_core_frontend.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/map.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/map.css.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions assets/css/map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@
width: 100%;
}

.geodir-bubble_image{
max-height: 168px;
.geodir-images{
img{
max-width: 100% !important;
}
}
}

.geodir-bubble-meta-side {
display: inline-block;
vertical-align: top;
Expand Down
9 changes: 9 additions & 0 deletions assets/css/partials/_add-listing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,13 @@
}
.gd-term-handle .gd-term-checked.gd-default-term .gd-make-default-term {
display: none !important;
}

#geodir_post_images{
.inside{
img{
max-width: 100%;
height: auto;
}
}
}
2 changes: 1 addition & 1 deletion assets/css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/style.css.map

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions geodirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ private function includes() {
require_once( GEODIRECTORY_PLUGIN_DIR . 'includes/custom-fields/output-filter-functions.php' );
require_once( GEODIRECTORY_PLUGIN_DIR . 'includes/custom-fields/functions.php' );
require_once( GEODIRECTORY_PLUGIN_DIR . 'includes/comments-functions.php' );
require_once( GEODIRECTORY_PLUGIN_DIR . 'includes/geodir-content-listing-functions.php' );
GeoDir_Comments::init();
require_once( GEODIRECTORY_PLUGIN_DIR . 'includes/location_functions.php' );
require_once( GEODIRECTORY_PLUGIN_DIR . 'includes/geodir-shortcode-functions.php' );
Expand Down Expand Up @@ -528,5 +527,4 @@ function GeoDir() {
function xzxzxxz(){
//echo '###';
}
add_filter( 'widget_text', 'do_shortcode' ); //@todo remove me


4 changes: 2 additions & 2 deletions includes/admin/class-geodir-admin-post-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ public static function attachment_settings() {

wp_nonce_field( plugin_basename( __FILE__ ), 'geodir_post_attachments_noncename' );

if ( geodir_get_featured_image( $post_id, 'thumbnail' ) ) {
if ( $featured_image = get_the_post_thumbnail( $post_id, 'medium' ) ) {
echo '<h4>' . __( 'Featured Image', 'geodirectory' ) . '</h4>';
geodir_show_featured_image( $post_id, 'thumbnail' );
echo $featured_image;
}

$image_limit = 0;
Expand Down
2 changes: 1 addition & 1 deletion includes/api/class-geodir-rest-posts-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2534,7 +2534,7 @@ public function get_taxonomy_terms( $post, $taxonomy ) {
}

public function get_featured_image( $post ) {
$image = geodir_get_featured_image( $post->ID, 'thumbnail' );
$image = GeoDir_Media::get_post_images($post->ID,1); //@todo kiran i changed, this please check it over, might need tweaking

$featured_image = array();
if ( ! empty( $image ) ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/custom-fields/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ function geodir_save_post_file_fields( $post_id = 0, $field_id = '', $post_image
geodir_save_post_meta( $post_id, $field_id, $file_urls );

if ( !empty( $invalid_files ) ) {
geodir_remove_attachments( $invalid_files );
//geodir_remove_attachments( $invalid_files );// @todo remove the file if fails
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion includes/custom-fields/output-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ function geodir_cf_file($html,$location,$cf,$p=''){
if (in_array($uploaded_file_type, $image_file_types)) {
$file_paths .= '<div class="geodir-custom-post-gallery" class="clearfix">';
$file_paths .= '<a href="'.$file.'">';
$file_paths .= geodir_show_image(array('src' => $file), 'thumbnail', false, false);
$file_paths .= '';//@todo this function needs replaced ::::::: geodir_show_image(array('src' => $file), 'thumbnail', false, false);
$file_paths .= '</a>';
//$file_paths .= '<img src="'.$file.'" />';
$file_paths .= '</div>';
Expand Down
58 changes: 1 addition & 57 deletions includes/custom_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1077,63 +1077,7 @@ function geodir_show_detail_page_tabs() {
$map_args['map_class_name'] = 'geodir-map-detail-page';
$map_args['maptype'] = ( ! empty( $post->post_mapview ) ) ? $post->post_mapview : 'ROADMAP';
$map_args['posts'] = $post->ID;
} else if ( geodir_is_page( 'preview' ) ) {
$video = isset( $post->geodir_video ) ? $post->geodir_video : '';
$special_offers = isset( $post->geodir_special_offers ) ? $post->geodir_special_offers : '';

if ( isset( $post->post_images ) ) {
$post->post_images = trim( $post->post_images, "," );
}

if ( isset( $post->post_images ) && ! empty( $post->post_images ) ) {
$post_images = explode( ",", $post->post_images );
}

$thumb_image = '';
if ( ! empty( $post_images ) ) {
foreach ( $post_images as $image ) {
if ( $image != '' ) {
$thumb_image .= '<a href="' . $image . '">';
$thumb_image .= geodir_show_image( array( 'src' => $image ), 'thumbnail', true, false );
$thumb_image .= '</a>';
}
}
}

global $map_jason;
$marker_json = $post->marker_json != '' ? json_decode( $post->marker_json, true ) : array();
$marker_icon = ( ! empty( $marker_json ) && ! empty( $marker_json['i'] ) ) ? $marker_json['i'] : '';
$icon_size = geodir_get_marker_size( $marker_icon );
$marker_json['w'] = $icon_size['w'];
$marker_json['h'] = $icon_size['h'];
$map_jason[] = json_encode( $marker_json );

$address_latitude = isset( $post->post_latitude ) ? $post->post_latitude : '';
$address_longitude = isset( $post->post_longitude ) ? $post->post_longitude : '';
$mapview = isset( $post->post_mapview ) ? $post->post_mapview : '';
$mapzoom = isset( $post->post_mapzoom ) ? $post->post_mapzoom : '';
if ( ! $mapzoom ) {
$mapzoom = 12;
}

$map_args['map_canvas'] = 'preview_map_canvas';
$map_args['width'] = '950';
$map_args['height'] = '300';
$map_args['child_collapse'] = '0';
$map_args['maptype'] = $mapview;
$map_args['autozoom'] = false;
$map_args['zoom'] = "$mapzoom";
$map_args['latitude'] = $address_latitude;
$map_args['longitude'] = $address_longitude;
$map_args['enable_cat_filters'] = false;
$map_args['enable_text_search'] = false;
$map_args['post_type_filter'] = false;
$map_args['location_filter'] = false;
$map_args['jason_on_load'] = false;
$map_args['enable_map_direction'] = true;
$map_args['map_class_name'] = 'geodir-map-preview-page';
$map_args['posts'] = $post->ID;
}
}

$arr_detail_page_tabs = geodir_detail_page_tabs_list();// get this sooner so we can get the active tab for the user

Expand Down
32 changes: 32 additions & 0 deletions includes/deprecated-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,36 @@
*/
function geodir_breadcrumb(){
_deprecated_function( 'geodir_breadcrumb', '2.0.0' );
}

/**
* Get the post featured image.
* @deprecated
*/
function geodir_get_featured_image(){
_deprecated_function( 'geodir_get_featured_image', '2.0.0' );
}

/**
* Output the post featured image.
* @deprecated
*/
function geodir_show_featured_image(){
_deprecated_function( 'geodir_show_featured_image', '2.0.0' );
}

/**
* Output the post images.
* @deprecated
*/
function geodir_show_image(){
_deprecated_function( 'geodir_show_image', '2.0.0' );
}

/**
* The old way to save post images.
* @deprecated
*/
function geodir_save_post_images(){
_deprecated_function( 'geodir_save_post_images', '2.0.0' );
}
Loading

0 comments on commit a2dacd9

Please sign in to comment.