PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.1
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.1
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/class-form-preview.php +8 -27 1.6.211.6.1 View file →
@@ -60,14 +60,14 @@
60 60 } else {
61 61 $this->form_id = isset( $_GET['form_id'] ) ? intval( $_GET['form_id'] ) : 0;
62 62 }
63 63
64 - add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
65 - add_filter( 'the_title', array( $this, 'the_title' ) );
66 - add_filter( 'the_content', array( $this, 'the_content' ) );
67 - add_filter( 'get_the_excerpt', array( $this, 'the_content' ) );
68 - add_filter( 'home_template_hierarchy', array( $this, 'use_page_template_hierarchy' ) );
69 - add_filter( 'frontpage_template_hierarchy', array( $this, 'use_page_template_hierarchy' ) );
64 + add_action( 'pre_get_posts', [ $this, 'pre_get_posts' ] );
65 + add_filter( 'template_include', [ $this, 'template_include' ] );
66 +
67 + add_filter( 'the_title', [ $this, 'the_title' ] );
68 + add_filter( 'the_content', [ $this, 'the_content' ] );
69 + add_filter( 'get_the_excerpt', [ $this, 'the_content' ] );
70 70 add_filter( 'post_thumbnail_html', '__return_empty_string' );
71 71 }
72 72
73 73 /**
@@ -128,32 +128,13 @@
128 128 $query->set( 'posts_per_page', 1 );
129 129 }
130 130 }
131 131
132 -
133 132 /**
134 - * Use page template types.
135 - *
136 - * Instead of manually locating one page template with the highest priority,
137 - * we are going to use the template hierarchy hooks to render the highest priority template.
138 - * This resolves issues with Block theme's templating.
139 - *
140 - * @since 1.6.12
141 - * @param array $templates The list of templates in descending order of priority from WordPress.
142 - *
143 - * @return array
144 - */
145 - public function use_page_template_hierarchy( $templates ) {
146 -
147 - return array( 'page.php', 'single.php', 'index.php' );
148 - }
149 - /**
150 133 * Limit the page templates to singular pages only
151 134 *
152 - * @deprecated 1.6.11
153 135 * @return string
154 136 */
155 - public function template_include( ) {
156 - _deprecated_function( __METHOD__, 'WeForms 1.6.11' );
157 - return locate_template( array( 'page.php', 'single.php', 'index.php' ) );
137 + public function template_include() {
138 + return locate_template( [ 'page.php', 'single.php', 'index.php' ] );
158 139 }
159 140 }