Skip to content

Commit

Permalink
Changed Plugin Page function
Browse files Browse the repository at this point in the history
Removed Help Tabs from plugin's settings page
  • Loading branch information
monecchi committed Dec 17, 2017
1 parent 1b7a4fb commit 45755c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
23 changes: 1 addition & 22 deletions ebor_cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,7 @@ function ebor_framework_cpt_init(){
function ebor_framework_cpt_add_options_page(){
$theme = wp_get_theme();
//add_options_page( $theme->get( 'Name' ) . ' Post Type Options', $theme->get( 'Name' ) . ' Post Type Options', 'manage_options', __FILE__, 'ebor_framework_cpt_render_form');
$ebor_admin_page = add_options_page( $theme->get( 'Name' ) . __( ' CPT Options', 'pivot' ), $theme->get( 'Name' ) . __( ' CPT Options', 'pivot' ), 'manage_options', __FILE__, 'ebor_framework_cpt_render_form');

// Adds ebor_help_tab when ebor_framework_cpt_add_options_page loads
add_action('load-'.$ebor_admin_page, 'ebor_admin_add_help_tab');
}
}

// Add Help Tab with instructions
if(!( function_exists('ebor_admin_add_help_tab') )){
function ebor_admin_add_help_tab() {
$screen = get_current_screen();

$permalinks_url = '<a href="options-permalink.php">';

// Add my_help_tab if current screen is My Admin Page
$screen->add_help_tab( array(
'id' => 'ebor_help_tab',
'title' => __('Instructions', 'ebor-framework'),
'content' => '<p>' . __( 'Enter the URL slug you want to use for the registered post types bellow.', 'ebor-framework') . '</p>',
'<p>' . __( 'DO-NOT: use numbers, spaces, capital letters or special characters.', 'ebor-framework') . '</p>',

) );
add_options_page( $theme->get( 'Name' ) . __( ' CPT Options', 'pivot' ), $theme->get( 'Name' ) . __( ' CPT Options', 'pivot' ), 'manage_options', __FILE__, 'ebor_framework_cpt_render_form');
}
}

Expand Down
6 changes: 3 additions & 3 deletions git-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ public function plugin_popup( $result, $action, $args ) {

$this->get_repository_info(); // Get our repo info

date_default_timezone_set('America/Sao_Paulo');
//date_default_timezone_set('America/Sao_Paulo');

$date_added = new DateTime( $this->github_response['created_at'] ); // convert UNIX timestamp to PHP DateTime
$date_added->format('Y-m-d'); // output = 2017-12-15
//$date_added = new DateTime( $this->github_response['created_at'] ); // convert UNIX timestamp to PHP DateTime
//$date_added->format('Y-m-d'); // output = 2017-12-15

// Set it to an array
$plugin = array(
Expand Down

0 comments on commit 45755c1

Please sign in to comment.