Changeset 3071590
- Timestamp:
- 04/16/2024 12:33:23 PM (2 years ago)
- Location:
- wallkit
- Files:
-
- 8 edited
- 1 copied
-
tags/3.3.4 (copied) (copied from wallkit/trunk)
-
tags/3.3.4/admin/class-wallkit-wp-admin.php (modified) (4 diffs)
-
tags/3.3.4/includes/class-wallkit-wp-loader.php (modified) (1 diff)
-
tags/3.3.4/readme.txt (modified) (1 diff)
-
tags/3.3.4/wallkit-wp.php (modified) (2 diffs)
-
trunk/admin/class-wallkit-wp-admin.php (modified) (4 diffs)
-
trunk/includes/class-wallkit-wp-loader.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wallkit-wp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wallkit/tags/3.3.4/admin/class-wallkit-wp-admin.php
r3067043 r3071590 481 481 */ 482 482 private function get_content_intro_paragraph($content, $cut_paragraph_count = 1) { 483 if($cut_paragraph_count < 0) { 484 return force_balance_tags( apply_filters('wallkit_customize_post_locked_content', $content) ); 485 } 483 486 484 487 $parts = explode("</p>", $content); … … 503 506 */ 504 507 private function get_content_body_paragraph($content, $cut_paragraph_count = 1) { 508 if($cut_paragraph_count < 0) { 509 return force_balance_tags( apply_filters('wallkit_customize_post_locked_content', '') ); 510 } 505 511 506 512 $parts = explode("</p>", $content); … … 534 540 ->get_option("wk_free_paragraph", 1); 535 541 536 $source_content = $ content;542 $source_content = $this->get_formatted_content($content); 537 543 $content = '<div class="wpwp-non-paywall">' . $this->get_content_intro_paragraph($source_content, $cut_paragraph_count) . '</div>'; 538 544 … … 571 577 572 578 return $result_content; 579 } 580 581 /** 582 * Formatting content before split on parts 583 * 584 * @since 3.3.4 585 * 586 * @param string $content The text which has to be formatted. 587 * @return string 588 */ 589 public function get_formatted_content($content) { 590 $blocks = parse_blocks( $content ); 591 $output = ''; 592 593 foreach ( $blocks as $block ) { 594 $output .= render_block( $block ); 595 } 596 597 // Returning formatted content if it contains gutenberg blocks 598 if( has_blocks( $content ) ) { 599 return $output; 600 } 601 602 //If content do not contains gutenberg blocks format it with wpautop function. 603 return wpautop($content); 573 604 } 574 605 -
wallkit/tags/3.3.4/includes/class-wallkit-wp-loader.php
r2394301 r3071590 94 94 } 95 95 96 97 /** 98 * Add immediately filter. 99 * 100 * @since 3.3.4 101 * 102 * @param string $hook The name of the WordPress filter that is being registered. 103 * @param object $component A reference to the instance of the object on which the filter is defined. 104 * @param string $callback The name of the function definition on the $component. 105 * @return void 106 */ 107 public function add_immediately_filter( $hook, $component, $callback ) { 108 if($hook = $this->search_filter($hook, $component, $callback ) ) { 109 add_filter( ...$hook ); 110 } 111 } 112 113 /** 114 * Remove registered filter. 115 * 116 * @since 3.3.4 117 * 118 * @param string $hook The name of the WordPress filter that is being registered. 119 * @param object $component A reference to the instance of the object on which the filter is defined. 120 * @param string $callback The name of the function definition on the $component. 121 * @return void 122 */ 123 public function remove_filter( $hook, $component, $callback ) { 124 if($hook = $this->search_filter($hook, $component, $callback ) ) { 125 remove_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority']); 126 } 127 } 128 129 /** 130 * Search registered filter. 131 * 132 * @since 3.3.4 133 * 134 * @param string $hook The name of the WordPress filter that is being registered. 135 * @param object $component A reference to the instance of the object on which the filter is defined. 136 * @param string $callback The name of the function definition on the $component. 137 * @return bool|mixed 138 * 139 */ 140 public function search_filter( $hook, $component, $callback ) { 141 foreach ($this->filters as $filter) { 142 if($filter['hook'] === $hook 143 && $filter['component'] === $component 144 && $filter['callback'] === $callback) { 145 return $filter; 146 } 147 148 } 149 150 return false; 151 } 152 96 153 /** 97 154 * @param $page_title -
wallkit/tags/3.3.4/readme.txt
r3067043 r3071590 28 28 == Changelog == 29 29 30 = 3.3.4 = 31 *Release Date - 08 April 2024* 32 33 #### Updates including: 34 - Fixed paywall position with using classic or gutenberg editors. 35 30 36 = 3.3.3 = 31 37 *Release Date - 08 April 2024* -
wallkit/tags/3.3.4/wallkit-wp.php
r3067043 r3071590 10 10 * Plugin URI: https://wallkit.net 11 11 * Description: A Plug & Play paid-content system to manage subscribers, gather fees and drive additional content sales. 12 * Version: 3.3. 312 * Version: 3.3.4 13 13 * Author: Wallkit <dev@wallkit.net> 14 14 * Author URI: https://wallkit.net/ … … 27 27 * Rename this for your plugin and update it as you release new versions. 28 28 */ 29 define( 'WPWKP_VERSION', '3.3. 3' );29 define( 'WPWKP_VERSION', '3.3.4' ); 30 30 31 31 /** -
wallkit/trunk/admin/class-wallkit-wp-admin.php
r3067043 r3071590 481 481 */ 482 482 private function get_content_intro_paragraph($content, $cut_paragraph_count = 1) { 483 if($cut_paragraph_count < 0) { 484 return force_balance_tags( apply_filters('wallkit_customize_post_locked_content', $content) ); 485 } 483 486 484 487 $parts = explode("</p>", $content); … … 503 506 */ 504 507 private function get_content_body_paragraph($content, $cut_paragraph_count = 1) { 508 if($cut_paragraph_count < 0) { 509 return force_balance_tags( apply_filters('wallkit_customize_post_locked_content', '') ); 510 } 505 511 506 512 $parts = explode("</p>", $content); … … 534 540 ->get_option("wk_free_paragraph", 1); 535 541 536 $source_content = $ content;542 $source_content = $this->get_formatted_content($content); 537 543 $content = '<div class="wpwp-non-paywall">' . $this->get_content_intro_paragraph($source_content, $cut_paragraph_count) . '</div>'; 538 544 … … 571 577 572 578 return $result_content; 579 } 580 581 /** 582 * Formatting content before split on parts 583 * 584 * @since 3.3.4 585 * 586 * @param string $content The text which has to be formatted. 587 * @return string 588 */ 589 public function get_formatted_content($content) { 590 $blocks = parse_blocks( $content ); 591 $output = ''; 592 593 foreach ( $blocks as $block ) { 594 $output .= render_block( $block ); 595 } 596 597 // Returning formatted content if it contains gutenberg blocks 598 if( has_blocks( $content ) ) { 599 return $output; 600 } 601 602 //If content do not contains gutenberg blocks format it with wpautop function. 603 return wpautop($content); 573 604 } 574 605 -
wallkit/trunk/includes/class-wallkit-wp-loader.php
r2394301 r3071590 94 94 } 95 95 96 97 /** 98 * Add immediately filter. 99 * 100 * @since 3.3.4 101 * 102 * @param string $hook The name of the WordPress filter that is being registered. 103 * @param object $component A reference to the instance of the object on which the filter is defined. 104 * @param string $callback The name of the function definition on the $component. 105 * @return void 106 */ 107 public function add_immediately_filter( $hook, $component, $callback ) { 108 if($hook = $this->search_filter($hook, $component, $callback ) ) { 109 add_filter( ...$hook ); 110 } 111 } 112 113 /** 114 * Remove registered filter. 115 * 116 * @since 3.3.4 117 * 118 * @param string $hook The name of the WordPress filter that is being registered. 119 * @param object $component A reference to the instance of the object on which the filter is defined. 120 * @param string $callback The name of the function definition on the $component. 121 * @return void 122 */ 123 public function remove_filter( $hook, $component, $callback ) { 124 if($hook = $this->search_filter($hook, $component, $callback ) ) { 125 remove_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority']); 126 } 127 } 128 129 /** 130 * Search registered filter. 131 * 132 * @since 3.3.4 133 * 134 * @param string $hook The name of the WordPress filter that is being registered. 135 * @param object $component A reference to the instance of the object on which the filter is defined. 136 * @param string $callback The name of the function definition on the $component. 137 * @return bool|mixed 138 * 139 */ 140 public function search_filter( $hook, $component, $callback ) { 141 foreach ($this->filters as $filter) { 142 if($filter['hook'] === $hook 143 && $filter['component'] === $component 144 && $filter['callback'] === $callback) { 145 return $filter; 146 } 147 148 } 149 150 return false; 151 } 152 96 153 /** 97 154 * @param $page_title -
wallkit/trunk/readme.txt
r3067043 r3071590 28 28 == Changelog == 29 29 30 = 3.3.4 = 31 *Release Date - 08 April 2024* 32 33 #### Updates including: 34 - Fixed paywall position with using classic or gutenberg editors. 35 30 36 = 3.3.3 = 31 37 *Release Date - 08 April 2024* -
wallkit/trunk/wallkit-wp.php
r3067043 r3071590 10 10 * Plugin URI: https://wallkit.net 11 11 * Description: A Plug & Play paid-content system to manage subscribers, gather fees and drive additional content sales. 12 * Version: 3.3. 312 * Version: 3.3.4 13 13 * Author: Wallkit <dev@wallkit.net> 14 14 * Author URI: https://wallkit.net/ … … 27 27 * Rename this for your plugin and update it as you release new versions. 28 28 */ 29 define( 'WPWKP_VERSION', '3.3. 3' );29 define( 'WPWKP_VERSION', '3.3.4' ); 30 30 31 31 /**
Note: See TracChangeset
for help on using the changeset viewer.