Changeset 3011233
- Timestamp:
- 12/18/2023 09:30:38 AM (2 years ago)
- Location:
- personio-integration-light
- Files:
-
- 12 edited
- 12 copied
-
tags/2.6.1 (copied) (copied from personio-integration-light/trunk)
-
tags/2.6.1/admin (copied) (copied from personio-integration-light/trunk/admin)
-
tags/2.6.1/blocks (copied) (copied from personio-integration-light/trunk/blocks)
-
tags/2.6.1/classes (copied) (copied from personio-integration-light/trunk/classes)
-
tags/2.6.1/classes/class-helper.php (modified) (4 diffs)
-
tags/2.6.1/classes/class-import.php (modified) (2 diffs)
-
tags/2.6.1/classes/class-position.php (modified) (2 diffs)
-
tags/2.6.1/classes/class-positions.php (modified) (1 diff)
-
tags/2.6.1/css (copied) (copied from personio-integration-light/trunk/css)
-
tags/2.6.1/gfx (copied) (copied from personio-integration-light/trunk/gfx)
-
tags/2.6.1/inc (copied) (copied from personio-integration-light/trunk/inc)
-
tags/2.6.1/inc/pagebuilder/gutenberg.php (modified) (8 diffs)
-
tags/2.6.1/personio-integration-light.php (copied) (copied from personio-integration-light/trunk/personio-integration-light.php) (2 diffs)
-
tags/2.6.1/readme.txt (copied) (copied from personio-integration-light/trunk/readme.txt) (2 diffs)
-
tags/2.6.1/templates (copied) (copied from personio-integration-light/trunk/templates)
-
tags/2.6.1/uninstall.php (copied) (copied from personio-integration-light/trunk/uninstall.php)
-
tags/2.6.1/wpml-config.xml (copied) (copied from personio-integration-light/trunk/wpml-config.xml)
-
trunk/classes/class-helper.php (modified) (4 diffs)
-
trunk/classes/class-import.php (modified) (2 diffs)
-
trunk/classes/class-position.php (modified) (2 diffs)
-
trunk/classes/class-positions.php (modified) (1 diff)
-
trunk/inc/pagebuilder/gutenberg.php (modified) (8 diffs)
-
trunk/personio-integration-light.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
personio-integration-light/tags/2.6.1/classes/class-helper.php
r3003667 r3011233 8 8 namespace personioIntegration; 9 9 10 use Exception; 10 11 use WP_Post; 11 12 use WP_Post_Type; … … 651 652 } 652 653 653 /** 654 * Return the active Wordpress-language depending on our own support. 655 * If language is unknown for our plugin, use english. 656 * 657 * @return string 658 * @noinspection PhpUnused 659 */ 654 /** 655 * Return the active Wordpress-language depending on our own support. 656 * If language is unknown for our plugin, use english. 657 * 658 * @return string 659 * @noinspection PhpUnused 660 * @throws Exception 661 */ 660 662 public static function get_wp_lang(): string 661 663 { … … 676 678 } 677 679 680 /** 681 * Get main language set in weglot for the web page. 682 */ 683 if( self::is_plugin_active( 'weglot/weglot.php' ) && function_exists( 'weglot_get_service' ) ) { 684 $language_object = weglot_get_service('Language_Service_Weglot')->get_original_language(); 685 if( $language_object ) { 686 $wpLang = $language_object->getInternalCode(); 687 } 688 } 689 678 690 // if language not set, use default language. 679 691 if( empty($wpLang) ) { … … 713 725 $wpLang = apply_filters('wpml_current_language', NULL ); 714 726 } 727 728 /** 729 * Get current language set in weglot for the web page. 730 */ 731 if( self::is_plugin_active( 'weglot/weglot.php' ) && function_exists( 'weglot_get_current_language' ) ) { 732 $wpLang = weglot_get_current_language(); 733 } 715 734 716 735 // if language not set, use default language. -
personio-integration-light/tags/2.6.1/classes/class-import.php
r3003667 r3011233 86 86 foreach( $languages as $key => $enabled ) { 87 87 // define the url. 88 $url = helper::get_personio_xml_url(get_option('personioIntegrationUrl', '')).'?language=' . esc_attr($key);88 $url = apply_filters( 'personio_integration_import_url', helper::get_personio_xml_url(get_option('personioIntegrationUrl', '')).'?language=' . esc_attr($key), $key ); 89 89 90 90 // define settings for first request to get the last-modified-date. … … 122 122 123 123 // check if response was with http-status 200, all others are errors. 124 if( 200 === $httpStatus) {124 if( 200 === apply_filters( 'personio_integration_import_header_status', $httpStatus ) ) { 125 125 126 126 // check if last modified timestamp has been changed. 127 if( $lastModifiedTimestamp === absint(get_option(WP_PERSONIO_INTEGRATION_OPTION_IMPORT_TIMESTAMP . $key, 0)) && !$this->_debug ) {127 if( false !== $lastModifiedTimestamp && $lastModifiedTimestamp === absint(get_option(WP_PERSONIO_INTEGRATION_OPTION_IMPORT_TIMESTAMP . $key, 0)) && !$this->_debug ) { 128 128 // timestamp did not change -> do nothing if we already have positions in the DB. 129 129 if( $positions_count > 0 ) { -
personio-integration-light/tags/2.6.1/classes/class-position.php
r3003667 r3011233 272 272 273 273 // add created at as post meta field. 274 update_post_meta( $this->data['ID'], WP_PERSONIO_INTEGRATION_CPT_CREATEDAT, $this->data['createdAt']);274 update_post_meta( $this->data['ID'], WP_PERSONIO_INTEGRATION_CPT_CREATEDAT, strtotime($this->data['createdAt'])); 275 275 276 276 // add all language-specific titles. … … 527 527 // if old template does not exist, use the one we configured. 528 528 if( ! Helper::has_template( $template_file ) ) { 529 if( empty($template) ) { 530 $template = 'default'; 531 } 529 532 $template_file = 'parts/jobdescription/'.$template.'.php'; 530 533 } -
personio-integration-light/tags/2.6.1/classes/class-positions.php
r3003667 r3011233 91 91 $query['order'] = $parameterToAdd['sort']; 92 92 } 93 if( !empty($parameterToAdd['sortby']) && in_array($parameterToAdd['sortby'], ['title','date'])) {93 if( !empty($parameterToAdd['sortby']) && 'title' === $parameterToAdd['sortby'] ) { 94 94 $query['orderby'] = $parameterToAdd['sortby']; 95 } 95 $query['personio_explicit_sort'] = 1; 96 } 97 if( !empty($parameterToAdd['sortby']) && 'date' === $parameterToAdd['sortby'] ) { 98 $query['meta_key'] = WP_PERSONIO_INTEGRATION_CPT_CREATEDAT; 99 $query['orderby'] = 'meta_value'; 100 $query['personio_explicit_sort'] = 1; 101 } 96 102 if( !empty($parameterToAdd['personioid']) ) { 97 103 $query['meta_query'] = [ -
personio-integration-light/tags/2.6.1/inc/pagebuilder/gutenberg.php
r3003667 r3011233 27 27 28 28 // get block-classes 29 $block_html_attributes = get_block_wrapper_attributes(); 30 31 // get styles 32 $stylesArray = array(); 33 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 34 if( !empty($styles) ) { 35 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 36 } 29 $stylesArray = array(); 30 $block_html_attributes = ''; 31 if( function_exists( 'get_block_wrapper_attributes' ) ) { 32 $block_html_attributes = get_block_wrapper_attributes(); 33 34 // get styles 35 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 36 if (!empty($styles)) { 37 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 38 } 39 } 37 40 38 41 $attribute_defaults = array( … … 77 80 78 81 // get block-classes. 79 $block_html_attributes = get_block_wrapper_attributes(); 80 81 // get styles. 82 $stylesArray = array(); 83 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 84 if( !empty($styles) ) { 85 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 86 } 87 if (!empty($attributes['style']) && !empty($attributes['style']['spacing']) && !empty($attributes['style']['spacing']['blockGap'])) { 88 $value = $attributes['style']['spacing']['blockGap']; 89 // convert var-setting to var-style-entity 90 if( false !== strpos($attributes['style']['spacing']['blockGap'], 'var:') ) { 91 $value = str_replace('|', '--', $value); 92 $value = str_replace('var:', '', $value); 93 $value = 'var(--wp--' . $value . ')'; 94 } 95 $stylesArray[] = 'body .' . $class . ' { margin-bottom: ' . $value . '; }'; 96 } 82 $stylesArray = array(); 83 $block_html_attributes = ''; 84 if( function_exists( 'get_block_wrapper_attributes' ) ) { 85 $block_html_attributes = get_block_wrapper_attributes(); 86 87 // get styles. 88 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 89 if (!empty($styles)) { 90 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 91 } 92 if (!empty($attributes['style']) && !empty($attributes['style']['spacing']) && !empty($attributes['style']['spacing']['blockGap'])) { 93 $value = $attributes['style']['spacing']['blockGap']; 94 // convert var-setting to var-style-entity 95 if (false !== strpos($attributes['style']['spacing']['blockGap'], 'var:')) { 96 $value = str_replace('|', '--', $value); 97 $value = str_replace('var:', '', $value); 98 $value = 'var(--wp--' . $value . ')'; 99 } 100 $stylesArray[] = 'body .' . $class . ' { margin-bottom: ' . $value . '; }'; 101 } 102 } 97 103 98 104 // collect all settings for this block … … 131 137 132 138 // get block-classes 133 $block_html_attributes = get_block_wrapper_attributes(); 134 135 // get styles 136 $stylesArray = []; 137 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 138 if( !empty($styles) ) { 139 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 140 } 141 142 $stylesArray = []; 143 if( !empty($class) ) { 144 if (!empty($attributes['hideResetLink'])) { 145 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-reset { display: none }'; 146 } 147 if (!empty($attributes['hideFilterTitle'])) { 148 $stylesArray[] = '.entry.' . $class . ' legend { display: none }'; 149 } 150 if (!empty($attributes['space_between'])) { 151 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-linklist > div { margin-right: ' . $attributes['space_between'] . 'px }'; 152 } 153 } 139 $stylesArray = array(); 140 $block_html_attributes = ''; 141 if( function_exists( 'get_block_wrapper_attributes' ) ) { 142 $block_html_attributes = get_block_wrapper_attributes(); 143 144 // get styles 145 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 146 if (!empty($styles)) { 147 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 148 } 149 150 if (!empty($class)) { 151 if (!empty($attributes['hideResetLink'])) { 152 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-reset { display: none }'; 153 } 154 if (!empty($attributes['hideFilterTitle'])) { 155 $stylesArray[] = '.entry.' . $class . ' legend { display: none }'; 156 } 157 if (!empty($attributes['space_between'])) { 158 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-linklist > div { margin-right: ' . $attributes['space_between'] . 'px }'; 159 } 160 } 161 } 154 162 155 163 // collect all settings for this block … … 180 188 181 189 // get block-classes 182 $block_html_attributes = get_block_wrapper_attributes(); 183 184 // get styles 185 $stylesArray = []; 186 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 187 if( !empty($styles) ) { 188 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 189 } 190 191 $stylesArray = []; 192 if( !empty($class) ) { 193 if (!empty($attributes['hideResetLink'])) { 194 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-reset { display: none }'; 195 } 196 if (!empty($attributes['hideSubmitButton'])) { 197 $stylesArray[] = '.entry.' . $class . ' button { display: none }'; 198 } 199 if (!empty($attributes['hideFilterTitle'])) { 200 $stylesArray[] = '.entry.' . $class . ' legend { display: none }'; 201 } 202 } 190 $stylesArray = array(); 191 $block_html_attributes = ''; 192 if( function_exists( 'get_block_wrapper_attributes' ) ) { 193 $block_html_attributes = get_block_wrapper_attributes(); 194 195 // get styles 196 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 197 if (!empty($styles)) { 198 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 199 } 200 201 if (!empty($class)) { 202 if (!empty($attributes['hideResetLink'])) { 203 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-reset { display: none }'; 204 } 205 if (!empty($attributes['hideSubmitButton'])) { 206 $stylesArray[] = '.entry.' . $class . ' button { display: none }'; 207 } 208 if (!empty($attributes['hideFilterTitle'])) { 209 $stylesArray[] = '.entry.' . $class . ' legend { display: none }'; 210 } 211 } 212 } 203 213 204 214 // collect all settings for this block 205 $attributes = [215 $attributes = array( 206 216 'templates' => '', 207 217 'filter' => implode(",", $attributes['filter']), … … 210 220 'styles' => implode(PHP_EOL, $stylesArray), 211 221 'classes' => $class.' '.helper::get_attribute_value_from_html('class', $block_html_attributes) 212 ];222 ); 213 223 214 224 // get the output … … 263 273 264 274 // get block-classes. 265 $block_html_attributes = get_block_wrapper_attributes(); 266 267 // get styles. 268 $stylesArray = array(); 269 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 270 if( !empty($styles) ) { 271 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 272 } 275 $stylesArray = array(); 276 $block_html_attributes = ''; 277 if( function_exists( 'get_block_wrapper_attributes' ) ) { 278 $block_html_attributes = get_block_wrapper_attributes(); 279 280 // get styles. 281 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 282 if (!empty($styles)) { 283 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 284 } 285 } 273 286 274 287 $attributes = array( … … 556 569 557 570 // register translations. 558 wp_set_script_translations('wp-personio-integration-show-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 559 wp_set_script_translations('wp-personio-integration-list-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 560 wp_set_script_translations('wp-personio-integration-filter-list-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 561 wp_set_script_translations('wp-personio-integration-filter-select-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 562 wp_set_script_translations('wp-personio-integration-application-button-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 563 wp_set_script_translations('wp-personio-integration-details-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 564 wp_set_script_translations('wp-personio-integration-description-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 571 if( function_exists( 'wp_set_script_translations' ) ) { 572 wp_set_script_translations('wp-personio-integration-show-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 573 wp_set_script_translations('wp-personio-integration-list-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 574 wp_set_script_translations('wp-personio-integration-filter-list-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 575 wp_set_script_translations('wp-personio-integration-filter-select-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 576 wp_set_script_translations('wp-personio-integration-application-button-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 577 wp_set_script_translations('wp-personio-integration-details-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 578 wp_set_script_translations('wp-personio-integration-description-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 579 } 565 580 } 566 581 } … … 699 714 700 715 // get block-classes. 701 $block_html_attributes = get_block_wrapper_attributes(); 702 703 // get styles. 704 $stylesArray = array(); 705 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 706 if( !empty($styles) ) { 707 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 708 } 716 $stylesArray = array(); 717 $block_html_attributes = ''; 718 if( function_exists( 'get_block_wrapper_attributes' ) ) { 719 $block_html_attributes = get_block_wrapper_attributes(); 720 721 // get styles. 722 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 723 if (!empty($styles)) { 724 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 725 } 726 } 709 727 710 728 $attributes = array( -
personio-integration-light/tags/2.6.1/personio-integration-light.php
r3003667 r3011233 5 5 * Requires at least: 5.9 6 6 * Requires PHP: 7.4 7 * Version: 2.6. 07 * Version: 2.6.1 8 8 * Author: laOlaWeb 9 9 * Author URI: https://laolaweb.com … … 16 16 17 17 // set version number 18 const WP_PERSONIO_INTEGRATION_VERSION = '2.6. 0';18 const WP_PERSONIO_INTEGRATION_VERSION = '2.6.1'; 19 19 20 20 // save plugin-path -
personio-integration-light/tags/2.6.1/readme.txt
r3003667 r3011233 3 3 Tags: personio, jobs, recruitment, employee 4 4 Requires at least: 5.9.3 5 Tested up to: 6.4. 15 Tested up to: 6.4.2 6 6 Requires PHP: 7.4 7 7 License: GPL-2.0-or-later … … 340 340 * Fixed possible bug on archive page if job description is enabled there 341 341 * Fixed visibility of text domain hint if Pro plugin is used 342 343 = 2.6.1 = 344 * Added support for multilingual-plugin Weglot to detect the active language 345 * Added new hooks 346 * Changed import-format for createAt to UNIX-timestamp 347 * Sort by date now sort the positions by its createAt-value from Personio 348 * Better check for third party functions 349 * Compatibility with WordPress 6.4.2 350 * Fixed missing styles with some blocks in Block Editor -
personio-integration-light/trunk/classes/class-helper.php
r3003667 r3011233 8 8 namespace personioIntegration; 9 9 10 use Exception; 10 11 use WP_Post; 11 12 use WP_Post_Type; … … 651 652 } 652 653 653 /** 654 * Return the active Wordpress-language depending on our own support. 655 * If language is unknown for our plugin, use english. 656 * 657 * @return string 658 * @noinspection PhpUnused 659 */ 654 /** 655 * Return the active Wordpress-language depending on our own support. 656 * If language is unknown for our plugin, use english. 657 * 658 * @return string 659 * @noinspection PhpUnused 660 * @throws Exception 661 */ 660 662 public static function get_wp_lang(): string 661 663 { … … 676 678 } 677 679 680 /** 681 * Get main language set in weglot for the web page. 682 */ 683 if( self::is_plugin_active( 'weglot/weglot.php' ) && function_exists( 'weglot_get_service' ) ) { 684 $language_object = weglot_get_service('Language_Service_Weglot')->get_original_language(); 685 if( $language_object ) { 686 $wpLang = $language_object->getInternalCode(); 687 } 688 } 689 678 690 // if language not set, use default language. 679 691 if( empty($wpLang) ) { … … 713 725 $wpLang = apply_filters('wpml_current_language', NULL ); 714 726 } 727 728 /** 729 * Get current language set in weglot for the web page. 730 */ 731 if( self::is_plugin_active( 'weglot/weglot.php' ) && function_exists( 'weglot_get_current_language' ) ) { 732 $wpLang = weglot_get_current_language(); 733 } 715 734 716 735 // if language not set, use default language. -
personio-integration-light/trunk/classes/class-import.php
r3003667 r3011233 86 86 foreach( $languages as $key => $enabled ) { 87 87 // define the url. 88 $url = helper::get_personio_xml_url(get_option('personioIntegrationUrl', '')).'?language=' . esc_attr($key);88 $url = apply_filters( 'personio_integration_import_url', helper::get_personio_xml_url(get_option('personioIntegrationUrl', '')).'?language=' . esc_attr($key), $key ); 89 89 90 90 // define settings for first request to get the last-modified-date. … … 122 122 123 123 // check if response was with http-status 200, all others are errors. 124 if( 200 === $httpStatus) {124 if( 200 === apply_filters( 'personio_integration_import_header_status', $httpStatus ) ) { 125 125 126 126 // check if last modified timestamp has been changed. 127 if( $lastModifiedTimestamp === absint(get_option(WP_PERSONIO_INTEGRATION_OPTION_IMPORT_TIMESTAMP . $key, 0)) && !$this->_debug ) {127 if( false !== $lastModifiedTimestamp && $lastModifiedTimestamp === absint(get_option(WP_PERSONIO_INTEGRATION_OPTION_IMPORT_TIMESTAMP . $key, 0)) && !$this->_debug ) { 128 128 // timestamp did not change -> do nothing if we already have positions in the DB. 129 129 if( $positions_count > 0 ) { -
personio-integration-light/trunk/classes/class-position.php
r3003667 r3011233 272 272 273 273 // add created at as post meta field. 274 update_post_meta( $this->data['ID'], WP_PERSONIO_INTEGRATION_CPT_CREATEDAT, $this->data['createdAt']);274 update_post_meta( $this->data['ID'], WP_PERSONIO_INTEGRATION_CPT_CREATEDAT, strtotime($this->data['createdAt'])); 275 275 276 276 // add all language-specific titles. … … 527 527 // if old template does not exist, use the one we configured. 528 528 if( ! Helper::has_template( $template_file ) ) { 529 if( empty($template) ) { 530 $template = 'default'; 531 } 529 532 $template_file = 'parts/jobdescription/'.$template.'.php'; 530 533 } -
personio-integration-light/trunk/classes/class-positions.php
r3003667 r3011233 91 91 $query['order'] = $parameterToAdd['sort']; 92 92 } 93 if( !empty($parameterToAdd['sortby']) && in_array($parameterToAdd['sortby'], ['title','date'])) {93 if( !empty($parameterToAdd['sortby']) && 'title' === $parameterToAdd['sortby'] ) { 94 94 $query['orderby'] = $parameterToAdd['sortby']; 95 } 95 $query['personio_explicit_sort'] = 1; 96 } 97 if( !empty($parameterToAdd['sortby']) && 'date' === $parameterToAdd['sortby'] ) { 98 $query['meta_key'] = WP_PERSONIO_INTEGRATION_CPT_CREATEDAT; 99 $query['orderby'] = 'meta_value'; 100 $query['personio_explicit_sort'] = 1; 101 } 96 102 if( !empty($parameterToAdd['personioid']) ) { 97 103 $query['meta_query'] = [ -
personio-integration-light/trunk/inc/pagebuilder/gutenberg.php
r3003667 r3011233 27 27 28 28 // get block-classes 29 $block_html_attributes = get_block_wrapper_attributes(); 30 31 // get styles 32 $stylesArray = array(); 33 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 34 if( !empty($styles) ) { 35 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 36 } 29 $stylesArray = array(); 30 $block_html_attributes = ''; 31 if( function_exists( 'get_block_wrapper_attributes' ) ) { 32 $block_html_attributes = get_block_wrapper_attributes(); 33 34 // get styles 35 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 36 if (!empty($styles)) { 37 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 38 } 39 } 37 40 38 41 $attribute_defaults = array( … … 77 80 78 81 // get block-classes. 79 $block_html_attributes = get_block_wrapper_attributes(); 80 81 // get styles. 82 $stylesArray = array(); 83 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 84 if( !empty($styles) ) { 85 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 86 } 87 if (!empty($attributes['style']) && !empty($attributes['style']['spacing']) && !empty($attributes['style']['spacing']['blockGap'])) { 88 $value = $attributes['style']['spacing']['blockGap']; 89 // convert var-setting to var-style-entity 90 if( false !== strpos($attributes['style']['spacing']['blockGap'], 'var:') ) { 91 $value = str_replace('|', '--', $value); 92 $value = str_replace('var:', '', $value); 93 $value = 'var(--wp--' . $value . ')'; 94 } 95 $stylesArray[] = 'body .' . $class . ' { margin-bottom: ' . $value . '; }'; 96 } 82 $stylesArray = array(); 83 $block_html_attributes = ''; 84 if( function_exists( 'get_block_wrapper_attributes' ) ) { 85 $block_html_attributes = get_block_wrapper_attributes(); 86 87 // get styles. 88 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 89 if (!empty($styles)) { 90 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 91 } 92 if (!empty($attributes['style']) && !empty($attributes['style']['spacing']) && !empty($attributes['style']['spacing']['blockGap'])) { 93 $value = $attributes['style']['spacing']['blockGap']; 94 // convert var-setting to var-style-entity 95 if (false !== strpos($attributes['style']['spacing']['blockGap'], 'var:')) { 96 $value = str_replace('|', '--', $value); 97 $value = str_replace('var:', '', $value); 98 $value = 'var(--wp--' . $value . ')'; 99 } 100 $stylesArray[] = 'body .' . $class . ' { margin-bottom: ' . $value . '; }'; 101 } 102 } 97 103 98 104 // collect all settings for this block … … 131 137 132 138 // get block-classes 133 $block_html_attributes = get_block_wrapper_attributes(); 134 135 // get styles 136 $stylesArray = []; 137 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 138 if( !empty($styles) ) { 139 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 140 } 141 142 $stylesArray = []; 143 if( !empty($class) ) { 144 if (!empty($attributes['hideResetLink'])) { 145 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-reset { display: none }'; 146 } 147 if (!empty($attributes['hideFilterTitle'])) { 148 $stylesArray[] = '.entry.' . $class . ' legend { display: none }'; 149 } 150 if (!empty($attributes['space_between'])) { 151 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-linklist > div { margin-right: ' . $attributes['space_between'] . 'px }'; 152 } 153 } 139 $stylesArray = array(); 140 $block_html_attributes = ''; 141 if( function_exists( 'get_block_wrapper_attributes' ) ) { 142 $block_html_attributes = get_block_wrapper_attributes(); 143 144 // get styles 145 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 146 if (!empty($styles)) { 147 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 148 } 149 150 if (!empty($class)) { 151 if (!empty($attributes['hideResetLink'])) { 152 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-reset { display: none }'; 153 } 154 if (!empty($attributes['hideFilterTitle'])) { 155 $stylesArray[] = '.entry.' . $class . ' legend { display: none }'; 156 } 157 if (!empty($attributes['space_between'])) { 158 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-linklist > div { margin-right: ' . $attributes['space_between'] . 'px }'; 159 } 160 } 161 } 154 162 155 163 // collect all settings for this block … … 180 188 181 189 // get block-classes 182 $block_html_attributes = get_block_wrapper_attributes(); 183 184 // get styles 185 $stylesArray = []; 186 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 187 if( !empty($styles) ) { 188 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 189 } 190 191 $stylesArray = []; 192 if( !empty($class) ) { 193 if (!empty($attributes['hideResetLink'])) { 194 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-reset { display: none }'; 195 } 196 if (!empty($attributes['hideSubmitButton'])) { 197 $stylesArray[] = '.entry.' . $class . ' button { display: none }'; 198 } 199 if (!empty($attributes['hideFilterTitle'])) { 200 $stylesArray[] = '.entry.' . $class . ' legend { display: none }'; 201 } 202 } 190 $stylesArray = array(); 191 $block_html_attributes = ''; 192 if( function_exists( 'get_block_wrapper_attributes' ) ) { 193 $block_html_attributes = get_block_wrapper_attributes(); 194 195 // get styles 196 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 197 if (!empty($styles)) { 198 $stylesArray[] = '.' . $class . ' { ' . $styles . ' }'; 199 } 200 201 if (!empty($class)) { 202 if (!empty($attributes['hideResetLink'])) { 203 $stylesArray[] = '.entry.' . $class . ' .personio-position-filter-reset { display: none }'; 204 } 205 if (!empty($attributes['hideSubmitButton'])) { 206 $stylesArray[] = '.entry.' . $class . ' button { display: none }'; 207 } 208 if (!empty($attributes['hideFilterTitle'])) { 209 $stylesArray[] = '.entry.' . $class . ' legend { display: none }'; 210 } 211 } 212 } 203 213 204 214 // collect all settings for this block 205 $attributes = [215 $attributes = array( 206 216 'templates' => '', 207 217 'filter' => implode(",", $attributes['filter']), … … 210 220 'styles' => implode(PHP_EOL, $stylesArray), 211 221 'classes' => $class.' '.helper::get_attribute_value_from_html('class', $block_html_attributes) 212 ];222 ); 213 223 214 224 // get the output … … 263 273 264 274 // get block-classes. 265 $block_html_attributes = get_block_wrapper_attributes(); 266 267 // get styles. 268 $stylesArray = array(); 269 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 270 if( !empty($styles) ) { 271 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 272 } 275 $stylesArray = array(); 276 $block_html_attributes = ''; 277 if( function_exists( 'get_block_wrapper_attributes' ) ) { 278 $block_html_attributes = get_block_wrapper_attributes(); 279 280 // get styles. 281 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 282 if (!empty($styles)) { 283 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 284 } 285 } 273 286 274 287 $attributes = array( … … 556 569 557 570 // register translations. 558 wp_set_script_translations('wp-personio-integration-show-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 559 wp_set_script_translations('wp-personio-integration-list-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 560 wp_set_script_translations('wp-personio-integration-filter-list-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 561 wp_set_script_translations('wp-personio-integration-filter-select-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 562 wp_set_script_translations('wp-personio-integration-application-button-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 563 wp_set_script_translations('wp-personio-integration-details-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 564 wp_set_script_translations('wp-personio-integration-description-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 571 if( function_exists( 'wp_set_script_translations' ) ) { 572 wp_set_script_translations('wp-personio-integration-show-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 573 wp_set_script_translations('wp-personio-integration-list-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 574 wp_set_script_translations('wp-personio-integration-filter-list-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 575 wp_set_script_translations('wp-personio-integration-filter-select-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 576 wp_set_script_translations('wp-personio-integration-application-button-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 577 wp_set_script_translations('wp-personio-integration-details-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 578 wp_set_script_translations('wp-personio-integration-description-editor-script', 'personio-integration-light', trailingslashit(plugin_dir_path(WP_PERSONIO_INTEGRATION_PLUGIN)) . 'languages/'); 579 } 565 580 } 566 581 } … … 699 714 700 715 // get block-classes. 701 $block_html_attributes = get_block_wrapper_attributes(); 702 703 // get styles. 704 $stylesArray = array(); 705 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 706 if( !empty($styles) ) { 707 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 708 } 716 $stylesArray = array(); 717 $block_html_attributes = ''; 718 if( function_exists( 'get_block_wrapper_attributes' ) ) { 719 $block_html_attributes = get_block_wrapper_attributes(); 720 721 // get styles. 722 $styles = helper::get_attribute_value_from_html('style', $block_html_attributes); 723 if (!empty($styles)) { 724 $stylesArray[] = '.entry.' . $class . ' { ' . $styles . ' }'; 725 } 726 } 709 727 710 728 $attributes = array( -
personio-integration-light/trunk/personio-integration-light.php
r3003667 r3011233 5 5 * Requires at least: 5.9 6 6 * Requires PHP: 7.4 7 * Version: 2.6. 07 * Version: 2.6.1 8 8 * Author: laOlaWeb 9 9 * Author URI: https://laolaweb.com … … 16 16 17 17 // set version number 18 const WP_PERSONIO_INTEGRATION_VERSION = '2.6. 0';18 const WP_PERSONIO_INTEGRATION_VERSION = '2.6.1'; 19 19 20 20 // save plugin-path -
personio-integration-light/trunk/readme.txt
r3003667 r3011233 3 3 Tags: personio, jobs, recruitment, employee 4 4 Requires at least: 5.9.3 5 Tested up to: 6.4. 15 Tested up to: 6.4.2 6 6 Requires PHP: 7.4 7 7 License: GPL-2.0-or-later … … 340 340 * Fixed possible bug on archive page if job description is enabled there 341 341 * Fixed visibility of text domain hint if Pro plugin is used 342 343 = 2.6.1 = 344 * Added support for multilingual-plugin Weglot to detect the active language 345 * Added new hooks 346 * Changed import-format for createAt to UNIX-timestamp 347 * Sort by date now sort the positions by its createAt-value from Personio 348 * Better check for third party functions 349 * Compatibility with WordPress 6.4.2 350 * Fixed missing styles with some blocks in Block Editor
Note: See TracChangeset
for help on using the changeset viewer.