Plugin Directory

Changeset 2385096


Ignore:
Timestamp:
09/20/2020 04:25:54 AM (6 years ago)
Author:
esiteq
Message:

Version 0.5 update

Location:
wp-petfinder/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-petfinder/trunk/readme.txt

    r2385093 r2385096  
    131131
    132132== Changelog ==
     133= 0.5 =
     134* Bugfix: Search Results page creation on plugin activation.
     135
    133136= 0.4 =
    134137* Improved compatibility with other plugins and themes, especially jQuery v1.9 and newer.
  • wp-petfinder/trunk/wp-petfinder.php

    r2385093 r2385096  
    55 * Description: Integrates Petfinder database with your Wordpress site via API v2
    66 * Author: ESITEQ
    7  * Version: 0.4
     7 * Version: 0.5
    88 * Requires at least: 4.0
    99 * Tested up to: 5.4
     
    3131    require_once ABSPATH . 'wp-admin/includes/upgrade.php';
    3232    $options = get_option('wppf_options', []);
     33    //results_page
     34    if (!isset($options['results_page']) || $options['results_page'] == 0)
     35    {
     36        $page =
     37        [
     38            'post_title'    => __('Animal Search Results', 'wppf'),
     39            'post_content'  => '[pf_search_results]',
     40            'post_status'   => 'publish',
     41            'post_author'   => 1,
     42            'post_type'     => 'page'
     43        ];
     44        $post_id = wp_insert_post($page);
     45        if (is_numeric($post_id))
     46        {
     47            $options['results_page'] = $post_id;
     48            update_option('wppf_options', $options, 'yes');
     49        }
     50    }
     51    //
    3352    if (!isset($options['animal_page']) || $options['animal_page'] == 0)
    3453    {
     
    4867        }
    4968    }
     69    //
    5070    if (!isset($options['adopt_page']) || $options['adopt_page'] == 0)
    5171    {
Note: See TracChangeset for help on using the changeset viewer.