Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- function post_excerpt_length($length) {
- return 18;
- }
- function new_excerpt_more($more) {
- global $post;
- return ' <a href="' . get_permalink( $post->ID ) . '" rel="#pin-' . $post->ID . '" class="whitebox more">read more</a>';
- }
- function add_last_class($input) {
- if (!empty( $input )) {
- $pattern = '/<li class="(?!.*<li class=")/is';
- $replacement = '<li class="last ';
- $input = preg_replace( $pattern, $replacement, $input );
- echo $input;
- }
- }
- function curPageURL() {
- $pageURL = 'http';
- if ($_SERVER['HTTPS'] == 'on') {
- $pageURL .= 's';
- }
- $pageURL .= '://';
- if ($_SERVER['SERVER_PORT'] != '80') {
- $pageURL .= $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];
- } else {
- $pageURL .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
- }
- return $pageURL;
- }
- function register_replacement() {
- if (!is_user_logged_in( )) {
- if (get_option( 'users_can_register' )) {
- $link = '<option value="' . site_url( 'wp-login.php?action=register', 'login' ) . '">' . __( 'Register' ) . '</option>';
- } else {
- $link = '';
- }
- } else {
- $link = '<option value="' . admin_url( ) . '">' . __( 'Site Admin' ) . '</option>';
- }
- return $link;
- }
- function check_user_approved_comments($author, $email) {
- global $wpdb;
- $sql = $wpdb->query( '' . 'SELECT comment_approved FROM ' . $wpdb->comments . ' WHERE comment_author = \'' . $author . '\' AND comment_author_email = \'' . $email . '\' and comment_approved = \'1\' LIMIT 1' );
- if (1 == $sql) {
- return true;
- }
- return false;
- }
- function next_posts_link_attributes() {
- return 'class="next"';
- }
- function prev_posts_link_attributes() {
- return 'class="prev"';
- }
- function autoset_featured() {
- global $post;
- $already_has_thumb = has_post_thumbnail( $post->ID );
- if (( !$already_has_thumb && get_option( 'pinclone_featured_image' ) == 1 )) {
- $attached_image = get_children( '' . 'post_parent=' . $post->ID . '&post_type=attachment&post_mime_type=image&numberposts=1' );
- if ($attached_image) {
- foreach ($attached_image as $attachment_id => $attachment) {
- set_post_thumbnail( $post->ID, $attachment_id );
- }
- }
- }
- }
- function remove_first_image($content) {
- if (get_option( 'pinclone_featured_image' ) == 1) {
- $content = preg_replace( '/<img[^>]+\>/i', '', $content, 1 );
- }
- return $content;
- }
- function validate_gravatar($email) {
- }
- function avatarcheck($userid, $useremail) {
- $avatarcount = 0;
- if ($userid) {
- if (validate_gravatar( $useremail )) {
- ++$avatarcount;
- }
- $local = get_usermeta( $userid, 'avatar' );
- if (0 < strlen( $local )) {
- ++$avatarcount;
- }
- if ($avatarcount == 0) {
- $avatarmsg = false;
- } else {
- $avatarmsg = true;
- }
- }
- return $avatarmsg;
- }
- function my_theme_register_required_plugins() {
- $plugins = array( array( 'name' => 'Ads', 'slug' => 'ads', 'source' => get_stylesheet_directory( ) . '/plugins/ads.zip', 'required' => false, 'force_activation' => false, 'force_deactivation' => true ), array( 'name' => 'Wordpress Social Login', 'slug' => 'wordpress-social-login', 'source' => get_stylesheet_directory( ) . '/plugins/wordpress-social-login.zip', 'required' => true, 'force_activation' => true, 'force_deactivation' => true ), array( 'name' => 'Video Thumbnails', 'slug' => 'video-thumbnails', 'source' => get_stylesheet_directory( ) . '/plugins/video-thumbnails.1.8.1.zip', 'required' => true, 'force_activation' => true, 'force_deactivation' => true ) );
- $theme_text_domain = 'tgmpa';
- $config = array( 'domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => array( 'page_title' => __( 'Install Required Plugins', $theme_text_domain ), 'menu_title' => __( 'Install Plugins', $theme_text_domain ), 'installing' => __( 'Installing Plugin: %s', $theme_text_domain ), 'oops' => __( 'Something went wrong with the plugin API.', $theme_text_domain ), 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ), 'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins' ), 'return' => __( 'Return to Required Plugins Installer', $theme_text_domain ), 'plugin_activated' => __( 'Plugin activated successfully.', $theme_text_domain ), 'complete' => __( 'All plugins installed and activated successfully. %s', $theme_text_domain ), 'nag_type' => 'updated' ) );
- tgmpa( $plugins, $config );
- }
- .......................................................................
- .........................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement