Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/portfoli...
File: portfolio.php
* Display template content
[2000] Fix | Delete
*
[2001] Fix | Delete
* @param object $second_query Query object.
[2002] Fix | Delete
*/
[2003] Fix | Delete
function prtfl_get_content( $second_query ) {
[2004] Fix | Delete
global $post, $prtfl_options;
[2005] Fix | Delete
[2006] Fix | Delete
$request = $second_query->request;
[2007] Fix | Delete
$count_portfolio_row_block = 0;
[2008] Fix | Delete
$prtfl_widht = 99 / $prtfl_options['custom_portfolio_row_count'];
[2009] Fix | Delete
[2010] Fix | Delete
if ( ! empty( $post ) && ! empty( $post->post_content ) ) {
[2011] Fix | Delete
$page_content = $post->post_content;
[2012] Fix | Delete
if ( function_exists( 'mltlngg_the_content_filter' ) ) {
[2013] Fix | Delete
$page_content = mltlngg_the_content_filter( $page_content );
[2014] Fix | Delete
}
[2015] Fix | Delete
/* dublicate filter 'the_content' - as we couldnt use it */
[2016] Fix | Delete
if ( function_exists( 'wptexturize' ) ) {
[2017] Fix | Delete
$page_content = wptexturize( $page_content );
[2018] Fix | Delete
}
[2019] Fix | Delete
if ( function_exists( 'convert_smilies' ) ) {
[2020] Fix | Delete
$page_content = convert_smilies( $page_content );
[2021] Fix | Delete
}
[2022] Fix | Delete
if ( function_exists( 'wpautop' ) ) {
[2023] Fix | Delete
$page_content = wpautop( $page_content );
[2024] Fix | Delete
}
[2025] Fix | Delete
if ( function_exists( 'shortcode_unautop' ) ) {
[2026] Fix | Delete
$page_content = shortcode_unautop( $page_content );
[2027] Fix | Delete
}
[2028] Fix | Delete
if ( function_exists( 'prepend_attachment' ) ) {
[2029] Fix | Delete
$page_content = prepend_attachment( $page_content );
[2030] Fix | Delete
}
[2031] Fix | Delete
if ( function_exists( 'wp_filter_content_tags' ) ) {
[2032] Fix | Delete
$page_content = wp_filter_content_tags( $page_content );
[2033] Fix | Delete
} elseif ( function_exists( 'wp_make_content_images_responsive' ) ) {
[2034] Fix | Delete
$page_content = wp_make_content_images_responsive( $page_content );
[2035] Fix | Delete
}
[2036] Fix | Delete
if ( function_exists( 'do_shortcode' ) ) {
[2037] Fix | Delete
$page_content = do_shortcode( $page_content );
[2038] Fix | Delete
}
[2039] Fix | Delete
?>
[2040] Fix | Delete
<div class="portfolio_content entry-content">
[2041] Fix | Delete
<div class="entry"><?php echo wp_kses_post( $page_content ); ?></div>
[2042] Fix | Delete
</div>
[2043] Fix | Delete
<?php
[2044] Fix | Delete
}
[2045] Fix | Delete
[2046] Fix | Delete
if ( $second_query->have_posts() ) {
[2047] Fix | Delete
while ( $second_query->have_posts() ) {
[2048] Fix | Delete
$second_query->the_post();
[2049] Fix | Delete
if ( 0 === $count_portfolio_row_block % $prtfl_options['custom_portfolio_row_count'] ) {
[2050] Fix | Delete
?>
[2051] Fix | Delete
<div class="portfolio_row_count">
[2052] Fix | Delete
<?php
[2053] Fix | Delete
}
[2054] Fix | Delete
?>
[2055] Fix | Delete
<div id="portfolio_row_count_block" class="portfolio_row_count_block" style="width: <?php echo esc_attr( $prtfl_widht ); ?>%">
[2056] Fix | Delete
<div class="portfolio_content<?php echo in_array( get_stylesheet(), array( 'twentyfourteen', 'twentythirteen', 'twentytwelve', 'twentynineteen', 'twentytwenty' ) ) ? esc_attr( ' entry-content' ) : ''; ?>">
[2057] Fix | Delete
<div class="entry">
[2058] Fix | Delete
<?php
[2059] Fix | Delete
$post_thumbnail_id = get_post_thumbnail_id( $post->ID );
[2060] Fix | Delete
$image = wp_get_attachment_image_src( $post_thumbnail_id, $prtfl_options['image_size_album'] );
[2061] Fix | Delete
$post_meta = get_post_meta( $post->ID, 'prtfl_information', true );
[2062] Fix | Delete
[2063] Fix | Delete
$short_descr = isset( $post_meta['_prtfl_short_descr'] ) ? $post_meta['_prtfl_short_descr'] : '';
[2064] Fix | Delete
if ( empty( $short_descr ) ) {
[2065] Fix | Delete
$short_descr = get_the_excerpt();
[2066] Fix | Delete
}
[2067] Fix | Delete
$title = get_the_title();
[2068] Fix | Delete
if ( empty( $title ) ) {
[2069] Fix | Delete
$title = '(' . __( 'No title', 'portfolio' ) . ')';
[2070] Fix | Delete
}
[2071] Fix | Delete
$permalink = get_permalink();
[2072] Fix | Delete
if ( ! empty( $image[0] ) ) {
[2073] Fix | Delete
/* get width and height for image_size_album */
[2074] Fix | Delete
if ( 'portfolio-thumb' !== $prtfl_options['image_size_album'] ) {
[2075] Fix | Delete
$width = absint( get_option( $prtfl_options['image_size_album'] . '_size_w' ) );
[2076] Fix | Delete
$height = absint( get_option( $prtfl_options['image_size_album'] . '_size_h' ) );
[2077] Fix | Delete
} else {
[2078] Fix | Delete
$width = $prtfl_options['custom_size_px']['portfolio-thumb'][0];
[2079] Fix | Delete
$height = $prtfl_options['custom_size_px']['portfolio-thumb'][1];
[2080] Fix | Delete
}
[2081] Fix | Delete
$image_alt = get_post_meta( $post_thumbnail_id, '_wp_attachment_image_alt', true );
[2082] Fix | Delete
?>
[2083] Fix | Delete
<div class="portfolio_thumb">
[2084] Fix | Delete
<a rel="bookmark" href="<?php echo esc_url( $permalink ); ?>" title="<?php echo esc_html( $title ); ?>">
[2085] Fix | Delete
<img src="<?php echo esc_url( $image[0] ); ?>" alt="<?php echo esc_html( $image_alt ); ?>" <?php echo isset( $width ) ? 'width="' . esc_attr( $width ) . '"' : ''; ?> <?php echo isset( $height ) ? 'height="' . esc_attr( $height ) . '"' : ''; ?>
[2086] Fix | Delete
style="<?php echo isset( $width ) ? 'width:' . esc_attr( $width ) . 'px;' : ''; ?> <?php echo isset( $height ) ? 'height:' . esc_attr( $height ) . 'px;' : ''; ?>" />
[2087] Fix | Delete
</a>
[2088] Fix | Delete
</div><!-- .portfolio_thumb -->
[2089] Fix | Delete
<?php } ?>
[2090] Fix | Delete
<div class="portfolio_short_content">
[2091] Fix | Delete
<div class="item_title">
[2092] Fix | Delete
<p>
[2093] Fix | Delete
<a href="<?php echo esc_url( $permalink ); ?>" rel="bookmark"><?php echo wp_kses_post( $title ); ?></a>
[2094] Fix | Delete
</p>
[2095] Fix | Delete
</div><!-- .item_title -->
[2096] Fix | Delete
<?php
[2097] Fix | Delete
$date_compl = isset( $post_meta['_prtfl_date_compl'] ) ? $post_meta['_prtfl_date_compl'] : '';
[2098] Fix | Delete
if ( 1 === absint( $prtfl_options['date_additional_field'] ) && ! empty( $date_compl ) ) {
[2099] Fix | Delete
?>
[2100] Fix | Delete
<p>
[2101] Fix | Delete
<span class="lable"><?php echo '<b>' . wp_kses_post( $prtfl_options['date_text_field'] ) . '</b>'; ?></span> <?php echo wp_kses_post( $date_compl ); ?>
[2102] Fix | Delete
</p>
[2103] Fix | Delete
<?php
[2104] Fix | Delete
}
[2105] Fix | Delete
$user_id = get_current_user_id();
[2106] Fix | Delete
[2107] Fix | Delete
$link = isset( $post_meta['_prtfl_link'] ) ? $post_meta['_prtfl_link'] : '';
[2108] Fix | Delete
if ( 1 === absint( $prtfl_options['link_additional_field'] ) && ! empty( $link ) ) {
[2109] Fix | Delete
[2110] Fix | Delete
if ( false !== wp_parse_url( $link ) ) {
[2111] Fix | Delete
if ( ( 0 === $user_id && 0 === absint( $prtfl_options['link_additional_field_for_non_registered'] ) ) || 0 !== $user_id ) {
[2112] Fix | Delete
?>
[2113] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $prtfl_options['link_text_field'] ) . '</b>'; ?></span> <a href="<?php echo esc_url( $link ); ?>"><?php echo esc_url( $link ); ?></a></p>
[2114] Fix | Delete
<?php } else { ?>
[2115] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $prtfl_options['link_text_field'] ) . '</b>'; ?></span> <?php echo esc_url( $link ); ?></p>
[2116] Fix | Delete
<?php
[2117] Fix | Delete
}
[2118] Fix | Delete
} else {
[2119] Fix | Delete
?>
[2120] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $prtfl_options['link_text_field'] ) . '</b>'; ?></span> <?php echo esc_url( $link ); ?></p>
[2121] Fix | Delete
<?php
[2122] Fix | Delete
}
[2123] Fix | Delete
}
[2124] Fix | Delete
if ( 1 === absint( $prtfl_options['shrdescription_additional_field'] ) ) {
[2125] Fix | Delete
?>
[2126] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $prtfl_options['shrdescription_text_field'] ) . '</b>'; ?></span> <?php echo wp_kses_post( $short_descr ); ?></p>
[2127] Fix | Delete
<?php } ?>
[2128] Fix | Delete
</div><!-- .portfolio_short_content -->
[2129] Fix | Delete
</div><!-- .entry -->
[2130] Fix | Delete
<div class="entry_footer">
[2131] Fix | Delete
<div class="read_more">
[2132] Fix | Delete
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php esc_html_e( 'Read more', 'portfolio' ); ?></a>
[2133] Fix | Delete
</div><!-- .read_more -->
[2134] Fix | Delete
<?php
[2135] Fix | Delete
$terms = wp_get_object_terms( $post->ID, 'portfolio_technologies' );
[2136] Fix | Delete
if ( 1 === absint( $prtfl_options['technologies_additional_field'] ) && ! is_wp_error( $terms ) ) {
[2137] Fix | Delete
if ( is_array( $terms ) && 0 < count( $terms ) ) {
[2138] Fix | Delete
?>
[2139] Fix | Delete
<div class="portfolio_terms">
[2140] Fix | Delete
<?php
[2141] Fix | Delete
if ( isset( $prtfl_options['technologies_text_field'] ) ) {
[2142] Fix | Delete
echo '<b>' . esc_html( $prtfl_options['technologies_text_field'] ) . '&nbsp;</b>';}
[2143] Fix | Delete
$links = array();
[2144] Fix | Delete
foreach ( $terms as $term ) {
[2145] Fix | Delete
$links[] = '<a href="' . get_term_link( $term->slug, 'portfolio_technologies' ) . '" title="' . sprintf( esc_html__( 'View all projects in %s' ), $term->name ) . '">' . $term->name . '</a>';
[2146] Fix | Delete
}
[2147] Fix | Delete
echo wp_kses_post( implode( ', ', $links ) );
[2148] Fix | Delete
?>
[2149] Fix | Delete
</div><!-- .portfolio_terms -->
[2150] Fix | Delete
<?php
[2151] Fix | Delete
}
[2152] Fix | Delete
}
[2153] Fix | Delete
?>
[2154] Fix | Delete
</div><!-- .entry_footer -->
[2155] Fix | Delete
</div><!-- .portfolio_content -->
[2156] Fix | Delete
</div>
[2157] Fix | Delete
<?php if ( ( $count_portfolio_row_block % $prtfl_options['custom_portfolio_row_count'] ) === ( $prtfl_options['custom_portfolio_row_count'] - 1 ) ) { ?>
[2158] Fix | Delete
<div class="clear"></div>
[2159] Fix | Delete
</div><!-- .portfolio_row_count -->
[2160] Fix | Delete
<?php
[2161] Fix | Delete
}
[2162] Fix | Delete
$count_portfolio_row_block++;
[2163] Fix | Delete
}
[2164] Fix | Delete
}
[2165] Fix | Delete
if ( 0 !== $count_portfolio_row_block % $prtfl_options['custom_portfolio_row_count'] ) {
[2166] Fix | Delete
?>
[2167] Fix | Delete
</div>
[2168] Fix | Delete
<?php
[2169] Fix | Delete
}
[2170] Fix | Delete
?>
[2171] Fix | Delete
<div class="clear"></div>
[2172] Fix | Delete
<?php
[2173] Fix | Delete
}
[2174] Fix | Delete
}
[2175] Fix | Delete
[2176] Fix | Delete
if ( ! function_exists( 'prtfl_post_get_content' ) ) {
[2177] Fix | Delete
/**
[2178] Fix | Delete
* Display post template content
[2179] Fix | Delete
*/
[2180] Fix | Delete
function prtfl_post_get_content() {
[2181] Fix | Delete
global $post, $prtfl_options;
[2182] Fix | Delete
[2183] Fix | Delete
while ( have_posts() ) :
[2184] Fix | Delete
the_post();
[2185] Fix | Delete
?>
[2186] Fix | Delete
<article class="portfolio_content entry-content">
[2187] Fix | Delete
<?php
[2188] Fix | Delete
ob_start();
[2189] Fix | Delete
?>
[2190] Fix | Delete
<div class="entry">
[2191] Fix | Delete
<?php
[2192] Fix | Delete
$portfolio_options = get_option( 'prtfl_options' );
[2193] Fix | Delete
$post_thumbnail_id = get_post_thumbnail_id( $post->ID );
[2194] Fix | Delete
$image = wp_get_attachment_image_src( $post_thumbnail_id, $prtfl_options['image_size_album'] );
[2195] Fix | Delete
$post_meta = get_post_meta( $post->ID, 'prtfl_information', true );
[2196] Fix | Delete
[2197] Fix | Delete
if ( ! empty( $image[0] ) ) {
[2198] Fix | Delete
$image_large = wp_get_attachment_image_src( $post_thumbnail_id, 'large' );
[2199] Fix | Delete
$image_desc = get_post( $post_thumbnail_id );
[2200] Fix | Delete
$image_desc = $image_desc->post_content;
[2201] Fix | Delete
/* get width and height for image_size_album */
[2202] Fix | Delete
if ( 'portfolio-thumb' !== $prtfl_options['image_size_album'] ) {
[2203] Fix | Delete
$width = absint( get_option( $prtfl_options['image_size_album'] . '_size_w' ) );
[2204] Fix | Delete
$height = absint( get_option( $prtfl_options['image_size_album'] . '_size_h' ) );
[2205] Fix | Delete
} else {
[2206] Fix | Delete
$width = $prtfl_options['custom_size_px']['portfolio-thumb'][0];
[2207] Fix | Delete
$height = $prtfl_options['custom_size_px']['portfolio-thumb'][1];
[2208] Fix | Delete
}
[2209] Fix | Delete
$image_alt = get_post_meta( $post_thumbnail_id, '_wp_attachment_image_alt', true );
[2210] Fix | Delete
?>
[2211] Fix | Delete
<div class="portfolio_thumb">
[2212] Fix | Delete
<a class="lightbox" data-fancybox="portfolio_fancybox" href="<?php echo esc_url( $image_large[0] ); ?>" title="<?php echo wp_kses_post( $image_desc ); ?>">
[2213] Fix | Delete
<img src="<?php echo esc_url( $image[0] ); ?>" alt="<?php echo esc_html( $image_alt ); ?>"
[2214] Fix | Delete
<?php
[2215] Fix | Delete
if ( $width ) {
[2216] Fix | Delete
echo 'width="' . esc_attr( $width ) . '"';
[2217] Fix | Delete
}
[2218] Fix | Delete
if ( $height ) {
[2219] Fix | Delete
echo 'height="' . esc_attr( $height ) . '"';
[2220] Fix | Delete
}
[2221] Fix | Delete
?>
[2222] Fix | Delete
/>
[2223] Fix | Delete
</a>
[2224] Fix | Delete
</div><!-- .portfolio_thumb -->
[2225] Fix | Delete
<?php } ?>
[2226] Fix | Delete
<div class="portfolio_short_content">
[2227] Fix | Delete
<?php
[2228] Fix | Delete
$date_compl = isset( $post_meta['_prtfl_date_compl'] ) ? $post_meta['_prtfl_date_compl'] : '';
[2229] Fix | Delete
if ( 1 === absint( $portfolio_options['date_additional_field'] ) && ! empty( $date_compl ) ) {
[2230] Fix | Delete
?>
[2231] Fix | Delete
<p>
[2232] Fix | Delete
<span class="lable"><?php echo '<b>' . wp_kses_post( $portfolio_options['date_text_field'] ) . '</b>'; ?></span> <?php echo wp_kses_post( $date_compl ); ?>
[2233] Fix | Delete
</p>
[2234] Fix | Delete
<?php
[2235] Fix | Delete
}
[2236] Fix | Delete
$user_id = get_current_user_id();
[2237] Fix | Delete
[2238] Fix | Delete
$link = isset( $post_meta['_prtfl_link'] ) ? $post_meta['_prtfl_link'] : '';
[2239] Fix | Delete
if ( 1 === absint( $portfolio_options['link_additional_field'] ) && ! empty( $link ) ) {
[2240] Fix | Delete
[2241] Fix | Delete
if ( false !== wp_parse_url( $link ) ) {
[2242] Fix | Delete
?>
[2243] Fix | Delete
<?php if ( ( 0 === $user_id && 0 === absint( $portfolio_options['link_additional_field_for_non_registered'] ) ) || 0 !== $user_id ) { ?>
[2244] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $portfolio_options['link_text_field'] ) . '</b>'; ?></span> <a href="<?php echo esc_url( $link ); ?>"><?php echo esc_url( $link ); ?></a></p>
[2245] Fix | Delete
<?php } else { ?>
[2246] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $portfolio_options['link_text_field'] ) . '</b>'; ?></span> <?php echo esc_url( $link ); ?></p>
[2247] Fix | Delete
<?php
[2248] Fix | Delete
}
[2249] Fix | Delete
} else {
[2250] Fix | Delete
?>
[2251] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $portfolio_options['link_text_field'] ) . '</b>'; ?></span> <?php echo esc_url( $link ); ?></p>
[2252] Fix | Delete
<?php
[2253] Fix | Delete
}
[2254] Fix | Delete
}
[2255] Fix | Delete
if ( 1 === absint( $portfolio_options['description_additional_field'] ) ) {
[2256] Fix | Delete
remove_filter( 'the_content', 'pdfprnt_content' );
[2257] Fix | Delete
$full_descr = '' !== $post->post_content ? apply_filters( 'the_content', $post->post_content ) : '';
[2258] Fix | Delete
add_filter( 'the_content', 'pdfprnt_content' );
[2259] Fix | Delete
if ( empty( $full_descr ) ) {
[2260] Fix | Delete
$full_descr = isset( $post_meta['_prtfl_short_descr'] ) ? $post_meta['_prtfl_short_descr'] : '';
[2261] Fix | Delete
} else {
[2262] Fix | Delete
if ( function_exists( 'mltlngg_the_content_filter' ) ) {
[2263] Fix | Delete
$full_descr = mltlngg_the_content_filter( $full_descr );
[2264] Fix | Delete
}
[2265] Fix | Delete
/* dublicate filter 'the_content' - as we couldnt use it */
[2266] Fix | Delete
if ( function_exists( 'wptexturize' ) ) {
[2267] Fix | Delete
$full_descr = wptexturize( $full_descr );
[2268] Fix | Delete
}
[2269] Fix | Delete
if ( function_exists( 'convert_smilies' ) ) {
[2270] Fix | Delete
$full_descr = convert_smilies( $full_descr );
[2271] Fix | Delete
}
[2272] Fix | Delete
if ( function_exists( 'wpautop' ) ) {
[2273] Fix | Delete
$full_descr = wpautop( $full_descr );
[2274] Fix | Delete
}
[2275] Fix | Delete
if ( function_exists( 'shortcode_unautop' ) ) {
[2276] Fix | Delete
$full_descr = shortcode_unautop( $full_descr );
[2277] Fix | Delete
}
[2278] Fix | Delete
if ( function_exists( 'prepend_attachment' ) ) {
[2279] Fix | Delete
$full_descr = prepend_attachment( $full_descr );
[2280] Fix | Delete
}
[2281] Fix | Delete
if ( function_exists( 'wp_filter_content_tags' ) ) {
[2282] Fix | Delete
$full_descr = wp_filter_content_tags( $full_descr );
[2283] Fix | Delete
} elseif ( function_exists( 'wp_make_content_images_responsive' ) ) {
[2284] Fix | Delete
$full_descr = wp_make_content_images_responsive( $full_descr );
[2285] Fix | Delete
}
[2286] Fix | Delete
if ( function_exists( 'do_shortcode' ) ) {
[2287] Fix | Delete
$full_descr = do_shortcode( $full_descr );
[2288] Fix | Delete
}
[2289] Fix | Delete
}
[2290] Fix | Delete
if ( ! empty( $full_descr ) ) {
[2291] Fix | Delete
?>
[2292] Fix | Delete
<div style = "clear: both;"><span class="lable"><?php echo '<b>' . wp_kses_post( $prtfl_options['description_text_field'] ) . '</b>'; ?></span> <?php echo wp_kses_post( $full_descr ); ?></div>
[2293] Fix | Delete
<?php
[2294] Fix | Delete
}
[2295] Fix | Delete
}
[2296] Fix | Delete
[2297] Fix | Delete
if ( 0 !== $user_id || 0 === absint( $portfolio_options['svn_additional_field_for_non_logged'] ) ) {
[2298] Fix | Delete
$svn = isset( $post_meta['_prtfl_svn'] ) ? $post_meta['_prtfl_svn'] : '';
[2299] Fix | Delete
if ( 1 === absint( $portfolio_options['svn_additional_field'] ) && ! empty( $svn ) ) {
[2300] Fix | Delete
?>
[2301] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $portfolio_options['svn_text_field'] ) . '</b>'; ?></span> <?php echo esc_url( $svn ); ?></p>
[2302] Fix | Delete
<?php
[2303] Fix | Delete
}
[2304] Fix | Delete
}
[2305] Fix | Delete
if ( $user_id ) {
[2306] Fix | Delete
$executors_profile = wp_get_object_terms( $post->ID, 'portfolio_executor_profile' );
[2307] Fix | Delete
if ( 1 === absint( $portfolio_options['executor_additional_field'] ) && ! empty( $executors_profile ) ) {
[2308] Fix | Delete
?>
[2309] Fix | Delete
<p><span class="lable"><?php echo '<b>' . wp_kses_post( $portfolio_options['executor_text_field'] ) . '</b>'; ?></span>
[2310] Fix | Delete
<?php
[2311] Fix | Delete
$count = 0;
[2312] Fix | Delete
foreach ( $executors_profile as $profile ) {
[2313] Fix | Delete
if ( $count > 0 ) {
[2314] Fix | Delete
echo ', ';
[2315] Fix | Delete
}
[2316] Fix | Delete
?>
[2317] Fix | Delete
<a href="<?php echo esc_url( get_term_link( $profile->slug, 'portfolio_executor_profile' ) ); ?>" title="<?php echo wp_kses_post( $profile->name ); ?> profile" target="_blank"><?php echo wp_kses_post( $profile->name ); ?></a>
[2318] Fix | Delete
<?php
[2319] Fix | Delete
$count++;
[2320] Fix | Delete
}
[2321] Fix | Delete
?>
[2322] Fix | Delete
</p>
[2323] Fix | Delete
<?php
[2324] Fix | Delete
}
[2325] Fix | Delete
}
[2326] Fix | Delete
?>
[2327] Fix | Delete
</div><!-- .portfolio_short_content -->
[2328] Fix | Delete
<div class="portfolio_images_block" data-columns="<?php echo esc_attr( $portfolio_options['custom_image_row_count'] ); ?>">
[2329] Fix | Delete
<?php
[2330] Fix | Delete
if ( metadata_exists( 'post', $post->ID, '_prtfl_images' ) ) {
[2331] Fix | Delete
$array_post_thumbnail_id = array_filter( explode( ',', get_post_meta( $post->ID, '_prtfl_images', true ) ) );
[2332] Fix | Delete
} else {
[2333] Fix | Delete
/* Compatibility with old plugin version 2.37 */
[2334] Fix | Delete
$args = array(
[2335] Fix | Delete
'post_parent' => $post->ID,
[2336] Fix | Delete
'post_type' => 'attachment',
[2337] Fix | Delete
'post_mime_type' => 'image',
[2338] Fix | Delete
'numberposts' => -1,
[2339] Fix | Delete
'orderby' => 'menu_order',
[2340] Fix | Delete
'order' => 'ASC',
[2341] Fix | Delete
'exclude' => $post_thumbnail_id,
[2342] Fix | Delete
'fields' => 'ids',
[2343] Fix | Delete
);
[2344] Fix | Delete
$array_post_thumbnail_id = get_children( $args );
[2345] Fix | Delete
}
[2346] Fix | Delete
$count_element = count( $array_post_thumbnail_id );
[2347] Fix | Delete
[2348] Fix | Delete
foreach ( $array_post_thumbnail_id as $key => $value ) {
[2349] Fix | Delete
$image = wp_get_attachment_image_src( $value, $prtfl_options['image_size_photo'] );
[2350] Fix | Delete
$image_large = wp_get_attachment_image_src( $value, 'large' );
[2351] Fix | Delete
$image_alt = get_post_meta( $value, '_wp_attachment_image_alt', true );
[2352] Fix | Delete
$image_title = get_post_meta( $value, '_wp_attachment_image_title', true );
[2353] Fix | Delete
$image_desc = get_post( $value );
[2354] Fix | Delete
$image_desc = $image_desc->post_content;
[2355] Fix | Delete
[2356] Fix | Delete
/* get width and height for image_size_photo */
[2357] Fix | Delete
if ( 'portfolio-photo-thumb' !== $prtfl_options['image_size_photo'] ) {
[2358] Fix | Delete
$width = absint( get_option( $prtfl_options['image_size_photo'] . '_size_w' ) );
[2359] Fix | Delete
$height = absint( get_option( $prtfl_options['image_size_photo'] . '_size_h' ) );
[2360] Fix | Delete
} else {
[2361] Fix | Delete
$width = $prtfl_options['custom_size_px']['portfolio-photo-thumb'][0];
[2362] Fix | Delete
$height = $prtfl_options['custom_size_px']['portfolio-photo-thumb'][1];
[2363] Fix | Delete
}
[2364] Fix | Delete
[2365] Fix | Delete
if ( 0 === $key ) {
[2366] Fix | Delete
?>
[2367] Fix | Delete
<span class="lable"><?php echo '<b>' . wp_kses_post( $portfolio_options['screenshot_text_field'] ) . '</b>'; ?></span>
[2368] Fix | Delete
<div class="portfolio_images_rows">
[2369] Fix | Delete
<?php } ?>
[2370] Fix | Delete
<div class="portfolio_images_gallery">
[2371] Fix | Delete
<a class="lightbox" data-fancybox="portfolio_fancybox" href="<?php echo esc_url( $image_large[0] ); ?>" title="<?php echo esc_html( $image_desc ); ?>">
[2372] Fix | Delete
<img src="<?php echo esc_url( $image[0] ); ?>" alt="<?php echo esc_html( $image_alt ); ?>" <?php echo isset( $width ) ? 'width="' . esc_attr( $width ) . '"' : ''; ?> <?php echo isset( $height ) ? 'height="' . esc_attr( $height ) . '"' : ''; ?>
[2373] Fix | Delete
style="<?php echo isset( $width ) ? 'width:' . esc_attr( $width ) . 'px;' : ''; ?> <?php echo isset( $height ) ? 'height:' . esc_attr( $height ) . 'px;' : ''; ?>" />
[2374] Fix | Delete
</a>
[2375] Fix | Delete
<br /><?php echo wp_kses_post( $image_title ); ?>
[2376] Fix | Delete
</div>
[2377] Fix | Delete
<?php if ( 0 === ( $key + 1 ) % $portfolio_options['custom_image_row_count'] && 0 !== $key && $key + 1 !== $count_element ) { ?>
[2378] Fix | Delete
</div><!-- .portfolio_images_rows -->
[2379] Fix | Delete
<div class="portfolio_images_rows">
[2380] Fix | Delete
<?php
[2381] Fix | Delete
}
[2382] Fix | Delete
}
[2383] Fix | Delete
if ( 0 < $count_element ) {
[2384] Fix | Delete
?>
[2385] Fix | Delete
</div><!-- .portfolio_images_rows -->
[2386] Fix | Delete
<?php } ?>
[2387] Fix | Delete
</div><!-- .portfolio_images_block -->
[2388] Fix | Delete
</div><!-- .entry -->
[2389] Fix | Delete
<div class="entry_footer entry-footer">
[2390] Fix | Delete
<?php
[2391] Fix | Delete
$terms = wp_get_object_terms( $post->ID, 'portfolio_technologies' );
[2392] Fix | Delete
if ( 1 === absint( $portfolio_options['technologies_additional_field'] ) && ! ( empty( $terms ) || is_wp_error( $terms ) ) ) {
[2393] Fix | Delete
if ( is_array( $terms ) && 0 < count( $terms ) ) {
[2394] Fix | Delete
?>
[2395] Fix | Delete
<div class="portfolio_terms">
[2396] Fix | Delete
<?php
[2397] Fix | Delete
if ( isset( $portfolio_options['technologies_text_field'] ) ) {
[2398] Fix | Delete
echo '<b>' . wp_kses_post( $portfolio_options['technologies_text_field'] ) . '&nbsp;</b>';}
[2399] Fix | Delete
$links = array();
[2400] Fix | Delete
foreach ( $terms as $term ) {
[2401] Fix | Delete
$links[] = '<a href="' . esc_url( get_term_link( $term->slug, 'portfolio_technologies' ) ) . '" title="' . sprintf( esc_html__( 'View all projects in %s' ), $term->name ) . '">' . esc_html( $term->name ) . '</a>';
[2402] Fix | Delete
}
[2403] Fix | Delete
echo wp_kses_post( implode( ', ', $links ) );
[2404] Fix | Delete
?>
[2405] Fix | Delete
</div><!-- .portfolio_terms -->
[2406] Fix | Delete
<?php
[2407] Fix | Delete
}
[2408] Fix | Delete
}
[2409] Fix | Delete
?>
[2410] Fix | Delete
</div><!-- .entry_footer .entry-footer -->
[2411] Fix | Delete
<?php
[2412] Fix | Delete
$content = ob_get_contents();
[2413] Fix | Delete
ob_end_clean();
[2414] Fix | Delete
echo wp_kses_post( $content );
[2415] Fix | Delete
?>
[2416] Fix | Delete
</article><!-- .portfolio_content -->
[2417] Fix | Delete
<?php
[2418] Fix | Delete
endwhile;
[2419] Fix | Delete
}
[2420] Fix | Delete
}
[2421] Fix | Delete
[2422] Fix | Delete
if ( ! function_exists( 'prtfl_pro_pagination' ) ) {
[2423] Fix | Delete
/**
[2424] Fix | Delete
* This function prints pagination for portfolio post type template
[2425] Fix | Delete
*
[2426] Fix | Delete
* @param object $second_query Query object.
[2427] Fix | Delete
* @param array $args Link to args.
[2428] Fix | Delete
*/
[2429] Fix | Delete
function prtfl_pro_pagination( $second_query, &$args ) {
[2430] Fix | Delete
global $wp_query, $prtfl_options;
[2431] Fix | Delete
$count_all_albums = $second_query->found_posts;
[2432] Fix | Delete
[2433] Fix | Delete
$request = $wp_query->request;
[2434] Fix | Delete
$paged = $args['paged'];
[2435] Fix | Delete
$showitems = $paged;
[2436] Fix | Delete
$per_page = $args['posts_per_page'];
[2437] Fix | Delete
$pages = intval( $count_all_albums / $per_page );
[2438] Fix | Delete
[2439] Fix | Delete
if ( $count_all_albums % $per_page > 0 ) {
[2440] Fix | Delete
$pages++;
[2441] Fix | Delete
}
[2442] Fix | Delete
$range = 2;
[2443] Fix | Delete
[2444] Fix | Delete
if ( ! $pages ) {
[2445] Fix | Delete
$pages = 1;
[2446] Fix | Delete
}
[2447] Fix | Delete
if ( 1 !== $pages ) {
[2448] Fix | Delete
?>
[2449] Fix | Delete
<div class='clear'></div>
[2450] Fix | Delete
<div id="portfolio_pagenation">
[2451] Fix | Delete
<div class="pagination">
[2452] Fix | Delete
<div class="<?php echo 'twentynineteen' === get_stylesheet() ? esc_attr( 'nav-links' ) : ''; ?>">
[2453] Fix | Delete
<?php
[2454] Fix | Delete
if ( 2 < $paged && $paged > $range + 1 && $showitems < $pages ) {
[2455] Fix | Delete
echo "<a href='" . esc_url( get_pagenum_link( 1 ) ) . "'>&laquo;</a>";
[2456] Fix | Delete
}
[2457] Fix | Delete
if ( 1 < $paged && $showitems < $pages ) {
[2458] Fix | Delete
echo "<a href='" . esc_url( get_pagenum_link( $paged - 1 ) ) . "'>&lsaquo;</a>";
[2459] Fix | Delete
}
[2460] Fix | Delete
for ( $i = 1; $i <= $pages; $i++ ) {
[2461] Fix | Delete
if ( 1 !== $pages && ( ! ( $i >= $paged + $range + 1 || $i <= $paged - $range - 1 ) || $pages <= $showitems ) ) {
[2462] Fix | Delete
echo ( $paged === $i ) ? "<span class='current'>" . esc_html( $i ) . '</span>' : "<a href='" . esc_url( get_pagenum_link( $i ) ) . "' class='inactive' >" . esc_html( $i ) . '</a>';
[2463] Fix | Delete
}
[2464] Fix | Delete
}
[2465] Fix | Delete
if ( $paged < $pages && $showitems < $pages ) {
[2466] Fix | Delete
echo "<a href='" . esc_url( get_pagenum_link( $paged + 1 ) ) . "'>&rsaquo;</a>";
[2467] Fix | Delete
}
[2468] Fix | Delete
if ( $paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages ) {
[2469] Fix | Delete
echo "<a href='" . esc_url( get_pagenum_link( $pages ) ) . "'>&raquo;</a>";
[2470] Fix | Delete
}
[2471] Fix | Delete
?>
[2472] Fix | Delete
<div class='clear'></div>
[2473] Fix | Delete
</div>
[2474] Fix | Delete
</div><!-- .pagination -->
[2475] Fix | Delete
<?php
[2476] Fix | Delete
if ( function_exists( 'pgntn_display_pagination' ) ) {
[2477] Fix | Delete
pgntn_display_pagination( 'custom', $second_query );}
[2478] Fix | Delete
?>
[2479] Fix | Delete
</div><!-- #portfolio_pagenation -->
[2480] Fix | Delete
<?php
[2481] Fix | Delete
}
[2482] Fix | Delete
}
[2483] Fix | Delete
}
[2484] Fix | Delete
[2485] Fix | Delete
if ( ! function_exists( 'prtfl_shortcode_button_content' ) ) {
[2486] Fix | Delete
/**
[2487] Fix | Delete
* Add shortcode content
[2488] Fix | Delete
*
[2489] Fix | Delete
* @param string $content Shortcode content.
[2490] Fix | Delete
*/
[2491] Fix | Delete
function prtfl_shortcode_button_content( $content ) {
[2492] Fix | Delete
?>
[2493] Fix | Delete
<div id="prtfl" style="display:none;">
[2494] Fix | Delete
<fieldset>
[2495] Fix | Delete
<label>
[2496] Fix | Delete
<input type="number" value="3" min="0" max="1000" name="prtfl_display_count" id="prtfl_display_count" class="small-text" />
[2497] Fix | Delete
<span>
[2498] Fix | Delete
<?php esc_html_e( 'The number of portfolio projects to display', 'portfolio' ); ?>
[2499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function