-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
= 2.8.0 - 2019/09/07 = * This feature upgrade adds a3Portfolio Gutenberg Block plus 5 filter blocks. Also includes inclusion of shortcodes into core for those still using the legacy editor. * Feature - a3 Portfolio Premium shortcodes plugin discontinued, shortcodes now included in the parent plugin. * Feature - Add a3 Portfolio Gutenberg block. * Feature - Add Portfolio Items Gutenberg block * Feature - Add Portfolio Categories Gutenberg block * Feature - Add Portfolio Tags Gutenberg block * Feature - Add Portfolio Recent Gutenberg block * Feature - Add Portfolio Sticky Gutenberg block * Tweak - Remove a3 Portfolio Shortcode placecard and link from admin dashboard sidebar
- Loading branch information
Showing
62 changed files
with
5,786 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<?php | ||
/* "Copyright 2012 a3 Revolution Web Design" This software is distributed under the terms of GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 */ | ||
// File Security Check | ||
if ( ! defined( 'ABSPATH' ) ) exit; | ||
?> | ||
<?php | ||
/*----------------------------------------------------------------------------------- | ||
Portfolio Shortcodes Settings Page | ||
TABLE OF CONTENTS | ||
- var menu_slug | ||
- var page_data | ||
- __construct() | ||
- page_init() | ||
- page_data() | ||
- add_admin_menu() | ||
- tabs_include() | ||
- admin_settings_page() | ||
-----------------------------------------------------------------------------------*/ | ||
|
||
class A3_Portfolio_Shortcodes_Page extends A3_Portfolio_Admin_UI | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $menu_slug = 'a3-portfolio-shortcodes'; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
private $page_data; | ||
|
||
/*-----------------------------------------------------------------------------------*/ | ||
/* __construct() */ | ||
/* Settings Constructor */ | ||
/*-----------------------------------------------------------------------------------*/ | ||
public function __construct() { | ||
$this->page_init(); | ||
$this->tabs_include(); | ||
} | ||
|
||
/*-----------------------------------------------------------------------------------*/ | ||
/* page_init() */ | ||
/* Page Init */ | ||
/*-----------------------------------------------------------------------------------*/ | ||
public function page_init() { | ||
|
||
add_filter( $this->plugin_name . '_add_admin_menu', array( $this, 'add_admin_menu' ) ); | ||
} | ||
|
||
/*-----------------------------------------------------------------------------------*/ | ||
/* page_data() */ | ||
/* Get Page Data */ | ||
/*-----------------------------------------------------------------------------------*/ | ||
public function page_data() { | ||
|
||
|
||
|
||
$page_data = array( | ||
'type' => 'submenu', | ||
'parent_slug' => 'edit.php?post_type=a3-portfolio', | ||
'page_title' => __('Shortcodes','a3_portfolio_shortcodes'), | ||
'menu_title' => __('Shortcodes','a3_portfolio_shortcodes'), | ||
'capability' => 'manage_options', | ||
'menu_slug' => $this->menu_slug, | ||
'function' => 'a3_portfolio_shortcodes_page_show', | ||
'admin_url' => 'edit.php?post_type=a3-portfolio', | ||
'callback_function' => '', | ||
'script_function' => '', | ||
'view_doc' => '', | ||
); | ||
|
||
if ( $this->page_data ) return $this->page_data; | ||
return $this->page_data = $page_data; | ||
|
||
} | ||
|
||
/*-----------------------------------------------------------------------------------*/ | ||
/* add_admin_menu() */ | ||
/* Add This page to menu on left sidebar */ | ||
/*-----------------------------------------------------------------------------------*/ | ||
public function add_admin_menu( $admin_menu ) { | ||
|
||
if ( ! is_array( $admin_menu ) ) $admin_menu = array(); | ||
$admin_menu[] = $this->page_data(); | ||
|
||
return $admin_menu; | ||
} | ||
|
||
/*-----------------------------------------------------------------------------------*/ | ||
/* tabs_include() */ | ||
/* Include all tabs into this page | ||
/*-----------------------------------------------------------------------------------*/ | ||
public function tabs_include() { | ||
include_once( A3_PORTFOLIO_FILE_PATH . '/admin' . '/tabs/template-settings/shortcode-tab.php' ); | ||
} | ||
|
||
/*-----------------------------------------------------------------------------------*/ | ||
/* admin_settings_page() */ | ||
/* Show Settings Page */ | ||
/*-----------------------------------------------------------------------------------*/ | ||
public function admin_settings_page() { | ||
//global $a3_portfolio_admin_init; | ||
|
||
//$a3_portfolio_admin_init->admin_settings_page( $this->page_data() ); | ||
|
||
global $a3_portfolio_shortcodes_panel; | ||
|
||
$a3_portfolio_shortcodes_panel->settings_form(); | ||
} | ||
|
||
} | ||
|
||
global $a3_portfolio_shortcodes_page; | ||
$a3_portfolio_shortcodes_page = new A3_Portfolio_Shortcodes_Page(); | ||
|
||
/** | ||
* a3_portfolio_shortcodes_page_show() | ||
* Define the callback function to show page content | ||
*/ | ||
function a3_portfolio_shortcodes_page_show() { | ||
global $a3_portfolio_shortcodes_page; | ||
$a3_portfolio_shortcodes_page->admin_settings_page(); | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.