Changeset 3425739
- Timestamp:
- 12/23/2025 03:06:18 AM (2 months ago)
- Location:
- portfolio-pro-advance
- Files:
-
- 4 edited
-
tags/1.3.1/includes/class-portfolio-meta-display.php (modified) (3 diffs)
-
tags/1.3.1/includes/class-portfolio-pro-post-types.php (modified) (3 diffs)
-
trunk/includes/class-portfolio-meta-display.php (modified) (3 diffs)
-
trunk/includes/class-portfolio-pro-post-types.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
portfolio-pro-advance/tags/1.3.1/includes/class-portfolio-meta-display.php
r3425730 r3425739 18 18 } 19 19 20 /**21 * Append custom meta fields and project gallery to petruth_portfolio content.22 *23 * @param string $content Original post content.24 * @return string Modified content with meta and gallery appended.25 */26 20 public function append_petruth_meta_to_content($content) { 27 21 if ( … … 59 53 $meta_html .= '</div>'; 60 54 61 // === Pro Meta Fields (Unconditional)===55 // === Pro Meta Fields === 62 56 $pro_meta = ''; 63 57 64 $client = get_post_meta($post->ID, '_client', true); 65 $budget = get_post_meta($post->ID, '_budget', true); 66 $location = get_post_meta($post->ID, '_location', true); 67 $team = get_post_meta($post->ID, '_team', true); 68 $timeline = get_post_meta($post->ID, '_timeline', true); 69 $is_private = get_post_meta($post->ID, '_is_private', true); 58 $client = get_post_meta($post->ID, '_client', true); 59 $services = get_post_meta($post->ID, '_services', true); // Added 60 $project_year = get_post_meta($post->ID, '_project_year', true); // Added 61 $budget = get_post_meta($post->ID, '_budget', true); 62 $location = get_post_meta($post->ID, '_location', true); 63 $team = get_post_meta($post->ID, '_team', true); 64 $timeline = get_post_meta($post->ID, '_timeline', true); 65 $is_private = get_post_meta($post->ID, '_is_private', true); 70 66 71 67 $pro_meta .= '<div class="petruth-meta-pro-details">'; 72 68 if ($client) { 73 69 $pro_meta .= '<p><strong>' . esc_html__('Client:', 'portfolio-pro-advance') . '</strong> ' . esc_html($client) . '</p>'; 70 } 71 if ($services) { 72 $pro_meta .= '<p><strong>' . esc_html__('Services:', 'portfolio-pro-advance') . '</strong> ' . esc_html($services) . '</p>'; 73 } 74 if ($project_year) { 75 $pro_meta .= '<p><strong>' . esc_html__('Year:', 'portfolio-pro-advance') . '</strong> ' . esc_html($project_year) . '</p>'; 74 76 } 75 77 if ($budget) { … … 86 88 } 87 89 if ($is_private === '1') { 88 89 90 $pro_meta .= '<p><em>' . esc_html__('This portfolio is private.', 'portfolio-pro-advance') . '</em></p>'; 90 91 } -
portfolio-pro-advance/tags/1.3.1/includes/class-portfolio-pro-post-types.php
r3425730 r3425739 251 251 252 252 $client = get_post_meta($post->ID, '_client', true); 253 $services = get_post_meta($post->ID, '_services', true); // Added 254 $project_year = get_post_meta($post->ID, '_project_year', true); // Added 253 255 $budget = get_post_meta($post->ID, '_budget', true); 254 256 $location = get_post_meta($post->ID, '_location', true); … … 260 262 <p><label for="client"><?php esc_html_e('Client', 'portfolio-pro-advance'); ?></label> 261 263 <input type="text" id="client" name="client" value="<?php echo esc_attr($client); ?>" class="widefat"></p> 264 265 <p><label for="services"><?php esc_html_e('Services', 'portfolio-pro-advance'); ?></label> 266 <input type="text" id="services" name="services" value="<?php echo esc_attr($services); ?>" class="widefat"></p> 267 268 <p><label for="project_year"><?php esc_html_e('Project Year', 'portfolio-pro-advance'); ?></label> 269 <input type="text" id="project_year" name="project_year" value="<?php echo esc_attr($project_year); ?>" class="widefat"></p> 270 262 271 <p><label for="budget"><?php esc_html_e('Budget', 'portfolio-pro-advance'); ?></label> 263 272 <input type="text" id="budget" name="budget" value="<?php echo esc_attr($budget); ?>" class="widefat"></p> 273 264 274 <p><label for="location"><?php esc_html_e('Location', 'portfolio-pro-advance'); ?></label> 265 275 <input type="text" id="location" name="location" value="<?php echo esc_attr($location); ?>" class="widefat"></p> 276 266 277 <p><label for="team"><?php esc_html_e('Team', 'portfolio-pro-advance'); ?></label> 267 278 <input type="text" id="team" name="team" value="<?php echo esc_attr($team); ?>" class="widefat"></p> 279 268 280 <p><label for="timeline"><?php esc_html_e('Timeline', 'portfolio-pro-advance'); ?></label> 269 281 <input type="text" id="timeline" name="timeline" value="<?php echo esc_attr($timeline); ?>" class="widefat"></p> 282 270 283 <p><label> 271 284 <input type="checkbox" name="is_private" value="1" <?php checked($is_private, '1'); ?> /> … … 286 299 if (!current_user_can('edit_post', $post_id)) return; 287 300 288 foreach (['client', 'budget', 'location', 'team', 'timeline'] as $field) { 301 // Added services and project_year to the array below 302 foreach (['client', 'services', 'project_year', 'budget', 'location', 'team', 'timeline'] as $field) { 289 303 if (isset($_POST[$field])) { 290 304 update_post_meta($post_id, "_$field", sanitize_text_field(wp_unslash($_POST[$field]))); -
portfolio-pro-advance/trunk/includes/class-portfolio-meta-display.php
r3413540 r3425739 18 18 } 19 19 20 /**21 * Append custom meta fields and project gallery to petruth_portfolio content.22 *23 * @param string $content Original post content.24 * @return string Modified content with meta and gallery appended.25 */26 20 public function append_petruth_meta_to_content($content) { 27 21 if ( … … 59 53 $meta_html .= '</div>'; 60 54 61 // === Pro Meta Fields (Unconditional)===55 // === Pro Meta Fields === 62 56 $pro_meta = ''; 63 57 64 $client = get_post_meta($post->ID, '_client', true); 65 $budget = get_post_meta($post->ID, '_budget', true); 66 $location = get_post_meta($post->ID, '_location', true); 67 $team = get_post_meta($post->ID, '_team', true); 68 $timeline = get_post_meta($post->ID, '_timeline', true); 69 $is_private = get_post_meta($post->ID, '_is_private', true); 58 $client = get_post_meta($post->ID, '_client', true); 59 $services = get_post_meta($post->ID, '_services', true); // Added 60 $project_year = get_post_meta($post->ID, '_project_year', true); // Added 61 $budget = get_post_meta($post->ID, '_budget', true); 62 $location = get_post_meta($post->ID, '_location', true); 63 $team = get_post_meta($post->ID, '_team', true); 64 $timeline = get_post_meta($post->ID, '_timeline', true); 65 $is_private = get_post_meta($post->ID, '_is_private', true); 70 66 71 67 $pro_meta .= '<div class="petruth-meta-pro-details">'; 72 68 if ($client) { 73 69 $pro_meta .= '<p><strong>' . esc_html__('Client:', 'portfolio-pro-advance') . '</strong> ' . esc_html($client) . '</p>'; 70 } 71 if ($services) { 72 $pro_meta .= '<p><strong>' . esc_html__('Services:', 'portfolio-pro-advance') . '</strong> ' . esc_html($services) . '</p>'; 73 } 74 if ($project_year) { 75 $pro_meta .= '<p><strong>' . esc_html__('Year:', 'portfolio-pro-advance') . '</strong> ' . esc_html($project_year) . '</p>'; 74 76 } 75 77 if ($budget) { … … 86 88 } 87 89 if ($is_private === '1') { 88 89 90 $pro_meta .= '<p><em>' . esc_html__('This portfolio is private.', 'portfolio-pro-advance') . '</em></p>'; 90 91 } -
portfolio-pro-advance/trunk/includes/class-portfolio-pro-post-types.php
r3423645 r3425739 251 251 252 252 $client = get_post_meta($post->ID, '_client', true); 253 $services = get_post_meta($post->ID, '_services', true); // Added 254 $project_year = get_post_meta($post->ID, '_project_year', true); // Added 253 255 $budget = get_post_meta($post->ID, '_budget', true); 254 256 $location = get_post_meta($post->ID, '_location', true); … … 260 262 <p><label for="client"><?php esc_html_e('Client', 'portfolio-pro-advance'); ?></label> 261 263 <input type="text" id="client" name="client" value="<?php echo esc_attr($client); ?>" class="widefat"></p> 264 265 <p><label for="services"><?php esc_html_e('Services', 'portfolio-pro-advance'); ?></label> 266 <input type="text" id="services" name="services" value="<?php echo esc_attr($services); ?>" class="widefat"></p> 267 268 <p><label for="project_year"><?php esc_html_e('Project Year', 'portfolio-pro-advance'); ?></label> 269 <input type="text" id="project_year" name="project_year" value="<?php echo esc_attr($project_year); ?>" class="widefat"></p> 270 262 271 <p><label for="budget"><?php esc_html_e('Budget', 'portfolio-pro-advance'); ?></label> 263 272 <input type="text" id="budget" name="budget" value="<?php echo esc_attr($budget); ?>" class="widefat"></p> 273 264 274 <p><label for="location"><?php esc_html_e('Location', 'portfolio-pro-advance'); ?></label> 265 275 <input type="text" id="location" name="location" value="<?php echo esc_attr($location); ?>" class="widefat"></p> 276 266 277 <p><label for="team"><?php esc_html_e('Team', 'portfolio-pro-advance'); ?></label> 267 278 <input type="text" id="team" name="team" value="<?php echo esc_attr($team); ?>" class="widefat"></p> 279 268 280 <p><label for="timeline"><?php esc_html_e('Timeline', 'portfolio-pro-advance'); ?></label> 269 281 <input type="text" id="timeline" name="timeline" value="<?php echo esc_attr($timeline); ?>" class="widefat"></p> 282 270 283 <p><label> 271 284 <input type="checkbox" name="is_private" value="1" <?php checked($is_private, '1'); ?> /> … … 286 299 if (!current_user_can('edit_post', $post_id)) return; 287 300 288 foreach (['client', 'budget', 'location', 'team', 'timeline'] as $field) { 301 // Added services and project_year to the array below 302 foreach (['client', 'services', 'project_year', 'budget', 'location', 'team', 'timeline'] as $field) { 289 303 if (isset($_POST[$field])) { 290 304 update_post_meta($post_id, "_$field", sanitize_text_field(wp_unslash($_POST[$field])));
Note: See TracChangeset
for help on using the changeset viewer.