Changeset 1505860
- Timestamp:
- 09/30/2016 12:11:35 PM (10 years ago)
- Location:
- metamax
- Files:
-
- 4 edited
- 8 copied
-
tags/1.1 (copied) (copied from metamax/trunk)
-
tags/1.1/LICENSE.txt (copied) (copied from metamax/trunk/LICENSE.txt)
-
tags/1.1/appex-metamax.php (copied) (copied from metamax/trunk/appex-metamax.php) (1 diff)
-
tags/1.1/includes (copied) (copied from metamax/trunk/includes)
-
tags/1.1/includes/appex-metamax-defaults.php (modified) (2 diffs)
-
tags/1.1/index.php (copied) (copied from metamax/trunk/index.php)
-
tags/1.1/languages (copied) (copied from metamax/trunk/languages)
-
tags/1.1/readme.txt (copied) (copied from metamax/trunk/readme.txt) (2 diffs)
-
tags/1.1/uninstall.php (copied) (copied from metamax/trunk/uninstall.php)
-
trunk/appex-metamax.php (modified) (1 diff)
-
trunk/includes/appex-metamax-defaults.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
metamax/tags/1.1/appex-metamax.php
r1501085 r1505860 3 3 Plugin Name: MetaMax 4 4 Description: MetaMax automagically inserts meta tags in your html to make your site more SEO friendly. 5 Version: 1. 05 Version: 1.1 6 6 Author: Appex 7 7 Author URI: https://appex.no/ -
metamax/tags/1.1/includes/appex-metamax-defaults.php
r1501036 r1505860 63 63 64 64 if ( $post ) { 65 66 $post_thumbnail_id = null; 65 67 66 68 // Let's output the post thumbnail first, if it exists … … 92 94 } 93 95 94 $attached_images = get_attached_media( 'image', $post->ID );95 $accepted_filetypes = array( 'png', 'jpg', 'jpeg', 'gif' );96 $minimum_image_dimensions = array( 200, 200 ); // Facebook's MINIMUM recommended width and height97 98 if ( count( $attached_images ) > 0 ) {99 100 foreach ( $attached_images as $attached_image ) {101 102 $attached_image_id = $attached_image->ID;103 $attached_image_data = wp_get_attachment_image_src( $attached_image_id, 'full' );104 $filetype = wp_check_filetype( $attached_image_data[0] );105 106 if ( $i >= $maximum_number_of_images ) {107 108 // Exit if maximum number of images has been reached109 break;110 111 }112 elseif ( $attached_image_id == $post_thumbnail_id ) {113 114 // Skip if post thumbnail115 continue;116 117 }118 elseif ( !in_array( $filetype['ext'], $accepted_filetypes) ) {119 120 // Skip unsupported image types121 continue;122 123 }124 elseif ( $attached_image_data[1] < $minimum_image_dimensions[0] || $attached_image_data[2] < $minimum_image_dimensions[1] ) {125 126 // Check the image dimensions127 continue;128 129 }130 131 $document_images[] = Appex_Metamax_Defaults::get_document_image_data( $attached_image_data );132 133 $i++;134 135 }136 137 }138 139 96 } 140 97 -
metamax/tags/1.1/readme.txt
r1501085 r1505860 4 4 Requires at least: 4.6 5 5 Tested up to: 4.6.1 6 Stable tag: 1. 06 Stable tag: 1.1 7 7 Tags: SEO, Google, meta description, meta title, noindex, Facebook, Twitter, LinkedIn, search engine optimization 8 8 License: GPLv2 or later … … 115 115 == Changelog == 116 116 117 = 1.1 = 118 * Fixed undefined $post_thumbnail_id bug 119 * Removed attached images from og:image array 120 117 121 = 1.0 = 118 122 * Initial release -
metamax/trunk/appex-metamax.php
r1501085 r1505860 3 3 Plugin Name: MetaMax 4 4 Description: MetaMax automagically inserts meta tags in your html to make your site more SEO friendly. 5 Version: 1. 05 Version: 1.1 6 6 Author: Appex 7 7 Author URI: https://appex.no/ -
metamax/trunk/includes/appex-metamax-defaults.php
r1501036 r1505860 63 63 64 64 if ( $post ) { 65 66 $post_thumbnail_id = null; 65 67 66 68 // Let's output the post thumbnail first, if it exists … … 92 94 } 93 95 94 $attached_images = get_attached_media( 'image', $post->ID );95 $accepted_filetypes = array( 'png', 'jpg', 'jpeg', 'gif' );96 $minimum_image_dimensions = array( 200, 200 ); // Facebook's MINIMUM recommended width and height97 98 if ( count( $attached_images ) > 0 ) {99 100 foreach ( $attached_images as $attached_image ) {101 102 $attached_image_id = $attached_image->ID;103 $attached_image_data = wp_get_attachment_image_src( $attached_image_id, 'full' );104 $filetype = wp_check_filetype( $attached_image_data[0] );105 106 if ( $i >= $maximum_number_of_images ) {107 108 // Exit if maximum number of images has been reached109 break;110 111 }112 elseif ( $attached_image_id == $post_thumbnail_id ) {113 114 // Skip if post thumbnail115 continue;116 117 }118 elseif ( !in_array( $filetype['ext'], $accepted_filetypes) ) {119 120 // Skip unsupported image types121 continue;122 123 }124 elseif ( $attached_image_data[1] < $minimum_image_dimensions[0] || $attached_image_data[2] < $minimum_image_dimensions[1] ) {125 126 // Check the image dimensions127 continue;128 129 }130 131 $document_images[] = Appex_Metamax_Defaults::get_document_image_data( $attached_image_data );132 133 $i++;134 135 }136 137 }138 139 96 } 140 97 -
metamax/trunk/readme.txt
r1501085 r1505860 4 4 Requires at least: 4.6 5 5 Tested up to: 4.6.1 6 Stable tag: 1. 06 Stable tag: 1.1 7 7 Tags: SEO, Google, meta description, meta title, noindex, Facebook, Twitter, LinkedIn, search engine optimization 8 8 License: GPLv2 or later … … 115 115 == Changelog == 116 116 117 = 1.1 = 118 * Fixed undefined $post_thumbnail_id bug 119 * Removed attached images from og:image array 120 117 121 = 1.0 = 118 122 * Initial release
Note: See TracChangeset
for help on using the changeset viewer.