This file contains hidden or 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
| <?php | |
| /** | |
| * @copyright ... | |
| * @author Wil Moore III <wil.moore@wilmoore.com> | |
| */ | |
| use Zend_View_Helper_Url as Url; | |
| /** | |
| * View Helper to attach a query-string to URL |
This file contains hidden or 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
| /** | |
| * Show by default posts,tags and post-format meta-boxes on wp-admin/nav-menus.php | |
| * @param array $meta_boxes | |
| * @return array | |
| * @author Stergatu Lena <stergatu@cti.gr> | |
| * @version 1, 25/9/2014 | |
| */ | |
| function ls_initial_nav_menu_meta_boxes( $meta_boxes ) { | |
| if ( ! (in_array( 'add-post', $meta_boxes )) ) { | |
| $meta_boxes[] = 'add-post'; |
This file contains hidden or 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
| function LS_allow_group_creation( $can_create, $restricted = null ) { | |
| if (current_user_can('edit_others_posts') ) { | |
| return true; | |
| } | |
| else { | |
| return false; | |
| } | |
| } | |
| add_filter( 'bp_user_can_create_groups', 'LS_allow_group_creation' ); |
This file contains hidden or 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
| <?php | |
| require_once('wp-load.php') ; | |
| $expired = $wpdb->get_col( "SELECT option_name FROM | |
| wp_options | |
| WHERE option_name LIKE '_transient_timeout%' AND option_value < | |
| $time | |
| ; | |
| " ) ; |
This file contains hidden or 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
| add_action('wp_footer','ls_prettyPhoto_Download'); | |
| /** | |
| * Adds download functionality to prettyPhoto plugin | |
| * @author lenasterg | |
| */ | |
| function ls_prettyPhoto_Download() { | |
| echo ' | |
| <style>.pp_download{ background: #ccc; border-radius: 3px; height: 25px; padding: 4px;}</style> |
This file contains hidden or 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
| <?php | |
| /* Save selected data */ | |
| add_action( 'bp_core_signup_user', 'save_user_fields' ); | |
| add_action( 'personal_options_update', 'save_user_fields' ); | |
| add_action( 'edit_user_profile_update', 'save_user_fields' ); | |
| function save_user_fields( $user_id ) { | |
| if ( !current_user_can( 'edit_user', $user_id ) ) { | |
| return false; | |
| } |
This file contains hidden or 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
| add_action('bp_signup_profile_fields', 'Add_user_member_type'); | |
| function Add_user_member_type() { | |
| $member_types = bp_get_member_types(array(), 'objects'); | |
| if (count($member_types) > 0) { | |
| echo '<h3>Select your occupation</h3>'; | |
| // Loop in member types to build the tabs | |
| foreach ($member_types as $member_type) : | |
| ?> |
This file contains hidden or 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
| ////----- | |
| // 2. display members type tabs | |
| function ls_display_members_directory_tabs() { | |
| $member_types = bp_get_member_types( array(), 'objects' ); | |
| // Loop in member types to build the tabs | |
| foreach ( $member_types as $member_type ) : | |
This file contains hidden or 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
| <?php | |
| //1. dimiourgia pending posts me tin eggrafi toy xristi | |
| //@todo na pernaei custom post type | |
| function ls_create_new_user_posts($user_id) { | |
| //The post_author is the id of the superadmin | |
| $post_author = '1'; | |
| $user = get_user_by('id', $user_id); | |
| if (!$user_id > 0) { |
This file contains hidden or 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
| <?php | |
| require_once( dirname( __FILE__ ) . '/wp-load.php' ); | |
| header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); | |
| /* | |
| Plugin Name: Export Blogroll in OPML Format | |
| Plugin URI: http://w3.ipublicis.com/ | |
| Description: Exports your public blogroll in OPML format to a file on blog root. | |
| Version: 1.0 | |
| Author: Lopo Lencastre de Almeida - iPublicis.com |
OlderNewer