Подскажите как исправить
Код плагина с 40 строки
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- public static function plugin_activated() {
- // Information needed for creating the plugin's pages
- 'title' => __( 'Sign In', 'personalize-login' ),
- 'content' => '[custom-login-form]'
- ),
- 'title' => __( 'Your Account', 'personalize-login' ),
- 'content' => '[account-info]'
- ),
- );
- foreach ( $page_definitions as $slug => $page ) {
- // Check that the page doesn't exist already
- $query = new WP_Query( 'pagename=' . $slug );
- if ( ! $query->have_posts() ) {
- // Add the page using the data from the array above
- wp_insert_post(
- 'post_content' => $page['content'],
- 'post_name' => $slug,
- 'post_title' => $page['title'],
- 'post_status' => 'publish',
- 'post_type' => 'page',
- 'ping_status' => 'closed',
- 'comment_status' => 'closed',
- )
- );
- }
- }
- }