Skip to content

Commit

Permalink
Merge pull request #1584 from wpeventmanager/3_1_40
Browse files Browse the repository at this point in the history
3 1 40
  • Loading branch information
krinaydhanani authored Dec 5, 2023
2 parents 9866e70 + 1fb0208 commit 3701a62
Show file tree
Hide file tree
Showing 58 changed files with 733 additions and 648 deletions.
4 changes: 2 additions & 2 deletions admin/wp-event-manager-addons.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Addons Page
* Addons page of WP Event Manager.
*/

if(!defined('ABSPATH')){
Expand All @@ -10,7 +10,7 @@
if(!class_exists('WP_Event_Manager_Addons')) :

/**
* WP_Event_Manager_Addons Class
* WP_Event_Manager_Addons Class.
*/
class WP_Event_Manager_Addons {
/**
Expand Down
28 changes: 14 additions & 14 deletions admin/wp-event-manager-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class WP_Event_Manager_Admin {
/**
* __construct function.
* Constructor.
*
* @access public
* @return void
Expand Down Expand Up @@ -46,7 +46,7 @@ public function __construct() {
}

/**
* upgrade_database_notice function.
* Upgrade database notice.
*
* @access public
* @return void
Expand All @@ -61,7 +61,7 @@ public function upgrade_database_notice() {
}

/**
* wpem_installation_notices function.
* Installation notices of WP Event Manager.
*
* @access public
* @return void
Expand All @@ -77,7 +77,7 @@ public function wpem_installation_notices() {
}

/**
* admin_enqueue_scripts function.
* Here, all scripts are used for the WP Event Manager admin.
*
* @access public
* @return void
Expand All @@ -87,7 +87,7 @@ public function admin_enqueue_scripts() {
global $wp_scripts;
$screen = get_current_screen();

// main frontend style
// Main frontend style
wp_enqueue_style('event_manager_admin_css', EVENT_MANAGER_PLUGIN_URL . '/assets/css/backend.min.css');

if(in_array($screen->id, apply_filters('event_manager_admin_screen_ids', array('edit-event_listing', 'event_listing', 'event_listing_page_event-manager-settings', 'event_listing_page_event-manager-addons', 'event_listing_page_event-manager-upgrade-database', 'edit-event_organizer', 'event_organizer', 'edit-event_venue', 'event_venue')))) {
Expand Down Expand Up @@ -125,7 +125,7 @@ public function admin_enqueue_scripts() {
}

/**
* admin_menu function.
* Admin menu.
*
* @access public
* @return void
Expand All @@ -144,7 +144,7 @@ public function admin_menu() {
}

/**
* Upgrade database page
* Upgrade database page.
*/
public function upgrade_database() { ?>
<div class="wrap wp_event_manager wp_event_manager_upgrade_database">
Expand Down Expand Up @@ -185,7 +185,7 @@ public function upgrade_database() { ?>
}

/**
* Upgrade database
* Upgrade database.
*/
public function wpem_upgrade_database() {

Expand Down Expand Up @@ -224,7 +224,7 @@ public function wpem_upgrade_database() {
}

/**
* migrate_organizer_from_event_meta
* Migrate organizer from event meta.
*/
public function migrate_organizer_from_event_meta($event, $organizer_data) {
$organizer_id = check_organizer_exist($organizer_data['organizer_email']);
Expand Down Expand Up @@ -256,7 +256,7 @@ public function migrate_organizer_from_event_meta($event, $organizer_data) {
}

/**
* banner_image_set_thumnail
* Set banner image.
*/
public function banner_image_set_thumnail($event) {
$banner = get_event_banner($event);
Expand Down Expand Up @@ -290,23 +290,23 @@ public function banner_image_set_thumnail($event) {
}

/**
* Output addons page
* Output addons page.
*/
public function addons_page() {
$addons = include 'wp-event-manager-addons.php';
$addons->output();
}

/**
* Output shortcode page
* Output shortcode page.
*/
public function shortcodes_page() {
$shortcodes = new WP_Event_Manager_Shortcode_List();
$shortcodes->shortcode_list();
}

/**
* Show Installtion setup wizard admin notice
* Show Installtion setup wizard admin notice.
*/
public function run_setup_wizard_admin_notice() {
$installation = get_option('wpem_installation', 0);
Expand Down Expand Up @@ -341,7 +341,7 @@ public function conditional_includes() {
}

/**
* Ran on WP admin_init hook
* Ran on WP admin_init hook.
*/
public function admin_init() {
if(!empty($_GET['event-manager-main-admin-dismiss'])) {
Expand Down
38 changes: 19 additions & 19 deletions admin/wp-event-manager-cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
}

/**
* WP_Event_Manager_CPT class.
* Class of WP Event Manager custom post types.
*/
class WP_Event_Manager_CPT {

/**
* __construct function.
* Constructor.
*
* @access public
* @return void
Expand Down Expand Up @@ -59,7 +59,7 @@ public function __construct() {
}

/**
* Edit bulk actions
* Edit bulk actions.
*/
public function add_bulk_actions() {
global $post_type, $wp_post_types;
Expand All @@ -78,7 +78,7 @@ public function add_bulk_actions() {
}

/**
* Do custom bulk actions
* Do custom bulk actions.
*/
public function do_bulk_actions($redirect_url, $action, $post_ids) {
$wp_list_table = _get_list_table('WP_Posts_List_Table');
Expand Down Expand Up @@ -123,7 +123,7 @@ public function do_bulk_actions($redirect_url, $action, $post_ids) {
}

/**
* Approve a single event
* Approve a single event.
*/
public function approve_event() {
if(!empty($_GET['approve_event']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'approve_event') && current_user_can('publish_post',sanitize_text_field($_GET['approve_event']))) {
Expand All @@ -148,7 +148,7 @@ public function approve_event() {
}

/**
* Show a notice if we did a bulk action or approval
* Show a notice if we did a bulk action or approval.
*/
public function approved_notice() {
global $post_type, $pagenow;
Expand All @@ -168,7 +168,7 @@ public function approved_notice() {
}

/**
* Show a notice if we did a bulk action or approval
* Show a notice if we did a bulk action or approval.
*/
public function expired_notice() {
global $post_type, $pagenow;
Expand All @@ -189,7 +189,7 @@ public function expired_notice() {
}

/**
* Show category dropdown
* Show category dropdown.
*/
public function events_by_category() {
global $typenow, $wp_query;
Expand Down Expand Up @@ -219,7 +219,7 @@ public function events_by_category() {
}

/**
* Show Event type dropdown
* Show Event type dropdown.
*/
public function events_by_event_type() {
global $typenow, $wp_query;
Expand Down Expand Up @@ -264,7 +264,7 @@ public function enter_title_here($text, $post){
}

/**
* post_updated_messages function.
* Updated messages of event post.
*
* @access public
* @param mixed $messages
Expand Down Expand Up @@ -293,7 +293,7 @@ public function post_updated_messages($messages) {
}

/**
* columns function.
* Add columns.
*
* @param array $columns
* @return array
Expand Down Expand Up @@ -325,15 +325,15 @@ public function columns($columns){
}

/**
* This is required to make column responsive since WP 4.3
* This is required to make column responsive since WP 4.3.
*
* @access public
* @param string $column
* @param string $screen
* @return string
*/
public function primary_column($column, $screen) {
// if we want to set the primary column for CPT
// If we want to set the primary column for CPT
if('edit-event_listing' === $screen) {
$column = 'event_title';
}
Expand All @@ -357,7 +357,7 @@ public function row_actions($actions) {
}

/**
* custom_columns function.
* Add custom columns.
*
* @access public
* @param mixed $column
Expand Down Expand Up @@ -499,13 +499,13 @@ public function custom_columns($column) {
break;
default :
$value = get_post_meta($post->ID, $column, true);
echo apply_filters('wpem_cpt_event_custom_column', $value, $column, $post);
echo apply_filters('wpem_cpt_event_custom_column', wp_kses_post($value), $column, $post);
break;
}
}

/**
* sortable_columns function.
* The table sortable columns.
*
* @access public
* @param mixed $columns
Expand All @@ -524,7 +524,7 @@ public function sortable_columns($columns) {
}

/**
* sort_columns function.
* Sort columns.
*
* @access public
* @param mixed $vars
Expand Down Expand Up @@ -581,7 +581,7 @@ public function sort_columns($vars) {
}

/**
* organizer_columns function.
* Columns of organizer.
*
* @access public
* @param $columns
Expand All @@ -594,7 +594,7 @@ public function organizer_columns($columns) {
}

/**
* organizer_columns_data function.
* Columns data of organizer.
*
* @access public
* @param $column, $post_id
Expand Down
Loading

0 comments on commit 3701a62

Please sign in to comment.