Plugin Directory

Changeset 2610279


Ignore:
Timestamp:
10/06/2021 12:19:08 PM (4 years ago)
Author:
platformlycom
Message:

fixed notice: Fixed the 404 Page not found error for pages

Location:
platformly/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • platformly/trunk/platformly.php

    r2585949 r2610279  
    44Plugin Name: Platform.ly Official
    55Description: Platform.ly plugin is the easiest way to setup your optins and pages that your created with Platform.ly. After building your optin or page with our interactive WYSIWYG builders, you can set them up to show on your site with just a couple of clicks.
    6 Version: 1.10
     6Version: 1.11
    77Author: Platform.ly
    88Author URI: https://www.platform.ly/
     
    1616define("PLATFORMLY_URL", "https://pageserver.platform.ly");
    1717
    18 define('PLATFORMLY_PLUGIN_VERSION', '1.10');
     18define('PLATFORMLY_PLUGIN_VERSION', '1.11');
    1919
    2020include plugin_dir_path(__FILE__) . '/inc/ply.functions.php';
     
    3535        'show_in_menu'       => false,
    3636        'query_var'          => false,
    37         'rewrite'            => array('slug'=>'/', 'with_front' => false),
     37        'rewrite'            => true,
    3838        'capability_type'    => 'page',
    3939        'has_archive'        => false,
     
    4444    ));
    4545}
     46
     47/**
     48 * Remove the slug from published post permalinks for our custom post types.
     49 */
     50add_filter('post_type_link', function($post_link, $post){
     51    $post_types = 'ply_page';
     52    if($post->post_type === $post_types && 'publish' === $post->post_status){
     53        if(strpos($post_link, '/archives/'.$post->post_type.'/')){
     54            $post_link = str_replace('/archives/'.$post->post_type.'/', '/', $post_link);
     55        }else{
     56            $post_link = str_replace('/'.$post->post_type.'/', '/', $post_link);
     57        }
     58    }
     59    return $post_link;
     60}, 10, 3);
    4661
    4762function ply_create_menus(){
  • platformly/trunk/readme.txt

    r2585949 r2610279  
    7878== Upgrade Notice ==
    7979
     80= 1.11 =
     81- Fixed the 404 Page not found error for pages
     82
    8083= 1.10 =
    8184- Pages are displayed in the sitemap
Note: See TracChangeset for help on using the changeset viewer.