Changeset 3152954
- Timestamp:
- 09/16/2024 08:29:51 PM (8 weeks ago)
- Location:
- wp-perfect-plugin/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-perfect-plugin/trunk/includes/functions.php
r3139081 r3152954 308 308 } 309 309 310 $license = '';311 if ( get_option( 'w3p_image_license_url' ) !== '' ) {312 $license = ',"license": "' . get_option( 'w3p_image_license_url' ) . '"';313 }314 $acquire_license_page = '';315 if ( get_option( 'w3p_image_acquire_license_url' ) !== '' ) {316 $acquire_license_page = ',"acquireLicensePage": "' . get_option( 'w3p_image_acquire_license_url' ) . '"';317 }318 319 310 $out .= '{ 320 311 "@type": "ImageObject", … … 325 316 ' . $width . ' 326 317 ' . $height . ' 327 ' . $license . '328 ' . $acquire_license_page . '329 318 },'; 330 319 } -
wp-perfect-plugin/trunk/includes/schema-breadcrumbs.php
r2797926 r3152954 24 24 <?php if ( is_singular( 'post' ) ) { // if on a single blog post ?> 25 25 { 26 "@type": "ListItem", 26 "@type": "ListItem", 27 27 "position": 1, 28 28 "item": … … 52 52 ?> 53 53 { 54 "@type": "ListItem", 54 "@type": "ListItem", 55 55 "position": 1, 56 56 "item": … … 75 75 if ( is_page() && $post->post_parent ) { // if is a child page 76 76 $post_data = get_post( $post->post_parent ); 77 $parent_page_slug = $post_data->post_name; 78 $parent_page_url = get_bloginfo( 'url' ) . '/' . $parent_page_slug . '/'; 79 $parent_page_title = ucfirst( $parent_page_slug ); 77 $parent_page_url = get_permalink( $post->post_parent ); 78 $parent_page_title = get_the_title( $post->post_parent ); 80 79 $position_number = '2'; 81 80 } else { … … 88 87 ?> 89 88 { 90 "@type": "ListItem", 89 "@type": "ListItem", 91 90 "position": 1, 92 91 "item": … … 100 99 ?> 101 100 { 102 "@type": "ListItem", 101 "@type": "ListItem", 103 102 "position": <?php echo $position_number; ?>, 104 103 "item": … … 112 111 ?> 113 112 { 114 "@type": "ListItem", 113 "@type": "ListItem", 115 114 "position": 1, 116 115 "item": … … 124 123 ?> 125 124 { 126 "@type": "ListItem", 127 "position": 1, 128 "item": 129 { 130 "@id": "<?php echo $blog_posts_page_slug; ?>", 131 "name": "<?php echo $site_name; ?>" 132 } 133 }, 134 { 135 "@type": "ListItem", 125 "@type": "ListItem", 126 "position": 1, 127 "item": 128 { 129 "@id": "<?php echo $blog_posts_page_slug; ?>", 130 "name": "<?php echo $site_name; ?>" 131 } 132 }, 133 { 134 "@type": "ListItem", 136 135 "position": 2, 137 136 "item": … … 149 148 ?> 150 149 { 151 "@type": "ListItem", 150 "@type": "ListItem", 152 151 "position": 1, 153 152 "item": … … 158 157 }, 159 158 { 160 "@type": "ListItem", 159 "@type": "ListItem", 161 160 "position": 2, 162 161 "item": … … 170 169 ?> 171 170 { 172 "@type": "ListItem", 173 "position": 1, 174 "item": 175 { 176 "@id": "<?php echo $blog_posts_page_slug; ?>", 177 "name": "<?php echo $site_name; ?>" 178 } 179 }, 180 { 181 "@type": "ListItem", 171 "@type": "ListItem", 172 "position": 1, 173 "item": 174 { 175 "@id": "<?php echo $blog_posts_page_slug; ?>", 176 "name": "<?php echo $site_name; ?>" 177 } 178 }, 179 { 180 "@type": "ListItem", 182 181 "position": 2, 183 182 "item": … … 191 190 ?> 192 191 { 193 "@type": "ListItem", 192 "@type": "ListItem", 194 193 "position": 1, 195 194 "item": -
wp-perfect-plugin/trunk/modules/w3p-settings.php
r3139081 r3152954 822 822 update_option( 'w3p_image_alt', (int) $_POST['w3p_image_alt'] ); 823 823 824 update_option( 'w3p_image_license_url', sanitize_url( $_POST['w3p_image_license_url'] ));825 update_option( 'w3p_image_acquire_license_url', sanitize_url( $_POST['w3p_image_acquire_license_url'] ));824 ); 825 ); 826 826 827 827 echo '<div class="updated notice is-dismissible"><p>Settings updated!</p></div>'; … … 842 842 <input name="w3p_image_alt" id="w3p_image_alt" type="checkbox" value="1" <?php checked( 1, (int) get_option( 'w3p_image_alt' ) ); ?>> <label for="w3p_image_alt">Auto add image attributes (<code>ALT</code>) from image filename</label> 843 843 <br><small>Automatically add image caption, description and ALT text from image title for all new uploads.</small> 844 </p>845 </td>846 </tr>847 <tr>848 <th scope="row"><label>Image License</label></th>849 <td>850 <p>851 <label>Image license page (<code>license</code>)</label><br>852 <input type="url" name="w3p_image_license_url" class="regular-text" placeholder="https://" value="<?php echo get_option( 'w3p_image_license_url' ); ?>">853 <br><small>A license document that applies to images, typically indicated by URL.</small>854 </p>855 <p>856 <label>Image license purchase page (<code>acquireLicensePage</code>, optional)</label><br>857 <input type="url" name="w3p_image_acquire_license_url" class="regular-text" placeholder="https://" value="<?php echo get_option( 'w3p_image_acquire_license_url' ); ?>">858 <br><small>Indicates a page documenting how image licenses can be purchased or otherwise acquired, for the current item.</small>859 844 </p> 860 845 </td> -
wp-perfect-plugin/trunk/readme.txt
r3139081 r3152954 5 5 Requires PHP: 7.1 6 6 Requires CP: 2.0 7 Tested up to: 6.6. 18 Stable tag: 1.8. 17 Tested up to: 6.6. 8 Stable tag: 1.8. 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 36 36 37 37 == Changelog == 38 39 40 38 41 39 42 = 1.8.1 = -
wp-perfect-plugin/trunk/wp-perfect-plugin.php
r3139081 r3152954 6 6 Author: Ciprian Popescu 7 7 Author URI: https://getbutterfly.com/ 8 Version: 1.8. 18 Version: 1.8. 9 9 Text Domain: wp-perfect-plugin 10 10 … … 33 33 define( 'W3P_URL', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) ); 34 34 define( 'W3P_PATH', plugin_dir_path( __FILE__ ) ); 35 define( 'W3P_VERSION', '1.8. 1' );35 define( 'W3P_VERSION', '1.8.' ); 36 36 37 37 include 'includes/functions.php';
Note: See TracChangeset
for help on using the changeset viewer.