WordPress.org

Ready to get started?Download WordPress

Forums

What is limitted here? (1 post)

  1. LapanWebsite
    Member
    Posted 1 year ago #

    I have this function:

    function movie_cast( $atts, $content = null ) {
        $url = '/?s=';
        $str = '';
        foreach (explode(", ",$content) as $content)
    {
            if ($str != "") $str .= ", ";
            $str .= '<a href=\'' . $url . $content . '\'>' . $content . '</a>';
    }
        return '<div class="movie_cast" style="display: block; margin-left: 180px;"><strong>Cast: </strong>'.$str.'<br><br></div>';
    }
    add_shortcode( 'movie_cast', 'movie_cast' );

    This is the shortcode which break the post (post is empty):
    [movie_cast]James Marsden, Joel Rogers, Will Ferrell, Christina Applegate, Paul Rudd, Steve Carell, David Koechner, Fred Willard, Bill Kurtis, Luke Wilson, Vince Vaughn, Dylan Baker, Liam Neeson, Harrison Ford, Steve Coulter, Sacha Baron Cohen, Greg Kinnear, Jim Carrey, John C. Reilly, Kristen Wiig, L. Warren Young, Arvell Poe, Kirsten Dunst, Shade Rupe, Amy Poehler, Meagan Good, Nicole Kidman, Josh Lawson, Brian F. Durkin, Wilbur Fitzgerald, Tina Fey, Ron Prather, Kanye West, Karen Beyer, Sarah E. Spencer, June Diane Raphael, Lori Beth Edgeman, Zoe Myers, Matthew Stanton, Kate Nowlin, Gary Weeks, Chris Gethard, Charles Casey, Dane Davenport, Lauren Henneberg, Victor Gage, Nickolas Wolf, Clark Sarullo, Dave Pileggi, Ken Venzke, David Silverman, James Smith, Randall Taylor, Tom Clark, Judah Nelson, C.C. Ice, King, William Frasca, David Pascua, Amanda Q Williams, Gina Santiago, Jeff Matthew Glover, Gary Miller, John J. Palomino, Christopher Payne, Nancy Sandlin, Don Teems, Rachel Acuna, Paul Chappell, Fred Galle, Dawn Hamil, Gelin DiGennaro, Jennifer Gullick, Rose Hughes, Natalie Taylor, Dave Simmons, Rob Tunstall, Gary Hardt, Clay Stapleford, Robert F. Nixon, David Itchkawitz, Jessica Brown, Courtney Patterson, Alberto David Mercado, Joseph Nelson, Olivia Austin, Kevin Tomkins, Colin Lacativa, Matt Amick, Lane Gamble, Zeb Austin, Larry A. Brewer, Ellie Decker, Lisa Finlayson, Daniel T. Martin, Courtney Pennington, Brandi Quinn, Paul Vincent Rapisarda[/movie_cast]

    If I write less of the actors inside the shortcode it works than.
    From where this limitation is coming?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.