100+ results for 'php get_current_user'

Not the results you expected?

duplicate-post.php (https://gitlab.com/webkod3r/tripolis) PHP · 102 lines

1 <?php

2 /*

3 * Crear duplicado de las entradas como borrador y redirige luego a la pantalla de edición

22 * then change next couple of lines to this: $new_post_author = $post->post_author;

23 */

24 $current_user = wp_get_current_user();

25 $new_post_author = $current_user->ID;

26

81 * finally, redirect to the edit post screen for the new draft

82 */

83 wp_redirect( admin_url( 'post.php?action=edit&post=' . $new_post_id ) );

84 exit;

85 } else {

94 function rd_duplicate_post_link( $actions, $post ) {

95 if (current_user_can('edit_posts')) {

96 $actions['duplicate'] = '<a href="admin.php?action=rd_duplicate_post_as_draft&amp;post=' . $post->ID . '" title="Duplicar este elemento" rel="permalink">Duplicar</a>';

97 }

98 return $actions;

csv_api.php (https://github.com/osarrat/sigmah-website.git) PHP · 399 lines

1 <?php

2 # MantisBT - a php based bugtracking system

58

59 if( ALL_PROJECTS == $t_current_project_id ) {

60 $t_filename = user_get_name( auth_get_current_user_id() );

61 } else {

62 $t_filename = project_get_field( $t_current_project_id, 'name' );

main_page.php (https://github.com/osarrat/sigmah-website.git) PHP · 117 lines

1 <?php

2 # MantisBT - a php based bugtracking system

27 * MantisBT Core API's

28 */

29 require_once( 'core.php' );

30

31 require_once( 'current_user_api.php' );

32 require_once( 'news_api.php' );

33 require_once( 'date_api.php' );

34 require_once( 'print_api.php' );

35 require_once( 'rss_api.php' );

51

52 if ( !current_user_is_anonymous() ) {

53 $t_current_user_id = auth_get_current_user_id();

54 $t_hide_status = config_get( 'bug_resolved_status_threshold' );

55 echo '<div class="quick-summary-left">';

users.php (https://bitbucket.org/antonyravel/cape-resorts.git) PHP · 159 lines

1 <?php

2

3 /**

92

93 // set result

94 $result = $count > 0 ? "<a href='edit.php?post_type={$post_type}&author={$user_id}'>{$count}</a>" : (string) $count;

95 break;

96

131

132 if ( 'site-users-network' == $screen->id )

133 $url = "site-users.php?id={$this->site_id}&amp;";

134 else

135 $url = 'users.php?';

136

137 if ( get_current_user_id() == $user_object->ID ) {

138 $edit_link = 'profile.php';

class.ls.sliders.php (https://gitlab.com/webkod3r/tripolis) PHP · 409 lines

1 <?php

2

3 class LS_Sliders {

174 // Insert slider, WPDB will escape data automatically

175 $wpdb->insert($wpdb->prefix.LS_DB_TABLE, array(

176 'author' => get_current_user_id(),

177 'name' => $title,

178 'slug' => $slug,

custom-types-form.php (https://gitlab.com/Fraternal-Group/fraternal) PHP · 287 lines

1 <?php

2 /**

3 *

230 */

231

232 $data[WPCF_AUTHOR] = get_current_user_id();

233

234 /**

279 'wpcf-message' => 'view',

280 ),

281 admin_url( 'admin.php' )

282 )

283 )

class-mb-include-exclude.php (https://gitlab.com/code26/selah) PHP · 379 lines

1 <?php

2 /**

3 * Control the include, exclude condition for meta boxes

244 */

245 protected static function check_user_role( $roles ) {

246 $user = wp_get_current_user();

247 $roles = array_map( 'strtolower', self::csv_to_array( $roles ) );

248 $roles = array_intersect( $user->roles, $roles );

258 */

259 protected static function check_user_id( $user_ids ) {

260 $user_id = get_current_user_id();

261 return in_array( $user_id, self::csv_to_array( $user_ids ) );

262 }

273 * This is required for MB User Meta extension.

274 */

275 if ( isset( $GLOBALS['pagenow'] ) && 'user-edit.php' === $GLOBALS['pagenow'] ) {

276 // If edit other's profile, check edited user.

277 $user_id = intval( $_REQUEST['user_id'] );

class-wc-customer.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 568 lines

1 <?php

2 /**

3 * Customer

561

562 if ( is_user_logged_in() ) {

563 $downloads = wc_get_customer_available_downloads( get_current_user_id() );

564 }

565

login.php (https://bitbucket.org/metrobee/tr.deconord.eu.git) PHP · 118 lines

1 <?php

2

3 /**

25 }

26

27 $current_user = wp_get_current_user();

28

29 // no need to alert if he cannot create a post

32

33 if ( ! class_exists( 'Facebook_User' ) )

34 require_once( dirname( dirname(__FILE__) ) . '/facebook-user.php' );

35

36 $facebook_user_data_exists = false;

43

44 // Facebook information not found

45 $facebook_user = Facebook_User::get_current_user( array( 'id','username' ) );

46 if ( $facebook_user ) {

47 $permissions = $facebook->get_current_user_permissions( $facebook_user );

Task.php (https://github.com/woothemes/woocommerce.git) PHP · 556 lines

1 <?php

2 /**

3 * Handles task related methods.

428 */

429 public function is_visited() {

430 $user_id = get_current_user_id();

431 $response = WCAdminUser::get_user_data_field( $user_id, 'task_list_tracked_started_tasks' );

432 $tracked_tasks = $response ? json_decode( $response, true ) : array();

profile.php (https://bitbucket.org/iRonBot/bbpress-persian.git) PHP · 89 lines

1 <?php bb_get_header(); ?>

2 <div class="bbcrumb"><a href="<?php bb_option('uri'); ?>">انجمن</a> » شناس‌نامه‌ی <?php echo get_user_name( $user->ID ); ?></div>

3 <div id="sidebar"><!-- Sidebar -->

4 <ul>

21 <tr>

22 <th class="title">آخرین پاسخ‌ها</th>

23 <th><?php if ( $user->ID == bb_get_current_user_info( 'id' ) ) printf('آخرین پاسخ شما'); else printf('آخرین پاسخ کاربر'); ?></th>

24 <th>آخرین پاسخ</th>

25 </tr>

31 <td class="title"><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>

32 <td><?php if ( $user->ID == bb_get_current_user_info( 'id' ) ) printf(__('%s پیش'), bb_get_post_time()); else printf(__('%s پیش'), bb_get_post_time()); ?></td>

33 <td><?php if ( bb_get_post_time( 'timestamp' ) < get_topic_time( 'timestamp' ) ) printf(__('%s پیش'), get_topic_time()); else _e('بدون پاسخ');?></td>

64 <tr<?php alt_class('topics'); ?>>

65 <td class="title"><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>

66 <td><?php printf(__('%s پیش'), get_topic_start_time()); ?></td>

wp-to-twitter-users.php (https://github.com/livinglab/openlab.git) PHP · 143 lines

25 function wpt_twitter_profile() {

26 global $user_ID;

27 $current_user = wp_get_current_user();

28 $user_edit = ( isset( $_GET['user_id'] ) ) ? (int) $_GET['user_id'] : $user_ID;

29

43 <th scope="row"><?php _e( 'Use My Twitter Username', 'wp-to-twitter' ); ?></th>

44 <td>

45 <input type="radio" name="wpt-enable-user" id="wpt-enable-user-3" value="mainAtTwitter"<?php checked( $is_enabled, 'mainAtTwitter' ); ?> /> <label for="wpt-enable-user-3"><?php _e( 'Tweet my posts with an @ reference to my username.', 'wp-to-twitter' ); ?></label><br/>

46 <input type="radio" name="wpt-enable-user" id="wpt-enable-user-4" value="mainAtTwitterPlus"<?php checked( $is_enabled, 'mainAtTwitterPlus' ); ?> /> <label for="wpt-enable-user-4"><?php _e( 'Tweet my posts with an @ reference to both my username and to the main site username.', 'wp-to-twitter' ); ?></label>

52 </th>

53 <td>

54 <input type="text" name="wpt-username" id="wpt-username" value="<?php echo esc_attr( $twitter_username ); ?>"/>

55 </td>

56 </tr>

59 <label for="wpt-remove"><?php _e( 'Hide account name in Tweets', 'wp-to-twitter' ); ?></label></th>

60 <td>

61 <input type="checkbox" name="wpt-remove" id="wpt-remove" aria-describedby="wpt-remove-desc" value="on"<?php checked( 'on', $wpt_remove ); ?> /> <span id="wpt-remove-desc"><?php _e( 'Do not display my account in the #account# template tag.', 'wp-to-twitter' ); ?></span>

62 </td>

63 </tr>

File.php (https://github.com/lanmediaservice/lms-tplib.git) PHP · 397 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 16212 2009-06-21 19:24:49Z thomas $

22 */

23

25 * @see Zend_OpenId_Provider_Storage

26 */

27 //*** require_once "Zend/OpenId/Provider/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

class-wc-customer.php (https://gitlab.com/haque.mdmanzurul/soundkreationsfinal) PHP · 569 lines

1 <?php

2 /**

3 * Customer

375 if ( is_user_logged_in() && $get_user_profile_data ) {

376 foreach ( $this->_data as $key => $value ) {

377 $meta_value = get_user_meta( get_current_user_id(), ( false === strstr( $key, 'shipping_' ) ? 'billing_' : '' ) . $key, true );

378 $this->_data[ $key ] = $meta_value ? $meta_value : $this->_data[ $key ];

379 }

562

563 if ( is_user_logged_in() ) {

564 $downloads = wc_get_customer_available_downloads( get_current_user_id() );

565 }

566

File.php (https://github.com/gryzz/crystal_magento.git) PHP · 460 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 16212 2009-06-21 19:24:49Z thomas $

22 */

23

25 * @see Zend_OpenId_Consumer_Storage

26 */

27 #require_once "Zend/OpenId/Consumer/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

File.php (https://github.com/drietsch/newcms.git) PHP · 397 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php,v 1.1 2008/05/13 13:41:32 holger.meyer Exp $

22 */

23

25 * @see Zend_OpenId_Provider_Storage

26 */

27 require_once "Zend/OpenId/Provider/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

revisions.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 341 lines

1 <?php

2

3 /**

131

132 /**

133 * Tests the Caps used in the action=view case of wp-admin/revision.php

134 * @ticket 16847

135 */

156

157 /**

158 * Tests the Caps used in the action=restore case of wp-admin/revision.php

159 * @ticket 16847

160 */

179

180 /**

181 * Tests the Caps used in the action=diff case of wp-admin/revision.php

182 * @ticket 16847

183 */

File.php (https://github.com/kiranatama/sagalaya.git) PHP · 439 lines

1 <?php

2

3 /**

59 }

60 }

61 $user = get_current_user();

62 if (is_string($user) && !empty($user)) {

63 $tmp .= '/' . $user;

File.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 448 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $

22 */

23

31 * @see Zend_OpenId_Provider_Storage

32 */

33 require_once "Zend/OpenId/Provider/Storage.php";

34

35 /**

68 }

69 }

70 $user = get_current_user();

71 if (is_string($user) && !empty($user)) {

72 $tmp .= '/' . $user;

File.php (https://github.com/su2921iw/ma3.git) PHP · 460 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 16212 2009-06-21 19:24:49Z thomas $

22 */

23

25 * @see Zend_OpenId_Consumer_Storage

26 */

27 require_once "Zend/OpenId/Consumer/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

functions.php (https://bitbucket.org/midasinc/your-submission.git) PHP · 306 lines

1 <?php

2 function load_membership_plugins() {

3 if ( is_dir( membership_dir('membershipincludes/plugins') ) ) {

5 $mem_plugins = array ();

6 while ( ( $plugin = readdir( $dh ) ) !== false )

7 if ( substr( $plugin, -4 ) == '.php' )

8 $mem_plugins[] = $plugin;

9 closedir( $dh );

141 global $M_add_ping;

142

143 $user = wp_get_current_user();

144

145 if(count($pings) >= 2) {

287 function M_remove_old_plugin( $plugins ) {

288

289 if(array_key_exists('membership/membership.php', $plugins) && !in_array('membership.php', (array) array_map('basename', wp_get_active_and_valid_plugins() ))) {

290 unset($plugins['membership/membership.php']);

ms-delete-site.php (https://gitlab.com/mostafame/team_website) PHP · 95 lines

1 <?php

2 /**

3 * Multisite delete site panel.

8 */

9

10 require_once( dirname( __FILE__ ) . '/admin.php' );

11

12 if ( !is_multisite() )

26

27 $blog = get_blog_details();

28 $user = wp_get_current_user();

29

30 $title = __( 'Delete Site' );

31 $parent_file = 'tools.php';

32 require_once( ABSPATH . 'wp-admin/admin-header.php' );

class-wc-customer.php (https://gitlab.com/webkod3r/tripolis) PHP · 575 lines

1 <?php

2

3 if ( ! defined( 'ABSPATH' ) ) {

381 if ( is_user_logged_in() && $get_user_profile_data ) {

382 foreach ( $this->_data as $key => $value ) {

383 $meta_value = get_user_meta( get_current_user_id(), ( false === strstr( $key, 'shipping_' ) ? 'billing_' : '' ) . $key, true );

384 $this->_data[ $key ] = $meta_value ? $meta_value : $this->_data[ $key ];

385 }

568

569 if ( is_user_logged_in() ) {

570 $downloads = wc_get_customer_available_downloads( get_current_user_id() );

571 }

572

class-lp-quiz-factory.php (https://gitlab.com/gregtyka/lfmawordpress) PHP · 255 lines

1 <?php

2

3 class LP_Quiz_Factory {

22

23 static function yyy() {

24 $user = learn_press_get_current_user();

25 if ( $user instanceof LP_User_Guest ) {

26 $expire = get_user_meta( $user->id, '_lp_anonymous_user_expire', true );

75

76 LP()->set_object( 'quiz', $quiz, true );

77 $user = learn_press_get_current_user();

78

79 if ( $quiz->is_require_enrollment() && $user->is( 'guest' ) ) {

161 $quiz_id = learn_press_get_request( 'quiz_id' );

162 $quiz = LP_Quiz::get_quiz( $quiz_id );

163 $user = learn_press_get_current_user();

164 self::_verify_nonce();

165 LP()->set_object( 'quiz', $quiz, true );

MPSUM_Logs.php (https://gitlab.com/memuller.web/wp_site) PHP · 436 lines

1 <?php

2 /**

3 * Easy Updates Manager log controller

206 private function get_name_for_update( $type, $slug ) {

207 if ( ! function_exists( 'get_plugins' ) ) {

208 require_once ABSPATH . 'wp-admin/includes/plugin.php';

209 }

210 switch ( $type ) {

231 global $wpdb;

232 $tablename = $wpdb->base_prefix . 'eum_logs';

233 $user_id = get_current_user_id();

234 if ( 0 == $user_id ) return; // If there is no user, this is not a manual update

235

236 switch( $options[ 'type' ] ) {

237 case 'core':

238 include( ABSPATH . WPINC . '/version.php' );

239 $wpdb->insert(

240 $tablename,

class.adminbar.php (https://gitlab.com/najomie/fit-hippie) PHP · 220 lines

1 <?php

2 if(!class_exists('M_Adminbar')) {

3

102 $title = __('Membership', 'membership') . " : <span style='color:red; text-shadow: 1px 1px 0 #000;'>" . __('Disabled', 'membership') . "</span>";

103 $metatitle = __('Click to Enable the Membership protection', 'membership');

104 $linkurl = wp_nonce_url(admin_url("admin.php?page=membership&amp;action=activate"), 'toggle-plugin');

105 $wp_admin_bar->add_menu( array(

106 'id' => 'membership',

115

116

117 $linkurl = wp_nonce_url(admin_url("admin.php?page=membership&amp;action=activate"), 'toggle-plugin');

118 $wp_admin_bar->add_menu( array(

119 'parent' => 'membership',

168 if(!empty($levels)) {

169 foreach( $levels as $key => $level ) {

170 $linkurl = wp_nonce_url(admin_url("admin.php?page=membership&amp;action=membershipuselevel&amp;level_id=" . $level->id), 'membershipuselevel-' . $level->id);

171 $wp_admin_bar->add_menu( array(

172 'parent' => 'membershipuselevel',

settings.php (https://gitlab.com/Blueprint-Marketing/interoccupy.net) PHP · 185 lines

1 <?php

2 /**

3 * Settings Controller

117 */

118 public function action_suppress_enable_notice() {

119 update_user_meta(get_current_user_id(), 'social_suppress_enable_notice', 'true');

120 }

121

126 */

127 public function action_suppress_no_accounts_notice() {

128 update_user_meta(get_current_user_id(), 'social_suppress_no_accounts_notice', 'true');

129 }

130

161 */

162 public function action_clear_2_0_upgrade() {

163 delete_user_meta(get_current_user_id(), 'social_2.0_upgrade');

164 }

165

lessons.php (https://gitlab.com/ezgonzalez/integral) PHP · 174 lines

93 ?>

94

95 <?php

96

97 $lessons = Sensei()->modules->get_none_module_lessons( $course->ID );

100 <h3>

101

102 <?php

103 // lesson title will already appear above

104 if ( $course_has_lessons_in_modules ) {

129 <h2>

130

131 <a href="<?php echo esc_url_raw( get_permalink( $lesson->ID ) ) ?>" title="<?php esc_attr_e( sprintf( __( 'Start %s', 'woothemes-sensei' ), $lesson->post_title ) ) ?>" >

132

133 <?php esc_html_e( sprintf( __( '%s', 'woothemes-sensei' ), $lesson->post_title ) ); ?>

tm-notification.class.php (https://bitbucket.org/anneivycat/california-tour.git) PHP · 186 lines

16 $job = $iclTranslationManagement->get_translation_job($job_id);

17 $translators = $iclTranslationManagement->get_blog_translators(array('to'=>$job->language_code));

18 $edit_url = get_option('siteurl') . '/wp-admin/admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/translations-queue.php&job_id=' . $job_id;

19 $tj_url = get_option('siteurl') . '/wp-admin/admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/translations-queue.php';

56 if($job->manager_id == $job->translator_id) return;

57

58 $edit_url = get_option('siteurl') . '/wp-admin/admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/translations-queue.php&job_id=' . $job_id;

59 $tj_url = get_option('siteurl') . '/wp-admin/admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/translations-queue.php';

100 $job->language_code, $user_language));

101

102 $tj_url = get_option('siteurl') . '/wp-admin/admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/translation-management.php&sm=jobs';

103 $doc_url = get_edit_post_link($job->original_doc_id);

104

128 $manager = new WP_User($job->manager_id);

129

130 $tj_url = get_option('siteurl') . '/wp-admin/admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/translation-management.php&sm=jobs';

131

132 // get current user admin language

mtrl-topbar.php (https://gitlab.com/neyberbz/suelos-ualm) PHP · 243 lines

1 <?php

2 /**

3 * @Package: WordPress Plugin

8 */

9 ?>

10 <?php

11

12 function mtrl_admintopbar(){

212 if($greet != ""){ $greet .= ', '; }

213

214 $user_id = get_current_user_id();

215 $current_user = wp_get_current_user();

my_view_page.php (https://github.com/osarrat/sigmah-website.git) PHP · 174 lines

1 <?php

2 # MantisBT - a php based bugtracking system

24 * MantisBT Core API's

25 */

26 require_once( 'core.php' );

27

28 require_once( 'compress_api.php' );

29 require_once( 'filter_api.php' );

30 require_once( 'last_visited_api.php' );

32 auth_ensure_user_authenticated();

33

34 $t_current_user_id = auth_get_current_user_id();

35

36 # Improve performance by caching category data in one pass

main_page.php (https://github.com/fusenigk/mantisbt-1.git) PHP · 135 lines

1 <?php

2 # MantisBT - A PHP based bugtracking system

24 * @link http://www.mantisbt.org

25 *

26 * @uses core.php

27 * @uses access_api.php

28 * @uses authentication_api.php

29 * @uses config_api.php

30 * @uses constant_inc.php

31 * @uses current_user_api.php

32 * @uses gpc_api.php

33 * @uses helper_api.php

account_prof_menu_page.php (https://github.com/osarrat/sigmah-website.git) PHP · 178 lines

1 <?php

2 # MantisBT - a php based bugtracking system

17 /**

18 * This page allows users to add a new profile which is POSTed to

19 * account_prof_add.php

20 *

21 * Users can also manage their profiles

29 * MantisBT Core API's

30 */

31 require_once( 'core.php' );

32

33 if ( isset( $g_global_profiles ) ) {

37 }

38

39 require_once( 'current_user_api.php' );

40

41 auth_ensure_user_authenticated();

tag_attach.php (https://github.com/fusenigk/mantisbt-1.git) PHP · 163 lines

1 <?php

2 # MantisBT - A PHP based bugtracking system

20 * @link http://www.mantisbt.org

21 *

22 * @uses core.php

23 * @uses access_api.php

24 * @uses authentication_api.php

25 * @uses bug_api.php

26 * @uses config_api.php

27 * @uses constant_inc.php

28 * @uses event_api.php

29 * @uses form_api.php

class-hfe-addons-actions.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 175 lines

1 <?php

2 /**

3 * Plugin AJAX functions.

55 check_ajax_referer( 'hfe-admin-nonce', 'nonce' );

56

57 update_user_meta( get_current_user_id(), 'hfe-popup', 'dismissed' );

58 }

59

84 // Successfully subscribed.

85 if ( isset( $response['success'] ) && $response['success'] ) {

86 update_user_meta( get_current_user_ID(), 'hfe-subscribed', 'yes' );

87 wp_send_json_success( $response );

88 }

options.php (https://github.com/livinglab/openlab.git) PHP · 359 lines

1 <?php

2 /**

3 * Achievements user options

36 // Default to current user

37 if ( empty( $user_id ) && is_user_logged_in() )

38 $user_id = get_current_user_id();

39

40 // No user, bail out

65 // Default to current user

66 if ( empty( $user_id ) && is_user_logged_in() )

67 $user_id = get_current_user_id();

68

69 // No user, bail out

130 // Default to current user

131 if ( empty( $user_id ) && is_user_logged_in() )

132 $user_id = get_current_user_id();

133

134 // No user, bail out

class-wishpond-campaign.php (https://gitlab.com/vanafroo/landingpage) PHP · 223 lines

1 <?php

2 if (!class_exists('WishpondCampaign')) {

3 class WishpondCampaign {

47 $fields = array(

48 'post_name' => $this->path,

49 'post_author' => get_current_user_id(),

50 'post_content' => $this->campaign_shortcode(),

51 'post_title' => htmlspecialchars($this->path),

bookmark.php (https://gitlab.com/webkod3r/tripolis) PHP · 316 lines

1 <?php

2 /**

3 * WordPress Bookmark Administration API

183 $link_target = ( ! empty( $r['link_target'] ) ) ? $r['link_target'] : '';

184 $link_visible = ( ! empty( $r['link_visible'] ) ) ? $r['link_visible'] : 'Y';

185 $link_owner = ( ! empty( $r['link_owner'] ) ) ? $r['link_owner'] : get_current_user_id();

186 $link_notes = ( ! empty( $r['link_notes'] ) ) ? $r['link_notes'] : '';

187 $link_description = ( ! empty( $r['link_description'] ) ) ? $r['link_description'] : '';

301 function wp_link_manager_disabled_message() {

302 global $pagenow;

303 if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow )

304 return;

305

309

310 if ( $really_can_manage_links && current_user_can( 'install_plugins' ) ) {

311 $link = network_admin_url( 'plugin-install.php?tab=search&amp;s=Link+Manager' );

312 wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) );

313 }

wpml-post-edit-ajax.class.php (https://gitlab.com/woxiprogrammers/infinia-wordpress) PHP · 212 lines

1 <?php

2

3 class WPML_Post_Edit_Ajax {

157 $result = false;

158

159 set_transient( md5( $sitepress->get_current_user()->ID . 'current_user_post_edit_lang' ), $to );

160 if ( $post_id && $to ) {

161

182 // Synchronize the posts terms languages. Do not create automatic translations though.

183 WPML_Terms_Translations::sync_post_terms_language( $post_id );

184 require_once ICL_PLUGIN_PATH . '/inc/cache.php';

185 icl_cache_clear( $post_type . 's_per_language', true );

186

203 }

204

205 set_transient( md5( $sitepress->get_current_user()->ID . 'current_user_post_edit_lang' ), $lang_code );

206 }

207

File.php (https://github.com/drietsch/newcms.git) PHP · 435 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php,v 1.1 2008/05/13 13:41:31 holger.meyer Exp $

22 */

23

25 * @see Zend_OpenId_Consumer_Storage

26 */

27 require_once "Zend/OpenId/Consumer/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

class.wpcom-json-api-comment-endpoint.php (https://gitlab.com/thisishayat/itv-2016) PHP · 198 lines

1 <?php

2

3

73 case 'display' :

74 if ( 'approved' !== $status ) {

75 $current_user_id = get_current_user_id();

76 $user_can_read_coment = false;

77 if ( $current_user_id && $comment->user_id && $current_user_id == $comment->user_id ) {

form-reply.php (https://gitlab.com/woxiprogrammers/infinia-wordpress) PHP · 170 lines

55 <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />

56 <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />

57 </p>

58

67 <fieldset class="bbp-form">

68 <legend>

69 <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />

70 <label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />

72

73 <div>

74 <label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />

75 <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />

89 <?php bbp_cancel_reply_to_link(); ?>

90

91 <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit" class="fusion-button button-default button-small submit"><?php _e( 'Submit', 'bbpress' ); ?></button>

92

93 <?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?>

class.ls.sliders.php (https://gitlab.com/haque.mdmanzurul/soundkreationsfinal) PHP · 397 lines

1 <?php

2

3 class LS_Sliders {

168 // Insert slider, WPDB will escape data automatically

169 $wpdb->insert($wpdb->prefix.LS_DB_TABLE, array(

170 'author' => get_current_user_id(),

171 'name' => $title,

172 'slug' => '',

Preferences.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 181 lines

1 <?php

2 /**

3 * Data object persisted as a WordPress user meta entry under the loco_prefs key

35 */

36 public static function get(){

37 $id = get_current_user_id();

38 if( ! $id ){

39 // allow null return only on command line. All web users must be logged in

40 if( 'cli' === PHP_SAPI || defined('LOCO_TEST') ){

41 return null;

42 }

70 */

71 public static function clear(){

72 get_current_user_id() && self::get()->remove();

73 }

74

Tools.php (https://github.com/livinglab/openlab.git) PHP · 161 lines

1 <?php

2

3 class B2S_Post_Tools {

5 public static function updateUserSchedTimePost($post_id, $date, $time, $timezone) {

6 global $wpdb;

7 $sql = $wpdb->prepare("SELECT id FROM {$wpdb->prefix}b2s_posts WHERE id =%d AND blog_user_id = %d AND publish_date = %s", (int) $post_id, (int) get_current_user_id(), "0000-00-00 00:00:00");

8 $id = $wpdb->get_col($sql);

9 if (isset($id[0]) && $id[0] == $post_id) {

127 public static function countNewNotifications($userId = 0) {

128 if($userId > 0) {

129 require_once(B2S_PLUGIN_DIR . 'includes/Options.php');

130 $options = new B2S_Options($userId);

131 $lastDate = $options->_getOption('lastNotificationUpdate');

template.php (https://github.com/boonebgorges/BuddyPress.git) PHP · 362 lines

1 <?php

2

3 /**

279

280 // set user to anonymous

281 $old_current_user = get_current_user_id();

282 $this->set_current_user( 0 );

283

config-options.php (https://github.com/sharpmachine/wakeupmedia.com.git) PHP · 130 lines

11 $attr_name = sanitize_title($name); // Using sanitize_title since there's no comparable function for attributes

12 ?>

13 <input type="checkbox" id="atd_<?php echo ($attr_name) ?>" name="<?php echo $options['name'] ?>[<?php echo $name; ?>]" value="1" <?php checked( '1', isset( $options[$name] ) ? $options[$name] : false ); ?>> <label for="atd_<?php echo $attr_name ?>"><?php echo $value; ?></label>

14 <?php

20 function AtD_process_options_update() {

21

22 $user = wp_get_current_user();

23

24 if ( ! $user || $user->ID == 0 )

56 ?></p>

57

58 <p style="font-weight: bold"><?php _e('English Options', 'jetpack'); ?></font>

59

60 <p><?php _e('Enable proofreading for the following grammar and style rules when writing posts and pages:', 'jetpack'); ?></p>

81 AtD_print_option( 'Redundant Expression', __('Redundant Phrases', 'jetpack'), $options_show_types );

82 ?></p>

83 <p><?php printf( __( '<a href="%s">Learn more</a> about these options.', 'jetpack' ), 'http://support.wordpress.com/proofreading/' );

84 ?></p>

85

form-topic.php (https://gitlab.com/woxiprogrammers/infinia-wordpress) PHP · 228 lines

55 <label for="bbp_topic_title"><?php printf( __( 'Topic Title (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />

56 <input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" />

57 </p>

58

81 <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />

82 <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />

83 </p>

84

159 <?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?>

160

161 <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="fusion-button button-default button-small submit"><?php _e( 'Submit', 'bbpress' ); ?></button>

162

163 <?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>

174 <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" />

175

176 <?php if ( bbp_is_topic_edit() && ( bbp_get_topic_author_id() !== bbp_get_current_user_id() ) ) : ?>

177

178 <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>

bug_monitor_add.php (https://github.com/fusenigk/mantisbt-1.git) PHP · 101 lines

1 <?php

2 # MantisBT - A PHP based bugtracking system

23 * @link http://www.mantisbt.org

24 *

25 * @uses core.php

26 * @uses access_api.php

27 * @uses authentication_api.php

28 * @uses bug_api.php

29 * @uses config_api.php

30 * @uses constant_inc.php

31 * @uses error_api.php

32 * @uses form_api.php

user.php (https://github.com/socialplanning/opencore-wordpress-mu.git) PHP · 182 lines

1 <?php

2

3 function get_profile($field, $user = false) {

14 }

15

16 // TODO: xmlrpc only. Maybe move to xmlrpc.php.

17 function user_pass_ok($user_login,$user_pass) {

18 global $cache_userdata;

33

34 if ( empty($user) )

35 $user = wp_get_current_user();

36 else

37 $user = get_userdata($user);

163

164 if ( '' == $user_id )

165 $user = wp_get_current_user();

166 else

167 $user = new WP_User($user_id);

class-form-tags.php (https://gitlab.com/bhargavi_dcw/dflocal) PHP · 263 lines

1 <?php

2

3 /**

211 public function get_user_property( $args = array() ) {

212 $property = empty( $args['property'] ) ? 'user_email' : $args['property'];

213 $user = wp_get_current_user();

214

215 if( $user instanceof WP_User ) {

252 // then , try logged-in user

253 if( is_user_logged_in() ) {

254 $user = wp_get_current_user();

255 return $user->user_email;

256 }

function.getlastmod.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 85 lines

9 <div class="prev" style="text-align: left; float: left;"><a href="function.getenv.html">getenv</a></div>

10 <div class="next" style="text-align: right; float: right;"><a href="function.getmygid.html">getmygid</a></div>

11 <div class="up"><a href="ref.info.html">PHP オプション/情報 関数</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

14 <div class="refnamediv">

15 <h1 class="refname">getlastmod</h1>

16 <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">getlastmod</span> &mdash; <span class="dc-title">最終更新時刻を取得する</span></p>

17

18 </div>

51 <p><b>例1 <span class="function"><b>getlastmod()</b></span> の例</b></p>

52 <div class="example-contents">

53 <div class="phpcode"><code><span style="color: #000000">

54 <span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;たとえば、'最終更新時刻:March&nbsp;04&nbsp;1998&nbsp;20:43:59.'&nbsp;を出力します<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"最終更新時刻:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">date&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"F&nbsp;d&nbsp;Y&nbsp;H:i:s."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">getlastmod</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>

70 <li class="member"><span class="function"><a href="function.getmygid.html" class="function" rel="rdfs-seeAlso">getmygid()</a> - PHP スクリプトの所有者の GID を得る</span></li>

71 <li class="member"><span class="function"><a href="function.get-current-user.html" class="function" rel="rdfs-seeAlso">get_current_user()</a> - 現在の PHP スクリプトの所有者の名前を取得する</span></li>

72 <li class="member"><span class="function"><a href="function.getmyinode.html" class="function" rel="rdfs-seeAlso">getmyinode()</a> - 現在のスクリプトの inode を取得する</span></li>

73 <li class="member"><span class="function"><a href="function.getmypid.html" class="function" rel="rdfs-seeAlso">getmypid()</a> - PHP のプロセス ID を取得する</span></li>

notifications.php (https://github.com/dxw/buddypress.git) PHP · 263 lines

1 <?php

2

3 /**

14 public function setUp() {

15 parent::setUp();

16 $this->current_user = get_current_user_id();

17 $this->u1 = $this->factory->user->create();

18 $this->u2 = $this->factory->user->create();

class-secrets.php (https://github.com/livinglab/openlab.git) PHP · 281 lines

1 <?php

2 /**

3 * The Jetpack Connection Secrets class file.

57 public function generate( $action, $user_id = false, $exp = 600 ) {

58 if ( false === $user_id ) {

59 $user_id = get_current_user_id();

60 }

61

File.php (https://github.com/jorgenils/zend-framework.git) PHP · 397 lines

1 <?php

2

3 /**

25 * @see Zend_OpenId_Provider_Storage

26 */

27 require_once "Zend/OpenId/Provider/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

auto-update-watcher.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 204 lines

1 <?php

2

3 namespace Yoast\WP\SEO\Integrations\Watchers;

125 // We wish to have its value in a different option, so we can still access it even when the notification gets removed.

126 if ( $notification_dismissed && ! \get_user_option( 'wp_' . self::NOTIFICATION_ID . '_dismissed' ) ) {

127 \update_user_option( \get_current_user_id(), self::NOTIFICATION_ID . '_dismissed', true );

128 }

129 }

181

182 // Check if the Yoast SEO plugin file is in the array of plugins for which auto-updates are enabled.

183 return \in_array( 'wordpress-seo/wp-seo.php', $plugins_to_auto_update, true );

184 }

185

BWGModelGalleries_bwg.php (https://gitlab.com/edgarze188/sunrise) PHP · 185 lines

1 <?php

2

3 class BWGModelGalleries_bwg {

16 ////////////////////////////////////////////////////////////////////////////////////////

17 public function __construct() {

18 $user = get_current_user_id();

19 $screen = get_current_screen();

20 $option = $screen->get_option('per_page', 'option');

34 global $wpdb;

35 if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {

36 $where = " WHERE author=" . get_current_user_id();

37 }

38 else {

62 global $wpdb;

63 if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {

64 $where = " WHERE author=" . get_current_user_id();

65 }

66 else {

monitor.php (https://gitlab.com/relacilia/cakra) PHP · 156 lines

1 <?php

2 /**

3 * Module Name: Monitor

54 public function jetpack_configuration_screen() {

55 ?>

56 <p><?php esc_html_e( 'Nobody likes downtime, and that\'s why Jetpack Monitor is on the job, keeping tabs on your site by checking it every five minutes. As soon as any downtime is detected, you will receive an email notification alerting you to the issue. That way you can act quickly, to get your site back online again!', 'jetpack' ); ?>

57 <p><?php esc_html_e( 'We’ll also let you know as soon as your site is up and running, so you can keep an eye on total downtime.', 'jetpack'); ?></p>

58 <div class="narrow">

59 <?php if ( Jetpack::is_user_connected() && current_user_can( 'manage_options' ) ) : ?>

60 <?php $user_email = Jetpack::get_connected_user_email(); ?>

61 <form method="post" id="monitor-settings">

62 <input type="hidden" name="action" value="monitor-save" />

63 <?php wp_nonce_field( 'monitor-settings' ); ?>

64

65 <table id="menu" class="form-table">

File.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 442 lines

1 <?php

2

3 /**

25 * @see Zend_OpenId_Provider_Storage

26 */

27 // require_once "Zend/OpenId/Provider/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

bookmark.php (https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git) PHP · 290 lines

1 <?php

2 /**

3 * WordPress Bookmark Administration API

169

170 if ( empty( $link_owner ) )

171 $link_owner = get_current_user_id();

172

173 if ( empty( $link_notes ) )

274 function wp_link_manager_disabled_message() {

275 global $pagenow;

276 if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow )

277 return;

278

282

283 if ( $really_can_manage_links && current_user_can( 'install_plugins' ) ) {

284 $link = network_admin_url( 'plugin-install.php?tab=search&amp;s=Link+Manager' );

285 wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) );

286 }

resultados-template-old.php (https://gitlab.com/humbertolopez/elgon) PHP · 252 lines

1 <?php

2 /*

3 Template name: Resultados de evaluación

5 get_header();

6 ?>

7 <?php if(is_user_logged_in()) { ?>

8 <?php if(have_posts()) : while(have_posts()) : the_post(); ?>

9 <section class="block fichas-container">

10 <h1><?php the_title(); ?></h1>

11 <?php the_content(); ?>

14 <li class="pregunta-evaluacion">

15 <h3>¿De dónde es originario Elgon y en qué año nace?</h3>

16 <?php

17 $eval1quest1 = get_user_meta(get_current_user_id(),'_eval1quest1',true);

config-options.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 128 lines

11 $attr_name = sanitize_title($name); // Using sanitize_title since there's no comparable function for attributes

12 ?>

13 <input type="checkbox" id="atd_<?php echo esc_attr( $attr_name ) ?>" name="<?php echo esc_attr( $options['name'] ); ?>[<?php echo esc_attr( $name ); ?>]" value="1" <?php checked( '1', isset( $options[$name] ) ? $options[$name] : false ); ?>> <label for="atd_<?php echo esc_attr( $attr_name ); ?>"><?php echo esc_html( $value ); ?></label>

14 <?php

20 function AtD_process_options_update() {

21

22 $user = wp_get_current_user();

23

24 if ( ! $user || $user->ID == 0 )

56 ?></p>

57

58 <p style="font-weight: bold"><?php _e('English Options', 'jetpack'); ?></font>

59

60 <p><?php _e('Enable proofreading for the following grammar and style rules when writing posts and pages:', 'jetpack'); ?></p>

81 AtD_print_option( 'Redundant Expression', __('Redundant Phrases', 'jetpack'), $options_show_types );

82 ?></p>

83 <p><?php printf( __( '<a href="%s">Learn more</a> about these options.', 'jetpack' ), 'http://support.wordpress.com/proofreading/' );

84 ?></p>

85

profile_api.php (https://github.com/osarrat/sigmah-website.git) PHP · 332 lines

1 <?php

2 # MantisBT - a php based bugtracking system

238 */

239 function profile_get_field_all_for_user( $p_field, $p_user_id = null ) {

240 $c_user_id = ( $p_user_id === null ) ? auth_get_current_user_id() : db_prepare_int( $p_user_id );

241

242 switch( $p_field ) {

form-topic.php (https://github.com/livinglab/openlab.git) PHP · 251 lines

80 <label for="bbp_topic_title"><?php printf( __( 'Topic Title (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />

81 <input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" />

82 </p>

83

113 <label for="bbp_topic_tags"><?php _e( 'Topic Tags:', 'bbpress' ); ?></label><br />

114 <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />

115 </p>

116

188 <label for="bbp_topic_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />

189 <input type="text" value="<?php bbp_form_topic_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />

190 </div>

191 </fieldset>

211 <?php endif; ?>

212

213 <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="btn btn-primary submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>

214

215 <?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>

File.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 442 lines

1 <?php

2

3 /**

25 * @see Zend_OpenId_Provider_Storage

26 */

27 #require_once "Zend/OpenId/Provider/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

form-reply.php (https://github.com/livinglab/openlab.git) PHP · 241 lines

1 <?php

2

3 /**

90 <label for="bbp_topic_tags"><?php esc_html_e( 'Tags:', 'bbpress' ); ?></label><br />

91 <input type="text" value="<?php bbp_form_topic_tags(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />

92 </p>

93

104 <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> />

105

106 <?php if ( bbp_is_reply_edit() && ( bbp_get_reply_author_id() !== bbp_get_current_user_id() ) ) : ?>

107

108 <label for="bbp_topic_subscription"><?php esc_html_e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>

155

156 <div>

157 <label for="bbp_reply_edit_reason"><?php printf( esc_html__( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />

158 <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />

File.php (https://github.com/shevron/zf2.git) PHP · 426 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

46 }

47 }

48 $user = get_current_user();

49 if (is_string($user) && !empty($user)) {

50 $tmp .= '/' . $user;

slashes.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 210 lines

1 <?php

2

3 /**

10 parent::setUp();

11 $this->author_id = $this->factory->user->create( array( 'role' => 'administrator' ) );

12 $this->old_current_user = get_current_user_id();

13 wp_set_current_user( $this->author_id );

14

ratings.php (https://gitlab.com/Magi1053/Extra) PHP · 221 lines

1 <?php

2 // Prevent file from being loaded directly

3 if ( ! defined( 'ABSPATH' ) ) {

36 );

37

38 $user = wp_get_current_user();

39 if ( $user->exists() ) {

40 $commentdata['comment_author'] = wp_slash( $user->display_name );

168

169 // If the user is logged in

170 $user = wp_get_current_user();

171 if ( $user->exists() ) {

172 $args['user_id'] = $user->ID;

class-wc-stripe-connect-api.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 241 lines

1 <?php

2 if ( ! defined( 'ABSPATH' ) ) {

3 exit;

25 public function get_stripe_oauth_init( $return_url ) {

26

27 $current_user = wp_get_current_user();

28 $business_data = [];

29 $business_data['url'] = get_site_url();

class.wpcom-json-api-update-taxonomy-endpoint.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 148 lines

1 <?php

2

3 class WPCOM_JSON_API_Update_Taxonomy_Endpoint extends WPCOM_JSON_API_Taxonomy_Endpoint {

34 }

35

36 $user = wp_get_current_user();

37 if ( !$user || is_wp_error( $user ) || !$user->ID ) {

38 return new WP_Error( 'authorization_required', 'An active access token must be used to manage taxonomies.', 403 );

form-reply.php (https://bitbucket.org/travelertech/tt-main.git) PHP · 194 lines

60 <label for="bbp_reply_content"><?php _e( 'Reply:', 'bbpress' ); ?></label><br />

61 <textarea id="bbp_reply_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_reply_content" rows="6"><?php bbp_form_reply_content(); ?></textarea>

62 </p>

63

86 <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />

87 <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />

88 </p>

89

98 <p>

99

100 <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" />

101

102 <?php if ( bbp_is_reply_edit() && ( get_the_author_meta( 'ID' ) != bbp_get_current_user_id() ) ) : ?>

123 <legend><?php _e( 'Revision', 'bbpress' ); ?></legend>

124 <div>

125 <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />

126 <label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />

File.php (https://github.com/quarkness/piwik.git) PHP · 511 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $

22 */

23

25 * @see Zend_OpenId_Consumer_Storage

26 */

27 // require_once "Zend/OpenId/Consumer/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

paypal-transaction-complete.php (https://github.com/livinglab/openlab.git) PHP · 79 lines

1 <?php

2 require_once explode("wp-content", __FILE__)[0] . "wp-load.php";

5 }

6

7 $request_body = file_get_contents('php://input');

8 $primaryResponse = json_decode( $request_body, true );

9 global $wpdb;

11 $payment_terms = isset($paypal_settings['payment_terms']) ? $paypal_settings['payment_terms'] : 'lifetime';

12

13 $user_id = get_current_user_id();

14

15 $quiz_id = $primaryResponse['quizId'];

File.php (https://bitbucket.org/acidel/buykoala.git) PHP · 442 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $

22 */

23

25 * @see Zend_OpenId_Provider_Storage

26 */

27 #require_once "Zend/OpenId/Provider/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

File.php (https://github.com/bhaumik25/zend-framework.git) PHP · 435 lines

1 <?php

2

3 /**

25 * @see Zend_OpenId_Consumer_Storage

26 */

27 require_once "Zend/OpenId/Consumer/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

File.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 442 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $

22 */

23

25 * @see Zend_OpenId_Provider_Storage

26 */

27 require_once "Zend/OpenId/Provider/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

bug_actiongroup_attach_tags_inc.php (https://github.com/osarrat/sigmah-website.git) PHP · 125 lines

1 <?php

2 # MantisBT - a php based bugtracking system

25 * Requires Tag API

26 */

27 require_once( 'tag_api.php' );

28

29 /**

108 global $g_action_attach_tags_attach, $g_action_attach_tags_create;

109

110 $t_user_id = auth_get_current_user_id();

111

112 foreach( $g_action_attach_tags_create as $t_tag_row ) {

class-statistics-service.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 258 lines

1 <?php

2 /**

3 * WPSEO plugin file.

88 private function statistic_items() {

89 $transient = $this->get_transient();

90 $user_id = get_current_user_id();

91

92 if ( isset( $transient[ $user_id ] ) ) {

251 private function get_link_for_rank( WPSEO_Rank $rank ) {

252 if ( current_user_can( 'edit_others_posts' ) === false ) {

253 return esc_url( admin_url( 'edit.php?post_status=publish&post_type=post&seo_filter=' . $rank->get_rank() . '&author=' . get_current_user_id() ) );

254 }

255

256 return esc_url( admin_url( 'edit.php?post_status=publish&post_type=post&seo_filter=' . $rank->get_rank() ) );

257 }

258 }

ms-deprecated.php (https://gitlab.com/endomorphosis/reservationtelco) PHP · 151 lines

1 <?php

2 /**

3 * Deprecated functions from WordPress MU and the multisite feature. You shouldn't

45

46 if ( empty( $user_login ) ) {

47 $user_id = get_current_user_id();

48 if ( !$user_id )

49 return false;

101 * @deprecated Use $GLOBALS['current_user']->ID

102 */

103 function get_current_user_id() {

104 _deprecated_function( __FUNCTION__, '3.0', '$GLOBALS[\'current_user\']->ID' );

105 return $GLOBALS['current_user']->ID;

class-wp-admin-bar.php (https://github.com/abdullah1213/wordpress.git) PHP · 215 lines

146 ?>

147

148 <li id="<?php echo esc_attr( "wp-admin-bar-{$node->id}" ); ?>" class="<?php echo esc_attr( $menuclass ); ?>">

149 <a tabindex="1" href="<?php echo esc_url( $node->href ) ?>"<?php

150 if ( ! empty( $node->meta['onclick'] ) ) :

151 ?> onclick="<?php echo esc_js( $node->meta['onclick'] ); ?>"<?php

152 endif;

153 if ( ! empty( $node->meta['target'] ) ) :

154 ?> target="<?php echo esc_attr( $node->meta['target'] ); ?>"<?php

155 endif;

156 if ( ! empty( $node->meta['title'] ) ) :

157 ?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php

158 endif;

159

class-h5p-event.php (https://github.com/livinglab/openlab.git) PHP · 85 lines

1 <?php

2

3 /**

22

23 // Track the user who initiated the event as well

24 $current_user = wp_get_current_user();

25 $this->user = $current_user->ID;

26

Session.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 196 lines

1 <?php

2 /**

3 * Abstracts session data access using WP_Session_Tokens

78 }

79 parent::__construct( [] );

80 $this->manager = WP_Session_Tokens::get_instance( get_current_user_id() );

81 // populate object from stored session data

82 $data = $this->getRaw();

File.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 517 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 23161 2010-10-19 16:08:36Z matthew $

22 */

23

31 * @see Zend_OpenId_Consumer_Storage

32 */

33 require_once "Zend/OpenId/Consumer/Storage.php";

34

35 /**

68 }

69 }

70 $user = get_current_user();

71 if (is_string($user) && !empty($user)) {

72 $tmp .= '/' . $user;

users.php (https://bitbucket.org/adatux_/uakami.git) PHP · 254 lines

80 unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>

81

82 <h3><?php _e( 'Forums', 'bbpress' ); ?></h3>

83

84 <table class="form-table">

104 <?php foreach ( $dynamic_roles as $role => $details ) : ?>

105

106 <option <?php selected( $user_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>

107

108 <?php endforeach; ?>

141 <?php foreach ( $dynamic_roles as $role => $details ) : ?>

142

143 <option value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>

144

145 <?php endforeach; ?>

admin-uploads.php (https://github.com/voidit/nycga2.git) PHP · 121 lines

1 <?php

2

3 /* Admin Uploads

37 <hr />

38 <div id="bp-group-documents-bulk-message"></div>

39 <h2><?php _e('Bulk File Uploads','bp-group-documents'); ?></h2>

40 <div id="bp-group-documents-bulk-upload">

41 <div class="doc-list">

42 <?php foreach( $files as $file ) { ?>

43 <div class="doc-single">

44 <form method="post" class="bp-group-documents-admin-upload" action="">

45 <input type="hidden" name="file" value="<?php echo $file; ?>" />

46 <div class="file"><strong><?php echo $file; ?></strong></div>

class.jetpack-client-server.php (https://github.com/chopsuei3/oscc.git) PHP · 219 lines

1 <?php

2

3 /**

46 }

47

48 $current_user_id = get_current_user_id();

49 if ( $current_user_id != $data['state'] ) {

50 Jetpack::state( 'error', 'wrong_state' );

MimeTypeTest.php (https://github.com/ivebeenlinuxed/Boiler.git) PHP · 105 lines

1 <?php

2

3 /*

18 use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException;

19

20 class MimeTypeTest extends \PHPUnit_Framework_TestCase

21 {

22 protected $path;

75 public function testGuessWithNonReadablePath()

76 {

77 if (defined('PHP_WINDOWS_VERSION_BUILD')) {

78 $this->markTestSkipped('Can not verify chmod operations on Windows');

79 }

80

81 if (in_array(get_current_user(), array('root'))) {

82 $this->markTestSkipped('This test will fail if run under superuser');

83 }

File.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 511 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $

22 */

23

25 * @see Zend_OpenId_Consumer_Storage

26 */

27 require_once "Zend/OpenId/Consumer/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

capabilities.php (https://github.com/itspriddle/itt-capstone.git) PHP · 421 lines

1 <?php

2

3 class WP_Roles {

310 // Capability checking wrapper around the global $current_user object.

311 function current_user_can($capability) {

312 $current_user = wp_get_current_user();

313

314 $args = array_slice(func_get_args(), 1);

class-bp-suggestions.php (https://github.com/livinglab/openlab.git) PHP · 145 lines

1 <?php

2 /**

3 * Core component classes.

23 * While the implementation of the query logic is left to you, it should be as quick and efficient

24 * as possible. When implementing the abstract methods in this class, pay close attention to the

25 * recommendations provided in the phpDoc blocks, particularly the expected return types.

26 *

27 * @since 2.1.0

114

115 // Check for blocked users (e.g. deleted accounts, or spammers).

116 if ( is_user_logged_in() && ! bp_is_user_active( get_current_user_id() ) ) {

117 return new WP_Error( 'invalid_user' );

118 }

group-forum-attachments.php (https://github.com/OccupyWallStreet/nycga2.git) PHP · 69 lines

1 <?php

2

3 // Add group document uploading to new forum posts

9 </div>

10 <div id="nycga_group_files_forum_upload">

11 <label><?php _e('Choose File:','nycga-group-files'); ?></label>

12 <input type="file" name="nycga_group_files_file" class="bp-group-files-file" />

13

14 <div id="document-detail-clear" class="clear"></div>

15 <div class="document-info">

16 <label><?php _e('Display Name:','nycga-group-files'); ?></label>

17 <input type="text" name="nycga_group_files_name" id="nycga-group-files-name" />

18

19 <?php if( nycga_group_files_SHOW_DESCRIPTIONS ) { ?>

20 <label><?php _e('Description:', 'nycga-group-files'); ?></label>

class-initial-state.php (https://gitlab.com/chernushov881/charity-fund) PHP · 166 lines

1 <?php

2 /**

3 * The React initial state.

84 'features' => array_map(

85 'sanitize_text_field',

86 // phpcs:ignore WordPress.Security.NonceVerification.Recommended

87 isset( $_GET['features'] ) ? explode( ',', $_GET['features'] ) : array()

88 ),

96 */

97 protected function current_user_data() {

98 $current_user = wp_get_current_user();

99 $is_user_connected = $this->connection_manager->is_user_connected( $current_user->ID );

100 $is_master_user = $is_user_connected && (int) $current_user->ID && (int) Jetpack_Options::get_option( 'master_user' ) === (int) $current_user->ID;

capabilities.php (https://github.com/weissms/owb-mirror.git) PHP · 485 lines

1 <?php

2

3 class WP_Roles {

444 // Capability checking wrapper around the global $current_user object.

445 function current_user_can($capability) {

446 $current_user = wp_get_current_user();

447

448 if ( empty($current_user) )

tasks.php (https://github.com/livinglab/openlab.git) PHP · 112 lines

28 <?php if (isset($_GET['action']) && $_GET['action'] == 'view_task') : ?>

29 <div id="zpm_task_view">

30 <?php include( ZPM_PLUGIN_PATH . '/templates/parts/task-single.php' ); ?>

31 </div>

32 <?php else: ?>

35 <div class="zpm_no_results_message" style="<?php echo ($task_count > 0) ? 'display: none;' : ''; ?>">

36 <?php printf( __( 'No tasks created yet. To create a task, click on the \'Add\' button at the top right of the screen or click %s here %s', 'zephyr-project-manager' ), '<a id="zpm_first_task" class="zpm_button_link">', '</a>' ) ?>

37 </div>

38

70 <nav class="zpm_nav">

71 <ul class="zpm_nav_list">

72 <li class="zpm_nav_item zpm_selection_option zpm_nav_item_selected" data-zpm-filter="0" data-user-id="<?php echo $current_user->data->ID; ?>"><?php _e( 'My Tasks', 'zephyr-project-manager' ); ?></li>

73 <li class="zpm_nav_item zpm_selection_option" data-zpm-filter="-1"><?php _e( 'All Tasks', 'zephyr-project-manager' ); ?></li>

87 <div class="zpm_task_container">

88 <div id="zpm_task_list" class="zpm_settings_form">

89 <?php Tasks::view_task_list( array( 'user_tasks' => get_current_user_id() ) ); ?>

90 </div>

91 </div>

File.php (https://github.com/Riges/KawaiViewModel.git) PHP · 442 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: File.php 24593 2012-01-05 20:35:02Z matthew $

22 */

23

25 * @see Zend_OpenId_Provider_Storage

26 */

27 require_once "Zend/OpenId/Provider/Storage.php";

28

29 /**

62 }

63 }

64 $user = get_current_user();

65 if (is_string($user) && !empty($user)) {

66 $tmp .= '/' . $user;

class.debug.php (https://github.com/stonecoldtea/iona-dev.git) PHP · 228 lines

1 <?php

2 /**

3 *

17

18 /**

19 * PHP5 constructor

20 * Use this to build the initial form of the object, before its manipulated by methods

21 *

51 $uploads = wp_upload_dir();

52 // Get user role

53 $current_user = wp_get_current_user();

54 $user_roles = $current_user->roles;

55 $user_role = array_shift($user_roles);

98 );

99 $this->debug_info[] = array(

100 'title' => "PHP Version",

101 'value' => floatval( phpversion() ),

class-wc-connect-tracks.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 125 lines

1 <?php

2

3 // No direct access please

71 return;

72 }

73 $user = wp_get_current_user();

74 $site_url = get_option( 'siteurl' );

75

form-reply.php (https://github.com/billortell/skeleton_wp.git) PHP · 147 lines

53 <label for="bbp_reply_content"><?php _e( 'Reply:', 'bbpress' ); ?></label><br />

54 <textarea id="bbp_reply_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_reply_content" cols="51" rows="6"><?php bbp_form_reply_content(); ?></textarea>

55 </p>

56

94 <legend><?php _e( 'Revision', 'bbpress' ); ?></legend>

95 <div>

96 <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />

97 <label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />

101 <label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />

102 <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />

103 </div>

104 </fieldset>

111

112 <div class="bbp-submit-wrapper">

113 <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>

114 </div>

115 </div>

index.php (https://gitlab.com/nasservb/khalagh) PHP · 102 lines

26 <?php foreach ( $my_orders_columns as $column_id => $column_name ) : ?>

27 <th class="<?php echo esc_attr( $column_id ); ?>"><span class="nobr"><?php echo esc_html( $column_name ); ?></span></th>

28 <?php endforeach; ?>

31

32 <tbody>

33 <?php foreach ( $customer_orders as $customer_order ) :

34 $order = wc_get_order( $customer_order );

35 $item_count = $order->get_item_count();

38 <?php foreach ( $my_orders_columns as $column_id => $column_name ) : ?>

39 <td class="<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">

40 <?php if ( has_action( 'woocommerce_my_account_my_orders_column_' . $column_id ) ) : ?>

43 <?php elseif ( 'order-number' === $column_id ) : ?>

44 <a href="<?php echo '?dir=shop&p=view-order&order='.$order->get_order_number(); ?>">

45 <?php echo _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number(); ?>

48 <?php elseif ( 'order-date' === $column_id ) : ?>

49 <time datetime="<?php echo date( 'Y-m-d', strtotime( $order->order_date ) ); ?>" title="<?php echo esc_attr( strtotime( $order->order_date ) ); ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></time>

50

51 <?php elseif ( 'order-status' === $column_id ) : ?>

UnixFileSystem.php (git://github.com/alexgorbatchev/SyntaxHighlighter.git) text · 0 lines

1 <?php

2 /*

3 * $Id: UnixFileSystem.php 258 2007-10-21 00:46:45Z hans $

20 */

21

22 include_once 'phing/system/io/FileSystem.php';

23

24 /**

25 * UnixFileSystem class. This class encapsulates the basic file system functions

26 * for platforms using the unix (posix)-stylish filesystem. It wraps php native

27 * functions suppressing normal PHP error reporting and instead uses Exception

29 *

30 * This class is part of a oop based filesystem abstraction and targeted to run

31 * on all supported php platforms.

32 *

33 * Note: For debugging turn track_errors on in the php.ini. The error messages