| @@ -1872,8 +1872,30 @@ | ||
| 1872 | 1872 | */ |
| 1873 | 1873 | protected function render() {} |
| 1874 | 1874 | |
| 1875 | 1875 | /** |
| 1876 | + * Render element in static mode. | |
| 1877 | + * | |
| 1878 | + * If not inherent will call the base render. | |
| 1879 | + */ | |
| 1880 | + protected function render_static() { | |
| 1881 | + $this->render(); | |
| 1882 | + } | |
| 1883 | + | |
| 1884 | + /** | |
| 1885 | + * Determine the render logic. | |
| 1886 | + */ | |
| 1887 | + protected function render_by_mode() { | |
| 1888 | + if ( Plugin::$instance->frontend->is_static_render_mode() ) { | |
| 1889 | + $this->render_static(); | |
| 1890 | + | |
| 1891 | + return; | |
| 1892 | + } | |
| 1893 | + | |
| 1894 | + $this->render(); | |
| 1895 | + } | |
| 1896 | + | |
| 1897 | + /** | |
| 1876 | 1898 | * Print content template. |
| 1877 | 1899 | * |
| 1878 | 1900 | * Used to generate the content template on the editor, using a |
| 1879 | 1901 | * Backbone JavaScript template. |