Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Notice: require(): read of 1027 bytes failed with errno=12 Cannot allocate memory in /var/www/html/ticnews.com.br/web/wp-content/plugins/google-maps-easy/functions.php on line 44
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-content/plugins/shortcodes-ultimate/includes/deprecated/functions.php on line 130
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-content/plugins/shortcodes-ultimate/includes/deprecated/functions.php on line 130
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-content/plugins/shortcodes-ultimate/includes/deprecated/functions.php on line 131
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-content/plugins/shortcodes-ultimate/includes/deprecated/functions.php on line 131
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-content/plugins/shortcodes-ultimate/includes/deprecated/functions.php on line 132
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-content/plugins/shortcodes-ultimate/includes/deprecated/functions.php on line 132
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/load.php on line 926
Notice: Trying to access array offset on value of type bool in /var/www/html/ticnews.com.br/web/wp-includes/theme.php on line 2360
Notice: Trying to access array offset on value of type bool in /var/www/html/ticnews.com.br/web/wp-content/plugins/download-monitor/src/DLM.php on line 236
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
->capabilities;
$role = add_role(
'ai1ec_event_assistant',
'Event Contributor',
$caps
);
$role->add_cap( 'edit_ai1ec_events' );
$role->add_cap( 'read_ai1ec_events' );
$role->add_cap( 'delete_ai1ec_events' );
$role->add_cap( 'edit_published_ai1ec_events' );
$role->add_cap( 'delete_published_ai1ec_events' );
$role->add_cap( 'read' );
unset( $caps, $role );
}
// Add event managing capabilities to administrator, editor, author.
// The last created capability is "manage_ai1ec_feeds", so check for
// that one.
$role = get_role( 'administrator' );
if ( is_object( $role ) && ! $role->has_cap( 'manage_ai1ec_feeds' ) ) {
$role_list = array( 'administrator', 'editor', 'author' );
foreach ( $role_list as $role_name ) {
$role = get_role( $role_name );
if ( null === $role || ! ( $role instanceof WP_Role ) ) {
continue;
}
// Read events.
$role->add_cap( 'read_ai1ec_event' );
// Edit events.
$role->add_cap( 'edit_ai1ec_event' );
$role->add_cap( 'edit_ai1ec_events' );
$role->add_cap( 'edit_private_ai1ec_events' );
$role->add_cap( 'edit_published_ai1ec_events' );
// Delete events.
$role->add_cap( 'delete_ai1ec_event' );
$role->add_cap( 'delete_ai1ec_events' );
$role->add_cap( 'delete_published_ai1ec_events' );
$role->add_cap( 'delete_private_ai1ec_events' );
// Publish events.
$role->add_cap( 'publish_ai1ec_events' );
// Read private events.
$role->add_cap( 'read_private_ai1ec_events' );
// Manage categories & tags.
$role->add_cap( 'manage_events_categories' );
// Manage calendar feeds.
$role->add_cap( 'manage_ai1ec_feeds' );
if ( 'administrator' === $role_name ) {
// Change calendar themes & manage calendar options.
$role->add_cap( 'switch_ai1ec_themes' );
$role->add_cap( 'manage_ai1ec_options' );
}
// Add additional roles for administrator and editor
if ( 'author' !== $role_name ) {
$role->add_cap( 'edit_others_ai1ec_events' );
$role->add_cap( 'delete_others_ai1ec_events' );
}
}
}
}
/**
* Appending pending items number to the menu name.
*
* If current user can publish events and there
* is at least 1 event pending, append the pending
* events number to the menu
*
* @return string
*/
public function get_all_items_name() {
// if current user can publish events
if ( current_user_can( 'publish_ai1ec_events' ) ) {
// get all pending events
$query = array (
'post_type' => AI1EC_POST_TYPE,
'post_status' => 'pending',
'posts_per_page' => -1,
);
$query = new WP_Query( $query );
// at least 1 pending event?
if ( $query->post_count > 0 ) {
// append the pending events number to the menu
return sprintf(
Ai1ec_I18n::__(
'All Events %d'
),
$query->post_count,
$query->post_count,
$query->post_count
);
}
}
// no pending events, or the user doesn't have sufficient capabilities
return Ai1ec_I18n::__( 'All Events' );
}
}