Changeset 1359856
- Timestamp:
- 02/27/2016 10:19:25 PM (10 years ago)
- Location:
- pagefrog/trunk
- Files:
-
- 12 edited
-
README.txt (modified) (1 diff)
-
admin/class-amp-ads-injection-sanitizer.php (modified) (1 diff)
-
admin/class-pagefrog-admin.php (modified) (1 diff)
-
admin/integrations/google-adsense.php (modified) (1 diff)
-
admin/js/pagefrog-settings.js (modified) (1 diff)
-
admin/pagefrog-post-metadata.php (modified) (2 diffs)
-
admin/pagefrog-preview.php (modified) (1 diff)
-
admin/pagefrog-settings.php (modified) (6 diffs)
-
admin/pagefrog-styling.php (modified) (1 diff)
-
includes/class-pagefrog.php (modified) (2 diffs)
-
pagefrog.php (modified) (1 diff)
-
public/class-pagefrog-public.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pagefrog/trunk/README.txt
r1357722 r1359856 224 224 225 225 == Changelog == 226 = 1.0.7.1 = 227 *Release Date - February 27, 2017* 228 229 * Explanation text to help enabling articles 230 * bug fixes 231 226 232 = 1.0.7 = 227 233 *Release Date - February 24, 2016* -
pagefrog/trunk/admin/class-amp-ads-injection-sanitizer.php
r1355936 r1359856 31 31 // count the number of ads we injected 32 32 $ads_injected++; 33 34 if ( $ads_injected === 3 ) { 35 break; 36 } 33 37 } 34 38 -
pagefrog/trunk/admin/class-pagefrog-admin.php
r1357722 r1359856 1075 1075 } 1076 1076 1077 public function add_logo_to_schema_org ( $meta_data, $post ) { 1078 $styles = new PageFrog_Styling_Storage(); 1079 $meta_data['publisher']['logo'] = array( 1080 '@type' => 'ImageObject', 1081 'url' => $styles->get_logo_img_url(), 1082 'height' => (string)$styles->get_logo_img_height(), 1083 'width' => (string)$styles->get_logo_img_width(), 1084 ); 1085 1086 // Google's validator seems to expect heights and widths as strings 1087 if ( isset( $meta_data['image'] ) && isset( $meta_data['image']['width'] ) ) { 1088 $meta_data['image']['width'] = (string)$meta_data['image']['width']; 1089 } 1090 if ( isset( $meta_data['image'] ) && isset( $meta_data['image']['height'] ) ) { 1091 $meta_data['image']['height'] = (string)$meta_data['image']['height']; 1092 } 1093 return $meta_data; 1094 } 1095 1077 1096 public function edit_amp_post_template_data( $data ) { 1078 1097 // change the logo -
pagefrog/trunk/admin/integrations/google-adsense.php
r1357722 r1359856 247 247 return array( 248 248 'status' => 'error', 249 'message' => 'No valid ad units for AMP could be found in your account. Please create an Ad Unit that is in one of the following formats: 320 x 100, 336 x 280, or responsive. After creating your ad unit, please try again.'249 'message' => 'No valid ad units for AMP could be found in your account. Please create an Ad Unit that works well on mobile (less than 500px wide and less tall than wide, or Responsive). After creating your ad unit, please try again.' 250 250 ); 251 251 } -
pagefrog/trunk/admin/js/pagefrog-settings.js
r1357722 r1359856 89 89 } 90 90 }, 91 error: function () { 92 alert("Something went wrong! Please contact team@pagefrog.com to let us know!"); 91 error: function (xhr, error) { 92 console.log(xhr.statusCode()); 93 alert("Something went wrong! Please contact team@pagefrog.com to let us know! Also please include the following information:\n\nHTTP Status Code: " + JSON.stringify(xhr.statusCode())); 93 94 } 94 95 }); -
pagefrog/trunk/admin/pagefrog-post-metadata.php
r1357722 r1359856 253 253 array( 254 254 'key' => PageFrog_PostStatus::AMP_STATUS_KEY, 255 'value' => array( 0, '0', '', null ), 256 'compare' => 'IN' 255 'value' => false, 257 256 ), 258 257 array( … … 300 299 array( 301 300 'key' => PageFrog_PostStatus::FBIA_STATUS_KEY, 302 'value' => array( 0, '0', '', null ), 303 'compare' => 'IN' 301 'value' => false 304 302 ), 305 303 array( -
pagefrog/trunk/admin/pagefrog-preview.php
r1342963 r1359856 70 70 </div> 71 71 </div> 72 73 <!-- hidding unsupported style tag74 <div class="row">75 <div class="col-sm-12 margin-top">76 <div class="accordion">77 <a href="#" id="pagefrog-unsupported-button" class="button block"><strong>Unsupported Styles:</strong><span class="pull-right arrow-toggle">▼</span></a>78 </div>79 </div>80 </div>81 <div class="row">82 <div class="col-sm-12">83 <div class="pagefrog-rules-explanation">84 <div class="pagefrog-fbia-rules hidden pagefrog-rules">85 <div class="row">86 <div class="col-sm-12">87 <div class="with-border">88 <p><small>The following features are not supported by Instant Articles:</small></p>89 <ul>90 <li><small>Underlined, colored, or styled spans</small></li>91 <li><small>Nested lists</small></li>92 <li><small>Tables</small></li>93 </ul>94 <p><small>PageFrog has made your article compliant by removing any unsupported features you might have used.</small></p>95 </div>96 </div>97 </div>98 </div>99 <div class="pagefrog-amp-rules hidden pagefrog-rules">100 <div class="row">101 <div class="col-sm-12">102 <div class="with-border">103 <p><small>Note that the following features are not supported by AMP:</small></p>104 <ul>105 <li><small>Javascript</small></li>106 </ul>107 <p><small>PageFrog has made your article compliant by removing any unsupported features you might have used.</small></p>108 109 </div>110 </div>111 </div>112 <div> </div>113 </div>114 </div>115 </div>116 </div>117 <div class="row">118 <div class="col-sm-12 margin-top-bottom"></div>119 </div>-->120 72 <?php 121 73 } -
pagefrog/trunk/admin/pagefrog-settings.php
r1357722 r1359856 94 94 <div class="col-sm-3"> 95 95 <p><strong>Setting for published posts:</strong></p> 96 </div> 97 <div class="col-sm-9"> 98 <div class="row"> 99 <div class="col-sm-12"> 100 <div class="row"> 101 <div class="col-sm-12 margin-top-bottom"> 102 <label for="fbia-select-all" style="margin-left:19px;"> 103 <input type="checkbox" id="fbia-select-all" class="select-all" data-platform="fbia"> Select All 104 </label> 105 </div> 106 </div> 107 <div class="well"> 96 <p class="required">To enable Instant Articles on published posts on your site, select the post types that you'd like to be converted then click "Enable FBIA".</p> 97 </div> 98 <div class="col-sm-9"> 99 <div class="row"> 100 <div class="col-sm-12"> 101 <div class="well"> 102 <div class="row"> 103 <div class="col-sm-12 margin-top-bottom"> 104 <label for="fbia-select-all"> 105 <input type="checkbox" id="fbia-select-all" class="select-all" data-platform="fbia"> Select All 106 </label> 107 </div> 108 </div> 109 <hr> 108 110 <?php foreach ( $post_types as $label => $post_type ) : ?> 109 111 <div class="row"> … … 122 124 </div> 123 125 <div class="row"> 124 <div class="col-sm-12 margin-top-bottom ">126 <div class="col-sm-12 margin-top-bottom big-margin-bottom"> 125 127 <div class="row"> 126 128 <div class="col-sm-6"><a href="#" class="button block bulk-enable-button" data-enable="1" data-platform="fbia" data-loading-icon="<?php echo plugin_dir_url( __FILE__ ) . 'images/loading.svg'; ?>">Enable FBIA</a></div> … … 138 140 <div class="col-sm-3"> 139 141 <p><strong>Default setting for new posts:</strong></p> 142 <p class="required">To enable Instant Articles for new posts, select which post types should be enabled, then click "Save All Settings" at the bottom of this page.</p> 140 143 </div> 141 144 <div class="col-sm-9"> … … 187 190 <div class="col-sm-3"> 188 191 <p><strong>Setting for published posts:</strong></p> 189 </div> 190 <div class="col-sm-9"> 191 <div class="row"> 192 <div class="col-sm-12"> 193 <div class="row"> 194 <div class="col-sm-12 margin-top-bottom"> 195 <label for="amp-select-all" style="margin-left:19px;"> 196 <input type="checkbox" id="amp-select-all" class="select-all" data-platform="amp"> Select All 197 </label> 198 </div> 199 </div> 200 <div class="well"> 192 <p class="required">To enable AMP Pages on published posts on your site, select the post types that you'd like to be converted then click "Enable AMP".</p> 193 </div> 194 <div class="col-sm-9"> 195 <div class="row"> 196 <div class="col-sm-12"> 197 <div class="well"> 198 <div class="row"> 199 <div class="col-sm-12 margin-top-bottom"> 200 <label for="amp-select-all"> 201 <input type="checkbox" id="amp-select-all" class="select-all" data-platform="amp"> Select All 202 </label> 203 </div> 204 </div> 205 <hr> 201 206 <?php foreach ( $post_types as $label => $post_type ) : ?> 202 207 <div class="row"> … … 215 220 </div> 216 221 <div class="row"> 217 <div class="col-sm-12 margin-top-bottom ">222 <div class="col-sm-12 margin-top-bottom big-margin-bottom"> 218 223 <div class="row"> 219 224 <div class="col-sm-6"><a href="#" class="button block bulk-enable-button" data-enable="1" data-platform="amp" data-loading-icon="<?php echo plugin_dir_url( __FILE__ ) . 'images/loading.svg'; ?>">Enable AMP</a></div> … … 231 236 <div class="col-sm-3"> 232 237 <p><strong>Default setting for new posts:</strong></p> 238 <p class="required">To enable AMP Pages for new posts, select which post types should be enabled, then click "Save All Settings" at the bottom of this page.</p> 233 239 </div> 234 240 <div class="col-sm-9"> -
pagefrog/trunk/admin/pagefrog-styling.php
r1357722 r1359856 373 373 374 374 function render_styling_page () { 375 $recent_posts = wp_get_recent_posts(array(), OBJECT_K); 375 $post_types = PageFrog_NewPostSettings_Storage::get_post_types(); 376 $valid_post_types = array(); 377 foreach ( $post_types as $label => $post_type ) { 378 $valid_post_types[] = $label; 379 } 380 $recent_posts = wp_get_recent_posts(array( 381 'post_type' => $valid_post_types 382 ), OBJECT_K); 376 383 377 384 -
pagefrog/trunk/includes/class-pagefrog.php
r1357722 r1359856 70 70 71 71 $this->plugin_name = 'pagefrog'; 72 $this->version = '1.0.7 ';72 $this->version = '1.0.7.1'; 73 73 74 74 $this->load_dependencies(); … … 214 214 $this->loader->add_action( 'amp_post_template_body_begin', $plugin_admin, 'add_analytics_to_amp' ); 215 215 $this->loader->add_filter( 'amp_content_sanitizers', $plugin_admin, 'add_amp_ads_sanitizer', 10, 2 ); 216 $this->loader->add_filter( 'amp_post_template_metadata', $plugin_admin, 'add_logo_to_schema_org', 10, 2 ); 216 217 217 218 // hooks for fbia rendering -
pagefrog/trunk/pagefrog.php
r1357722 r1359856 16 16 * Plugin URI: http://pagefrog.com/ 17 17 * Description: The PageFrog plugin allows you to easily publish and manage your content directly from WordPress for Facebook Instant Articles (FBIA) and Google Accelerated Mobile Pages (AMP) with full support for ads and analytics. 18 * Version: 1.0.7 18 * Version: 1.0.7.1 19 19 * Author: PageFrog Team 20 20 * Author URI: http://pagefrog.com/ -
pagefrog/trunk/public/class-pagefrog-public.php
r1338828 r1359856 46 46 public function generate_instant_articles_feed() { 47 47 48 $rss_template = PF__PLUGIN_DIR . 'templates/pagefrog-feed.php';48 $rss_template = PF__PLUGIN_DIR . 'templates/pagefrog-feed.php'; 49 49 load_template($rss_template); 50 50 }
Note: See TracChangeset
for help on using the changeset viewer.