Changeset 2465368
- Timestamp:
- 01/30/2021 05:21:09 AM (5 years ago)
- Location:
- seo-pyramid/trunk
- Files:
-
- 4 edited
-
index.php (modified) (1 diff)
-
pages/sitemap-page.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
seo_pyramid_functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seo-pyramid/trunk/index.php
r2423060 r2465368 8 8 * Description: Simplified Search Engine Optimization plugin. 9 9 10 * Version: 1.9. 710 * Version: 1.9.8 11 11 12 12 * Author: Chibueze Okechukwu -
seo-pyramid/trunk/pages/sitemap-page.php
r2423060 r2465368 80 80 <?php 81 81 82 $seo_pyramid_ready_message = '<div class="seo_pyramid_notice">A n XML sitemap will be generated based on your preferences. However, the "Page Priority" and "Change Frequency" for each page must be set and updated through page/post edit and update window.' . '</br></br>' . ' * If the initial load of the xml sitemap is taking too long, please refresh it.' . ' <a href="' . get_site_url() . '/sitemap.xml"' . 'target="_blank"><span class="dashicons dashicons-external"></span> Preview your sitemap</a> </div>';82 $seo_pyramid_ready_message = '<div class="seo_pyramid_notice">After you save your changes, an XML sitemap will be generated based on your preferences. However, the "Page Priority" and "Change Frequency" for each page must be set and updated through page/post edit and update window.' . '</br></br>' . ' <a href="' . get_site_url() . '/sitemap.xml"' . 'target="_blank"><span class="dashicons dashicons-external"></span> Preview your sitemap</a> </div>'; 83 83 84 84 printf( __( '%s', 'seo-pyramid' ), $seo_pyramid_ready_message ); … … 241 241 $seo_pyramid_sitemap = new SEOPyramidSitemap(); 242 242 243 244 // Create Sitemap 245 246 247 class seo_pyramid_create_sitemap { 248 249 250 public function __construct() { 251 252 253 $this->create_sitemap(); 254 255 256 } 257 258 259 public function create_sitemap() { 260 261 262 $seo_pyramid_sitemap_options = get_option( 'seo_pyramid_sitemap_option_name' ); 263 264 // $currParValue = get_current_screen(); 265 266 267 if(isset($_POST["submit"]) && is_admin()) { 268 if ( !empty( $seo_pyramid_sitemap_options[ 'change_frequency_0' ] ) || 269 270 271 ( !empty( $seo_pyramid_sitemap_options[ 'page_priority_1' ] ) ) || 272 273 274 ( !empty( $seo_pyramid_sitemap_options[ 'last_modified_2' ] ) ) ) { 275 276 277 $opts = [ 278 279 280 "http" => [ 281 282 283 "method" => "GET", 284 285 286 "header" => "Accept-language: en\r\n" 287 288 289 ] 290 291 ]; 292 293 294 $my_plugin = plugins_url('seo-pyramid') . "/builders"; 295 296 297 $context = stream_context_create( $opts ); 298 299 300 $content = file_get_contents( $my_plugin . '/sitemap.php', false, $context ); 301 302 303 clearstatcache(); 304 305 306 $fp = fopen( $_SERVER[ 'DOCUMENT_ROOT' ] . "/sitemap.xml", "w+" ) or die( "Unable to open file!" ); 307 308 309 fwrite( $fp, $content ); 310 311 312 fclose( $fp ); 313 314 315 316 } 317 318 } 319 320 321 } 322 323 324 } 325 326 327 $seo_pyramid_create_sitemap = new seo_pyramid_create_sitemap(); 328 329 243 330 // Remove menu from menu 244 331 function remove_menu_items() { -
seo-pyramid/trunk/readme.txt
r2438098 r2465368 6 6 Tested up to: 5.6 7 7 Requires PHP: 5.0 8 Stable tag: 1.9. 78 Stable tag: 1.9.8 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 47 47 * Minimal impact on page speed 48 48 * No PHP errors, warning, notices, and No JavaScript issues 49 * Latest PHP 7.2.16compatible50 * Latest WordPress 5.4compatible49 * Latest PHP compatible 50 * Latest WordPress compatible 51 51 * Optimized database footprint 52 52 * No resource errors … … 152 152 == Changelog == 153 153 154 ### 1.9.6 155 This update includes but not limited to U.I and code enhancements. 156 157 ### 1.9.5 158 An immediate follow up release to address PHP errors identified after the release of version 1.9.4 to maintain the plugin's reputation of error-free code. 159 160 ### 1.9.4 161 This update includes but is not limited to code enhancements to ensure that the plugin is thoroughly compatible with the latest PHP version. 162 163 ### 1.9.3 164 This update was released to address the situation where tracking codes and open graph tags are missing in the head section after the last update. 165 166 ### 1.9.2 167 This update includes, but is not limited to code enhancements to address PHP errors reported by users. 168 169 ### 1.9.1 170 A follow-up release to address critical issues 171 172 ### 1.9.0 173 This update includes, but is not limited to, the addition of profanity check feature, the ability to set an end-date for page redirects, and code enhancements. 174 175 ### 1.8.4 176 This update includes enhancements to the structured data feature to accommodate unlimited social media page links and U.I improvements. 177 178 ### 1.8.3 179 This update includes, but not limited to, fix of issues where the content analysis tool does not work on code editor mode, and verbiage corrections for the analysis modal box and report page. 180 181 ### 1.8.2 182 This update includes but is not limited to the introduction of reports page, code enhancements, SEO status UI enhancements, and fix of image alt check issue 183 184 ### 1.8.1 185 This update includes but not limited to: The exemption of the home page from URL analysis as it (the slug) is not visible to search engines. And, code enhancements. 186 187 ### 1.8.0 188 This update includes, but not limited to: The introduction of URL analysis tool to help users create SEO friendly URLs and Search engine accessibility status notice that informs users when search engines are discouraged from indexing their website. 189 190 ### 1.7.9 191 This update includes, but not limited to: Code enhancements, UI enhancements, and inclusion of local business, address, phone, and price range properties to the schema feature. 192 193 ### 1.7.8 194 This update includes, but not limited to: Introduction of temporary redirect feature and Enhancements to the preview snippet for better display on laptops. 195 196 ### 1.7.6 197 Critical Bug fixes. 198 154 ### 1.9.8 155 This update includes but is not limited to code enhancements and a change to the sitemap build approach to ensure that it updates whenever posts or pages are updated. 199 156 200 157 == Update Notice == -
seo-pyramid/trunk/seo_pyramid_functions.php
r2423060 r2465368 285 285 286 286 287 // Create Sitemap288 289 290 class seo_pyramid_create_sitemap {291 292 293 public function __construct() {294 295 296 $this->create_sitemap();297 298 299 }300 301 302 public function create_sitemap() {303 304 305 $baseurl = $_SERVER[ 'REQUEST_URI' ];306 307 308 $sitemapUrl = "/sitemap.xml";309 310 311 while ( $baseurl === $sitemapUrl ) {312 313 314 $seo_pyramid_sitemap_options = get_option( 'seo_pyramid_sitemap_option_name' );315 316 317 if ( !empty( $seo_pyramid_sitemap_options[ 'change_frequency_0' ] ) ||318 319 320 ( !empty( $seo_pyramid_sitemap_options[ 'page_priority_1' ] ) ) ||321 322 323 ( !empty( $seo_pyramid_sitemap_options[ 'last_modified_2' ] ) ) ) {324 325 326 $opts = [327 328 329 "http" => [330 331 332 "method" => "GET",333 334 335 "header" => "Accept-language: en\r\n"336 337 338 ]339 340 ];341 342 343 $my_plugin = plugin_dir_url( __FILE__ ) . '/builders';344 345 346 $context = stream_context_create( $opts );347 348 349 $content = file_get_contents( $my_plugin . '/sitemap.php', false, $context );350 351 352 clearstatcache();353 354 355 $fp = fopen( $_SERVER[ 'DOCUMENT_ROOT' ] . "/sitemap.xml", "w+" )or die( "Unable to open file!" );356 357 358 fwrite( $fp, $content );359 360 361 fclose( $fp );362 363 364 // Prepare to refresh sitemap if it takes too long365 366 367 if ( !file_exists( $sitemapUrl ) ) {368 369 370 ?>371 <script>372 373 374 375 window.location.href = window.location.href;376 377 378 379 </script>380 <?php381 382 383 }384 385 386 }387 388 389 }390 391 392 }393 394 395 }396 397 398 $seo_pyramid_create_sitemap = new seo_pyramid_create_sitemap();399 287 400 288 … … 838 726 839 727 /* 840 * Save meta box content .728 * Save meta box content and update sitemap 841 729 */ 842 730 … … 844 732 function seo_pyramid_save_field_entries( $seo_pyramid_post_id ) { 845 733 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; 734 735 // Create Sitemap 736 737 $seo_pyramid_sitemap_options = get_option( 'seo_pyramid_sitemap_option_name' ); 738 739 740 741 if ( !empty( $seo_pyramid_sitemap_options[ 'change_frequency_0' ] ) || 742 743 744 ( !empty( $seo_pyramid_sitemap_options[ 'page_priority_1' ] ) ) || 745 746 747 ( !empty( $seo_pyramid_sitemap_options[ 'last_modified_2' ] ) ) ) { 748 749 750 $opts = [ 751 752 753 "http" => [ 754 755 756 "method" => "GET", 757 758 759 "header" => "Accept-language: en\r\n" 760 761 762 ] 763 764 ]; 765 766 767 $my_plugin = plugin_dir_url( __FILE__ ) . '/builders'; 768 769 770 $context = stream_context_create( $opts ); 771 772 773 $content = file_get_contents( $my_plugin . '/sitemap.php', false, $context ); 774 775 776 clearstatcache(); 777 778 779 $fp = fopen( $_SERVER[ 'DOCUMENT_ROOT' ] . "/sitemap.xml", "w+" ) or die( "Unable to open file!" ); 780 781 782 fwrite( $fp, $content ); 783 784 785 fclose( $fp ); 786 787 788 } 789 790 791 846 792 if ( $seo_pyramid_parent_id = wp_is_post_revision( $seo_pyramid_post_id ) ) { 847 793 $seo_pyramid_post_id = $seo_pyramid_parent_id;
Note: See TracChangeset
for help on using the changeset viewer.