62*/
63function createAboutColumnGroupFields($cmbInstance, $numberOfGroups, $title, $label) {
64 for ($i = 0; $i < $numberOfGroups; $i++) {
65 $group_field = $cmbInstance->add_field( array( 66 'id' => 'about_page_team_group_' . sanitize_title($title) . '-' . ($i + 1),
67 'type' => 'group',
68 'name' => $title . ' (column ' . ($i + 1) . ')',
75 ),
76 ) );
77
78 $cmbInstance->add_group_field( $group_field, array( 79 'name' => 'Role',
80 'id' => 'title',
81 'type' => 'text',
81 'type' => 'text',
82 ) );
83
84 $cmbInstance->add_group_field( $group_field, array( 85 'name' => 'Name',
86 'id' => 'name',
87 'type' => 'textarea_code',
55
56 $posts = array();
57 while ( $the_query->have_posts() ) :
58 $the_query->the_post(); 59 $id = $the_query->post->ID;
60 $meta = get_post_meta($id);
61
54} else {
55
56 $posts = array();
57 while ( $the_query->have_posts() ) : 58 $the_query->the_post();
59 $id = $the_query->post->ID;
60 $meta = get_post_meta($id);
The method you are trying to call is not defined, which can result in a fatal error.
This issue can be raised for any of the following cases:
void
.class User
{
public function printName()
{
echo $this->getName(); // getName() doesn't exist.
}
}
class User
{
private function getName()
{
return 'John Doe';
}
}
class Admin extends User
{
public function printName()
{
echo $this->getName(); // `getName()` is private
}
}
class Admin
{
public function printName()
{
$user = new User(); // class `User` doesn't exist
echo $user->getName();
}
}
class User
{
private $name;
public function setName()
{
$this->name = 'Anonymous';
}
public function printName()
{
$name = $this->setName(); // the "setName" method doesn't return anything
echo $name; // this will print nothing, because $name is NULL
}
}
class User
{
public function printName()
{
echo $this->getName();
}
public function getName()
{
return 'John Doe';
}
}
class User
{
protected function getName()
{
return 'John Doe';
}
}
class Admin extends User
{
public function printName()
{
echo $this->getName();
}
}
class User
{
public function getName()
{
return 'John Doe';
}
}
class Admin
{
public function printName()
{
$user = new User();
echo $user->getName();
}
}