Changeset 3079629
- Timestamp:
- 04/30/2024 07:36:55 PM (2 years ago)
- Location:
- skyword-publishing-api/tags
- Files:
-
- 2 edited
- 16 copied
-
1.0.9/php/routes/class-skyword-authors.php (modified) (2 diffs)
-
1.1.1 (copied) (copied from skyword-publishing-api/trunk)
-
1.1.1/php/class-skyword-opengraph.php (copied) (copied from skyword-publishing-api/trunk/php/class-skyword-opengraph.php)
-
1.1.1/php/class-skyword-publish.php (copied) (copied from skyword-publishing-api/trunk/php/class-skyword-publish.php)
-
1.1.1/php/class-skyword-shortcode.php (copied) (copied from skyword-publishing-api/trunk/php/class-skyword-shortcode.php)
-
1.1.1/php/class-skyword-sitemaps.php (copied) (copied from skyword-publishing-api/trunk/php/class-skyword-sitemaps.php)
-
1.1.1/php/options.php (modified) (3 diffs)
-
1.1.1/php/routes/class-skyword-authors.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-authors.php)
-
1.1.1/php/routes/class-skyword-categories.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-categories.php)
-
1.1.1/php/routes/class-skyword-content-types.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-content-types.php)
-
1.1.1/php/routes/class-skyword-images.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-images.php)
-
1.1.1/php/routes/class-skyword-posts.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-posts.php)
-
1.1.1/php/routes/class-skyword-support.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-support.php)
-
1.1.1/php/routes/class-skyword-tags.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-tags.php)
-
1.1.1/php/routes/class-skyword-taxonomies.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-taxonomies.php)
-
1.1.1/php/routes/class-skyword-version.php (copied) (copied from skyword-publishing-api/trunk/php/routes/class-skyword-version.php)
-
1.1.1/readme.txt (copied) (copied from skyword-publishing-api/trunk/readme.txt) (1 diff)
-
1.1.1/skyword.php (copied) (copied from skyword-publishing-api/trunk/skyword.php) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
skyword-publishing-api/tags/1.0.9/php/routes/class-skyword-authors.php
r3000257 r3079629 147 147 $guest_author['first_name'] = $data['firstName']; 148 148 $guest_author['last_name'] = $data['lastName']; 149 $guest_author['user_login'] = $newUsername; 149 if ($options['skyword_coauthors_friendly_slugs']) { 150 $guest_author['user_login'] = $this->generate_author_slug($data); 151 } else { 152 $guest_author['user_login'] = $newUsername; 153 } 150 154 $guest_author['user_email'] = $newUsername . "@skyword.com"; 151 155 $guest_author['description'] = array_key_exists('bio', $data) ? $data['bio'] : 'None'; … … 264 268 return new WP_REST_Response($responseData, 200); 265 269 } 270 /** 271 * Generate a slug based on the author byline 272 */ 273 private function generate_author_slug( $data ) { 274 return sanitize_text_field(mb_strtolower(str_replace(' ', '-', $data['byline']))); 275 } 276 266 277 } 278 267 279 268 280 global $skyword_authors; -
skyword-publishing-api/tags/1.1.1/php/options.php
r2937111 r3079629 67 67 add_settings_section( 'skyword_generate_new_users_section', 'Create WordPress User accounts for new authors', 'skyword_api_plugin_section_text', __FILE__ ); 68 68 add_settings_field( 'skyword_api_generate_new_users_automatically', ' ', 'skyword_api_generate_new_users_automatically_input', __FILE__, 'skyword_generate_new_users_section' ); 69 add_settings_field( 'skyword_coauthors_friendly_slugs', ' ', 'skyword_coauthors_friendly_slugs_input', __FILE__, 'skyword_generate_new_users_section' ); 69 70 } 70 71 … … 134 135 } 135 136 137 function skyword_coauthors_friendly_slugs_input() { 138 global $coauthors_plus; 139 $options = get_option( 'skyword_api_plugin_options' ); 140 141 if(null !== $coauthors_plus) 142 echo '<input type="checkbox" id="friendly_slugs" name="skyword_api_plugin_options[skyword_coauthors_friendly_slugs]" value="1" ' . checked( 1, $options['skyword_coauthors_friendly_slugs'], false ) . '/> (BETA) Assign meaningful slugs to Coauthors Plus author pages.<p>New Coauthors Plus pages will receive a slug for their page based on their byline.</p>'; 143 else 144 echo '<input type="checkbox" id="friendly_slugs" name="skyword_api_plugin_options[skyword_coauthors_friendly_slugs]" value="1" ' . checked( 1, $options['skyword_coauthors_friendly_slugs'], false ) . ' disabled/><span style="color:lightgrey"> (BETA) Assign meaningful slugs to Coauthors Plus author pages. (Co-Authors Plus plugin disabled, so this option has been disabled)</span><p style="color:lightgrey">New Coauthors Plus pages will receive a slug for their page based on their byline.</p>'; 145 } 146 136 147 function skyword_api_plugin_options_validate( $input ) { 137 148 $options = get_option( 'skyword_api_plugin_options' ); … … 148 159 $options['skyword_api_generate_tags_sitemaps'] = empty( $input['skyword_api_generate_tags_sitemaps'] ) ? false : true; 149 160 $options['skyword_api_generate_new_users_automatically'] = empty( $input['skyword_api_generate_new_users_automatically'] ) ? false : true; 161 $options['skyword_coauthors_friendly_slugs'] = empty( $input['skyword_coauthors_friendly_slugs'] ) ? false : true; 150 162 151 163 return $options; -
skyword-publishing-api/tags/1.1.1/readme.txt
r3078729 r3079629 22 22 == Changelog == 23 23 24 = 1.1.1 = 25 * Friendly slug for Coauthors Plus plugin 26 24 27 = 1.1.0 = 25 28 * Updates to fix warnings -
skyword-publishing-api/tags/1.1.1/skyword.php
r3078729 r3079629 3 3 Plugin Name: Skyword Publishing API 4 4 Description: Integration with the Skyword360 content publication platform. 5 Version: 1.1. 05 Version: 1.1.1 6 6 Author: Skyword, Inc. 7 7 Author URI: http://www.skyword.com … … 17 17 define( 'SKYWORD_REST_API_VERSION', "Skyword REST API plugin " . $plugin_version ); 18 18 if ( !defined('SKYWORD_VN') ) 19 define( 'SKYWORD_VN', "1.1 " ); //This CANNOT have two decimal places.19 define( 'SKYWORD_VN', "1.11" ); //This CANNOT have two decimal places. 20 20 //.1.4 is NOT valid. 21 21
Note: See TracChangeset
for help on using the changeset viewer.