Changeset 2717282
- Timestamp:
- 05/02/2022 08:32:51 PM (4 years ago)
- Location:
- bw-portfolio
- Files:
-
- 5 edited
- 7 copied
-
tags/1.2.3 (copied) (copied from bw-portfolio/trunk)
-
tags/1.2.3/assets/css/bw-portfolio-style.css (copied) (copied from bw-portfolio/trunk/assets/css/bw-portfolio-style.css) (11 diffs)
-
tags/1.2.3/assets/js/bw-portfolio-script.js (copied) (copied from bw-portfolio/trunk/assets/js/bw-portfolio-script.js) (2 diffs)
-
tags/1.2.3/bw-portfolio.php (copied) (copied from bw-portfolio/trunk/bw-portfolio.php) (3 diffs)
-
tags/1.2.3/inc/portfolio-loop.php (copied) (copied from bw-portfolio/trunk/inc/portfolio-loop.php) (7 diffs)
-
tags/1.2.3/inc/portfolio-query.php (copied) (copied from bw-portfolio/trunk/inc/portfolio-query.php)
-
tags/1.2.3/readme.txt (copied) (copied from bw-portfolio/trunk/readme.txt) (2 diffs)
-
trunk/assets/css/bw-portfolio-style.css (modified) (11 diffs)
-
trunk/assets/js/bw-portfolio-script.js (modified) (2 diffs)
-
trunk/bw-portfolio.php (modified) (3 diffs)
-
trunk/inc/portfolio-loop.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bw-portfolio/tags/1.2.3/assets/css/bw-portfolio-style.css
r2715217 r2717282 7 7 } 8 8 9 .bw_portfolio_header form {9 .bw_portfolio_header form .portfolio_filter_sort_inputs { 10 10 display: flex; 11 flex-wrap: wrap; 11 12 padding: 0 0 1rem; 12 13 } … … 30 31 color: #111; 31 32 } 32 .bw_portfolio_header .portfolio_sort::before { 33 content: "|"; 34 margin: 0 4px; 33 .bwbh_separator { 35 34 color: #444; 36 } 37 35 margin: 0 5px; 36 } 37 38 /* where portfolio item cards get loaded for viewing */ 38 39 .bw_portfolio_content_area { 39 40 display: grid; … … 101 102 } 102 103 103 .bw_portfolio_item_image {104 .bw_portfolio_item_image, .bw_portfolio_item_full_image { 104 105 width: 100%; 105 106 object-fit: contain; … … 137 138 * Styling for modal pop up of full portfolio item view 138 139 */ 139 .bw_portfolio_overlay {140 display: none;141 position: fixed;142 top: 0;143 left: 0;144 align-items: center;145 justify-content: center;146 }147 148 140 .bw_portfolio_modal { 149 141 display: none; … … 151 143 top: 0; 152 144 left: 0; 145 margin: 0; 146 padding: 0; 153 147 align-items: center; 154 148 justify-content: center; … … 171 165 .bw_portfolio_modal_close { 172 166 position: relative; 173 top: -15px;174 right: -25px;167 top: ; 168 right: ; 175 169 padding: 0; 176 170 margin: 0; … … 186 180 flex-direction: column; 187 181 margin: 0 auto; 188 padding: 2 em;182 padding: 2%; 189 183 border-radius: 5px; 190 184 border: 1px solid #ccc; 191 185 background: #fff; 186 color: #222; 192 187 font-size: 1em; 193 188 width: 94%; … … 209 204 @media only screen and (max-width: 600px) { 210 205 .bw_portfolio_item_full { 211 width: 98%; 206 width: 92%; 207 padding: 3%; 212 208 } 213 209 } … … 217 213 .bw_portfolio_item_full { 218 214 width: 96%; 215 padding: 1%; 219 216 } 220 217 } … … 230 227 .bw_portfolio_item_full { 231 228 width: 92%; 229 padding: 3%; 232 230 } 233 231 } … … 237 235 .bw_portfolio_item_full { 238 236 width: 75%; 239 } 240 } 237 padding: 2em; 238 } 239 } -
bw-portfolio/tags/1.2.3/assets/js/bw-portfolio-script.js
r2715217 r2717282 207 207 .then( response => response.json() ) 208 208 .then( data => { 209 210 console.log(data); 211 209 212 210 bwbh_loader_gif.remove(); 213 211 … … 232 230 const bwbh_portfolio_heading = document.createElement('h3'); 233 231 bwbh_portfolio_heading.setAttribute('class', 'bw_portfolio_item_title'); 234 bwbh_portfolio_heading. innerHTML= data.portfolio_items[bwbh_key].title;232 bwbh_portfolio_heading.textContent = data.portfolio_items[bwbh_key].title; 235 233 bwbh_portfolio_text.appendChild(bwbh_portfolio_heading); 236 234 -
bw-portfolio/tags/1.2.3/bw-portfolio.php
r2715217 r2717282 3 3 * Plugin Name: BW Portfolio 4 4 * Description: The BW Portfolio plugin is powerful yet lightweight and fast. It allows you to easily add portfolio items in your WordPress Dashboard, and organize them with portfolio tags as well. Then by using a handy shortcode you can display your portfolio items just about anywhere in a nice, responsive css grid that is compatible on many different devices. Also has tag filtering and sorting of portfolio items built in. 5 * Version: 1.2. 25 * Version: 1.2.3 6 6 * Requires at least: 5.2 7 7 * Requires PHP: 7.0 … … 81 81 // store the needed post data to send back in rest response 82 82 $bw_response_data = [ 83 'title' => esc_html__($bw_post->post_title),83 'title' => html_entity_decode($bw_post->post_title), 84 84 'content' => apply_filters('the_content', $bw_post->post_content ), 85 85 ]; … … 149 149 $bw_response_data['portfolio_items'][$n] = [ 150 150 'bw_portfolio_id' => get_the_ID(), 151 'title' => get_the_title(),151 'title' => html_entity_decode(get_the_title()), 152 152 'content' => wp_kses_post( bwbh_limit_words( strip_tags( get_the_content() ), $bwbh_num_of_words ) ) . '...', 153 153 ]; -
bw-portfolio/tags/1.2.3/inc/portfolio-loop.php
r2715217 r2717282 8 8 $bw_portfolio_id = uniqid(); 9 9 10 $portfolio_output .= "<section id='bw_portfolio_" . $bw_portfolio_id . "' class='bw_portfolio_container alignwide'> \n";10 $portfolio_output .= "<section id='bw_portfolio_" . $bw_portfolio_id . "' class='bw_portfolio_container alignwide'>"; 11 11 12 $portfolio_output .= "<header class='bw_portfolio_header'> \n";12 $portfolio_output .= "<header class='bw_portfolio_header'>"; 13 13 14 14 if( !empty($bw_atts['portfolio_title']) ) { 15 $portfolio_output .= "<h2 class='bw_portfolio_heading'>" . esc_html__( $bw_atts['portfolio_title'] ) . "</h2> \n";15 $portfolio_output .= "<h2 class='bw_portfolio_heading'>" . esc_html__( $bw_atts['portfolio_title'] ) . "</h2>"; 16 16 } 17 17 /** … … 25 25 $portfolio_output .= "<form id='portfolio_filter_sort_form_" . $bw_portfolio_id . "'>"; 26 26 27 $portfolio_output .= "<section class='portfolio_filter_sort_inputs'>"; 28 27 29 if( !is_wp_error($bw_portfolio_tags) && count($bw_portfolio_tags) > 0 ) { 28 30 29 $portfolio_output .= "<section class='portfolio_filter_tags'>\n";31 30 32 31 33 $portfolio_output .= "<input id='pt_show_all_" . $bw_portfolio_id . "' type='radio' name='bwbh_portfolio_filter_tag' value='show_all' checked><label class='bw_portfolio_form_label' for='pt_show_all_" . $bw_portfolio_id . "' title='Show all portfolio items'>Show All</label>"; … … 42 44 43 45 } 44 45 $portfolio_output .= "</section>";46 $portfolio_output .= " <span class='bwbh_separator'>|</span> "; 47 //$portfolio_output .= "</section>"; 46 48 } 47 49 48 50 // sort buttons 49 $portfolio_output .= "<section class='portfolio_sort'>";51 //$portfolio_output .= "<section class='portfolio_sort'>"; 50 52 53 51 54 $portfolio_output .= "<input id='ps_desc_" . $bw_portfolio_id . "' type='radio' name='bwbh_portfolio_sort' value='DESC' checked><label class='bw_portfolio_form_label' for='ps_desc_" . $bw_portfolio_id . "' title='Show newest first'>Newest</label>"; 52 55 $portfolio_output .= "<input id='ps_asc_" . $bw_portfolio_id . "' type='radio' name='bwbh_portfolio_sort' value='ASC'><label class='bw_portfolio_form_label' for='ps_asc_" . $bw_portfolio_id . "' title='Show oldest first'>Oldest</label>"; … … 56 59 $portfolio_output .= "</form>"; 57 60 58 $portfolio_output .= "</header> \n";61 $portfolio_output .= "</header>"; 59 62 60 63 // if user sets columns attribute, add a custom css class to the css grid container that overrides grid-template-columns value … … 101 104 $data_num_of_words = "data-num_of_words='" . $num_of_words . "'"; 102 105 103 $portfolio_output .= "<div class='bw_portfolio_content_area" . $bw_content_classes . "' " . $data_num_of_words . "> \n";106 $portfolio_output .= "<div class='bw_portfolio_content_area" . $bw_content_classes . "' " . $data_num_of_words . ">"; 104 107 105 108 while ( $bw_portfolio_query->have_posts() ) : $bw_portfolio_query->the_post(); 106 109 // add portfolio item html to output variable 107 $portfolio_output .= "<article class='bw_portfolio_item' data-post_id='" . get_the_ID() . "' data-permalink='" . get_the_permalink() . "' > \n";110 $portfolio_output .= "<article class='bw_portfolio_item' data-post_id='" . get_the_ID() . "' data-permalink='" . get_the_permalink() . "' >"; 108 111 109 112 // if user adds modal_off attribute, then add html anchor link to handle normal anchor link click to the full portfolio item being displayed by theme template … … 114 117 $portfolio_output .= "<img src='" . esc_url( get_the_post_thumbnail_url(get_the_ID(), 'large') ) . "' class='bw_portfolio_item_image'>"; 115 118 116 $portfolio_output .= "<div class='bw_portfolio_item_text'> \n";119 $portfolio_output .= "<div class='bw_portfolio_item_text'>"; 117 120 118 $portfolio_output .= "<h3 class='bw_portfolio_item_title'>" . esc_html( get_the_title() ) . "</h3> \n";121 $portfolio_output .= "<h3 class='bw_portfolio_item_title'>" . esc_html( get_the_title() ) . "</h3>"; 119 122 120 $portfolio_output .= "<section class='bw_portfolio_item_content'> \n" . wp_kses_post( bwbh_limit_words( strip_tags(get_the_content()), $num_of_words ) ) . "...\n</section>\n";123 $portfolio_output .= "<section class='bw_portfolio_item_content'>" . wp_kses_post( bwbh_limit_words( strip_tags(get_the_content()), $num_of_words ) ) . "...</section>"; 121 124 122 125 // check if shortcode attribute show_tags is present … … 149 152 } 150 153 151 $portfolio_output .= "</article> \n";154 $portfolio_output .= "</article>"; 152 155 153 156 endwhile; 154 157 155 $portfolio_output .= "</div> \n";158 $portfolio_output .= "</div>"; 156 159 157 $portfolio_output .= "</section> \n";160 $portfolio_output .= "</section>"; 158 161 159 162 else : -
bw-portfolio/tags/1.2.3/readme.txt
r2715217 r2717282 4 4 Tags: portfolio, shortcode, grid, modal 5 5 Requires at least: 5.2 6 Tested up to: 5.9 6 Tested up to: 5.9.3 7 7 Requires PHP: 7.0 8 Stable tag: 1.2. 28 Stable tag: 1.2.3 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 34 34 35 35 == Changelog == 36 37 = 1.2.3 = 38 * Fixed full portfolio item display being spuished on mobile 39 * Fixed color of portfolio text in twentytwentytwo theme and blocks 40 * Fixed filter and sort tags layout 41 * Fixed portfolio items with apostrophe's in title showing ' instead of an apostrophe 42 * Removed and erroneous console.log that was used for testing and logged portfolio item attributes 36 43 37 44 = 1.2.2 = -
bw-portfolio/trunk/assets/css/bw-portfolio-style.css
r2715217 r2717282 7 7 } 8 8 9 .bw_portfolio_header form {9 .bw_portfolio_header form .portfolio_filter_sort_inputs { 10 10 display: flex; 11 flex-wrap: wrap; 11 12 padding: 0 0 1rem; 12 13 } … … 30 31 color: #111; 31 32 } 32 .bw_portfolio_header .portfolio_sort::before { 33 content: "|"; 34 margin: 0 4px; 33 .bwbh_separator { 35 34 color: #444; 36 } 37 35 margin: 0 5px; 36 } 37 38 /* where portfolio item cards get loaded for viewing */ 38 39 .bw_portfolio_content_area { 39 40 display: grid; … … 101 102 } 102 103 103 .bw_portfolio_item_image {104 .bw_portfolio_item_image, .bw_portfolio_item_full_image { 104 105 width: 100%; 105 106 object-fit: contain; … … 137 138 * Styling for modal pop up of full portfolio item view 138 139 */ 139 .bw_portfolio_overlay {140 display: none;141 position: fixed;142 top: 0;143 left: 0;144 align-items: center;145 justify-content: center;146 }147 148 140 .bw_portfolio_modal { 149 141 display: none; … … 151 143 top: 0; 152 144 left: 0; 145 margin: 0; 146 padding: 0; 153 147 align-items: center; 154 148 justify-content: center; … … 171 165 .bw_portfolio_modal_close { 172 166 position: relative; 173 top: -15px;174 right: -25px;167 top: ; 168 right: ; 175 169 padding: 0; 176 170 margin: 0; … … 186 180 flex-direction: column; 187 181 margin: 0 auto; 188 padding: 2 em;182 padding: 2%; 189 183 border-radius: 5px; 190 184 border: 1px solid #ccc; 191 185 background: #fff; 186 color: #222; 192 187 font-size: 1em; 193 188 width: 94%; … … 209 204 @media only screen and (max-width: 600px) { 210 205 .bw_portfolio_item_full { 211 width: 98%; 206 width: 92%; 207 padding: 3%; 212 208 } 213 209 } … … 217 213 .bw_portfolio_item_full { 218 214 width: 96%; 215 padding: 1%; 219 216 } 220 217 } … … 230 227 .bw_portfolio_item_full { 231 228 width: 92%; 229 padding: 3%; 232 230 } 233 231 } … … 237 235 .bw_portfolio_item_full { 238 236 width: 75%; 239 } 240 } 237 padding: 2em; 238 } 239 } -
bw-portfolio/trunk/assets/js/bw-portfolio-script.js
r2715217 r2717282 207 207 .then( response => response.json() ) 208 208 .then( data => { 209 210 console.log(data); 211 209 212 210 bwbh_loader_gif.remove(); 213 211 … … 232 230 const bwbh_portfolio_heading = document.createElement('h3'); 233 231 bwbh_portfolio_heading.setAttribute('class', 'bw_portfolio_item_title'); 234 bwbh_portfolio_heading. innerHTML= data.portfolio_items[bwbh_key].title;232 bwbh_portfolio_heading.textContent = data.portfolio_items[bwbh_key].title; 235 233 bwbh_portfolio_text.appendChild(bwbh_portfolio_heading); 236 234 -
bw-portfolio/trunk/bw-portfolio.php
r2715217 r2717282 3 3 * Plugin Name: BW Portfolio 4 4 * Description: The BW Portfolio plugin is powerful yet lightweight and fast. It allows you to easily add portfolio items in your WordPress Dashboard, and organize them with portfolio tags as well. Then by using a handy shortcode you can display your portfolio items just about anywhere in a nice, responsive css grid that is compatible on many different devices. Also has tag filtering and sorting of portfolio items built in. 5 * Version: 1.2. 25 * Version: 1.2.3 6 6 * Requires at least: 5.2 7 7 * Requires PHP: 7.0 … … 81 81 // store the needed post data to send back in rest response 82 82 $bw_response_data = [ 83 'title' => esc_html__($bw_post->post_title),83 'title' => html_entity_decode($bw_post->post_title), 84 84 'content' => apply_filters('the_content', $bw_post->post_content ), 85 85 ]; … … 149 149 $bw_response_data['portfolio_items'][$n] = [ 150 150 'bw_portfolio_id' => get_the_ID(), 151 'title' => get_the_title(),151 'title' => html_entity_decode(get_the_title()), 152 152 'content' => wp_kses_post( bwbh_limit_words( strip_tags( get_the_content() ), $bwbh_num_of_words ) ) . '...', 153 153 ]; -
bw-portfolio/trunk/inc/portfolio-loop.php
r2715217 r2717282 8 8 $bw_portfolio_id = uniqid(); 9 9 10 $portfolio_output .= "<section id='bw_portfolio_" . $bw_portfolio_id . "' class='bw_portfolio_container alignwide'> \n";10 $portfolio_output .= "<section id='bw_portfolio_" . $bw_portfolio_id . "' class='bw_portfolio_container alignwide'>"; 11 11 12 $portfolio_output .= "<header class='bw_portfolio_header'> \n";12 $portfolio_output .= "<header class='bw_portfolio_header'>"; 13 13 14 14 if( !empty($bw_atts['portfolio_title']) ) { 15 $portfolio_output .= "<h2 class='bw_portfolio_heading'>" . esc_html__( $bw_atts['portfolio_title'] ) . "</h2> \n";15 $portfolio_output .= "<h2 class='bw_portfolio_heading'>" . esc_html__( $bw_atts['portfolio_title'] ) . "</h2>"; 16 16 } 17 17 /** … … 25 25 $portfolio_output .= "<form id='portfolio_filter_sort_form_" . $bw_portfolio_id . "'>"; 26 26 27 $portfolio_output .= "<section class='portfolio_filter_sort_inputs'>"; 28 27 29 if( !is_wp_error($bw_portfolio_tags) && count($bw_portfolio_tags) > 0 ) { 28 30 29 $portfolio_output .= "<section class='portfolio_filter_tags'>\n";31 30 32 31 33 $portfolio_output .= "<input id='pt_show_all_" . $bw_portfolio_id . "' type='radio' name='bwbh_portfolio_filter_tag' value='show_all' checked><label class='bw_portfolio_form_label' for='pt_show_all_" . $bw_portfolio_id . "' title='Show all portfolio items'>Show All</label>"; … … 42 44 43 45 } 44 45 $portfolio_output .= "</section>";46 $portfolio_output .= " <span class='bwbh_separator'>|</span> "; 47 //$portfolio_output .= "</section>"; 46 48 } 47 49 48 50 // sort buttons 49 $portfolio_output .= "<section class='portfolio_sort'>";51 //$portfolio_output .= "<section class='portfolio_sort'>"; 50 52 53 51 54 $portfolio_output .= "<input id='ps_desc_" . $bw_portfolio_id . "' type='radio' name='bwbh_portfolio_sort' value='DESC' checked><label class='bw_portfolio_form_label' for='ps_desc_" . $bw_portfolio_id . "' title='Show newest first'>Newest</label>"; 52 55 $portfolio_output .= "<input id='ps_asc_" . $bw_portfolio_id . "' type='radio' name='bwbh_portfolio_sort' value='ASC'><label class='bw_portfolio_form_label' for='ps_asc_" . $bw_portfolio_id . "' title='Show oldest first'>Oldest</label>"; … … 56 59 $portfolio_output .= "</form>"; 57 60 58 $portfolio_output .= "</header> \n";61 $portfolio_output .= "</header>"; 59 62 60 63 // if user sets columns attribute, add a custom css class to the css grid container that overrides grid-template-columns value … … 101 104 $data_num_of_words = "data-num_of_words='" . $num_of_words . "'"; 102 105 103 $portfolio_output .= "<div class='bw_portfolio_content_area" . $bw_content_classes . "' " . $data_num_of_words . "> \n";106 $portfolio_output .= "<div class='bw_portfolio_content_area" . $bw_content_classes . "' " . $data_num_of_words . ">"; 104 107 105 108 while ( $bw_portfolio_query->have_posts() ) : $bw_portfolio_query->the_post(); 106 109 // add portfolio item html to output variable 107 $portfolio_output .= "<article class='bw_portfolio_item' data-post_id='" . get_the_ID() . "' data-permalink='" . get_the_permalink() . "' > \n";110 $portfolio_output .= "<article class='bw_portfolio_item' data-post_id='" . get_the_ID() . "' data-permalink='" . get_the_permalink() . "' >"; 108 111 109 112 // if user adds modal_off attribute, then add html anchor link to handle normal anchor link click to the full portfolio item being displayed by theme template … … 114 117 $portfolio_output .= "<img src='" . esc_url( get_the_post_thumbnail_url(get_the_ID(), 'large') ) . "' class='bw_portfolio_item_image'>"; 115 118 116 $portfolio_output .= "<div class='bw_portfolio_item_text'> \n";119 $portfolio_output .= "<div class='bw_portfolio_item_text'>"; 117 120 118 $portfolio_output .= "<h3 class='bw_portfolio_item_title'>" . esc_html( get_the_title() ) . "</h3> \n";121 $portfolio_output .= "<h3 class='bw_portfolio_item_title'>" . esc_html( get_the_title() ) . "</h3>"; 119 122 120 $portfolio_output .= "<section class='bw_portfolio_item_content'> \n" . wp_kses_post( bwbh_limit_words( strip_tags(get_the_content()), $num_of_words ) ) . "...\n</section>\n";123 $portfolio_output .= "<section class='bw_portfolio_item_content'>" . wp_kses_post( bwbh_limit_words( strip_tags(get_the_content()), $num_of_words ) ) . "...</section>"; 121 124 122 125 // check if shortcode attribute show_tags is present … … 149 152 } 150 153 151 $portfolio_output .= "</article> \n";154 $portfolio_output .= "</article>"; 152 155 153 156 endwhile; 154 157 155 $portfolio_output .= "</div> \n";158 $portfolio_output .= "</div>"; 156 159 157 $portfolio_output .= "</section> \n";160 $portfolio_output .= "</section>"; 158 161 159 162 else : -
bw-portfolio/trunk/readme.txt
r2715217 r2717282 4 4 Tags: portfolio, shortcode, grid, modal 5 5 Requires at least: 5.2 6 Tested up to: 5.9 6 Tested up to: 5.9.3 7 7 Requires PHP: 7.0 8 Stable tag: 1.2. 28 Stable tag: 1.2.3 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 34 34 35 35 == Changelog == 36 37 = 1.2.3 = 38 * Fixed full portfolio item display being spuished on mobile 39 * Fixed color of portfolio text in twentytwentytwo theme and blocks 40 * Fixed filter and sort tags layout 41 * Fixed portfolio items with apostrophe's in title showing ' instead of an apostrophe 42 * Removed and erroneous console.log that was used for testing and logged portfolio item attributes 36 43 37 44 = 1.2.2 =
Note: See TracChangeset
for help on using the changeset viewer.